New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lesspipe regression #2808

Closed
v6ak opened this Issue May 13, 2017 · 3 comments

Comments

Projects
None yet
3 participants
@v6ak

v6ak commented May 13, 2017

Qubes OS version

R3.2


Expected behavior:

In dom0, less displays just the content without preprocessing with complex parsers of attacker's choice.

Actual behavior:

Lesspipe is used, although there is an attempt to disable it.

Steps to reproduce the behavior:

  1. Run less on some trusted RPM file (or even on untrusted one if you dare :P), or even a directory.

General notes:

I see the attempt to disable it with /etc/profile.d/zz-disable-lesspipe. Unfortunately, Bash does not process this file, it seems to process just *.sh files there. Just copying the file under right filename helps.

The lesspipe is also defined for csh in profile.d. I am not a csh user and it is unclear how much is it supported in Qubes dom0, but if you want to fix it, it seems we have to use unsetenv instead of unset:

unsetenv LESSOPEN LESSCLOSE

Last but not least, some automated test might be useful. Not sure where it should be added to, but the test itself looks pretty easy, e.g.:

bash -c env | (! grep ^LESS)

Maybe interactive session should be forced there:

(bash <<< env) | (! grep ^LESS)

The same can be applied to csh, just replace "bash" with "csh". The practical issue is that csh is not installed by default.


Related issues:

Original issue: #1014

@andrewdavidwong andrewdavidwong added this to the Release 3.2 updates milestone May 13, 2017

marmarek added a commit to QubesOS/qubes-core-admin-linux that referenced this issue May 26, 2017

Really disable lesspipe
Only files with .sh suffix are loaded.

Fixes QubesOS/qubes-issues#2808

(cherry picked from commit e62acf8)
@qubesos-bot

This comment has been minimized.

Show comment
Hide comment
@qubesos-bot

qubesos-bot May 29, 2017

Automated announcement from builder-github

The package qubes-core-dom0-linux-3.2.14-1.fc23 has been pushed to the r3.2 testing repository for dom0.
To test this update, please install it with the following command:

sudo qubes-dom0-update --enablerepo=qubes-dom0-current-testing

Changes included in this update

Automated announcement from builder-github

The package qubes-core-dom0-linux-3.2.14-1.fc23 has been pushed to the r3.2 testing repository for dom0.
To test this update, please install it with the following command:

sudo qubes-dom0-update --enablerepo=qubes-dom0-current-testing

Changes included in this update

@qubesos-bot qubesos-bot referenced this issue in QubesOS/updates-status May 29, 2017

Closed

core-admin-linux v3.2.14 (r3.2) #61

@qubesos-bot

This comment has been minimized.

Show comment
Hide comment
@qubesos-bot

qubesos-bot Jul 5, 2017

Automated announcement from builder-github

The package qubes-core-dom0-linux-4.0.1-1.fc25 has been pushed to the r4.0 testing repository for dom0.
To test this update, please install it with the following command:

sudo qubes-dom0-update --enablerepo=qubes-dom0-current-testing

Changes included in this update

Automated announcement from builder-github

The package qubes-core-dom0-linux-4.0.1-1.fc25 has been pushed to the r4.0 testing repository for dom0.
To test this update, please install it with the following command:

sudo qubes-dom0-update --enablerepo=qubes-dom0-current-testing

Changes included in this update

@qubesos-bot qubesos-bot referenced this issue in QubesOS/updates-status Jul 5, 2017

Closed

core-admin-linux v4.0.1 (r4.0) #105

@qubesos-bot

This comment has been minimized.

Show comment
Hide comment
@qubesos-bot

qubesos-bot Jul 11, 2017

Automated announcement from builder-github

The package qubes-core-dom0-linux-3.2.15-1.fc23 has been pushed to the r3.2 stable repository for dom0.
To install this update, please use the standard update command:

sudo qubes-dom0-update

Or update dom0 via Qubes Manager.

Changes included in this update

Automated announcement from builder-github

The package qubes-core-dom0-linux-3.2.15-1.fc23 has been pushed to the r3.2 stable repository for dom0.
To install this update, please use the standard update command:

sudo qubes-dom0-update

Or update dom0 via Qubes Manager.

Changes included in this update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment