Bug 1013774 - chcat does not quote its arguments properly
Summary: chcat does not quote its arguments properly
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: policycoreutils
Version: 29
Hardware: All
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Petr Lautrbach
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-09-30 18:19 UTC by Göran Uddeborg
Modified: 2019-01-23 02:28 UTC (History)
3 users (show)

Fixed In Version: policycoreutils-2.8-15.fc29
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-01-23 02:28:05 UTC


Attachments (Terms of Use)

Description Göran Uddeborg 2013-09-30 18:19:15 UTC
Description of problem:
File names that needs to be quoted are not properly handled by chcat.


Version-Release number of selected component (if applicable):
policycoreutils-python-2.1.14-45.fc19.x86_64


How reproducible:
Every time


Steps to Reproduce:
1. touch apa '#apa' 'apa bepa'
2. chcat +c42 apa
3. chcat +c43 '#apa'
4. chcat +c44 'apa bepa'


Actual results:
The first chcat command works fine.

The second fails with an error message:
    sh: -c: line 1: syntax error: unexpected end of file

The third one fails with another error message: 
    chcon: cannot access 'bepa': No such file or directory
In addition it incorrectly sets the category to the file "apa"

I'm guessing the arguments of chcat are sent to a subshell without the necessary quoting.

Comment 1 Fedora End Of Life 2015-01-09 20:02:47 UTC
This message is a notice that Fedora 19 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 19. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 19 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 2 Göran Uddeborg 2015-01-10 17:27:34 UTC
The problem remains in policycoreutils-python-2.3-7.1.fc21.

Comment 3 Fedora End Of Life 2015-11-04 14:09:49 UTC
This message is a reminder that Fedora 21 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 21. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '21'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 21 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 4 Göran Uddeborg 2015-11-07 17:10:48 UTC
The problem remains in policycoreutils-python-utils-2.4-10.fc23.x86_64.

Comment 5 Fedora End Of Life 2016-11-24 11:02:57 UTC
This message is a reminder that Fedora 23 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 23. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '23'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 23 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 6 Göran Uddeborg 2016-11-27 10:52:40 UTC
The problem remains in policycoreutils-python-utils-2.5-17.fc25.x86_64.

Comment 7 Vit Mojzis 2017-01-13 12:44:24 UTC
Thank you for reporting the issue, patch is awaiting review
https://github.com/fedora-selinux/selinux/pull/38

Comment 8 Fedora End Of Life 2017-11-16 18:56:30 UTC
This message is a reminder that Fedora 25 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 25. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '25'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 25 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 9 Göran Uddeborg 2017-11-17 20:19:54 UTC
I see a fix might be on its way.  But in policycoreutils-python-utils-2.7-1.fc27.x86_64 it isn't yet fixed, so I update the version field.

Comment 10 Ben Cotton 2018-11-27 18:11:26 UTC
This message is a reminder that Fedora 27 is nearing its end of life.
On 2018-Nov-30  Fedora will stop maintaining and issuing updates for
Fedora 27. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora  'version' of '27'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 27 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 11 Ben Cotton 2018-11-30 18:17:49 UTC
Fedora 27 changed to end-of-life (EOL) status on 2018-11-30. Fedora 27 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 12 Göran Uddeborg 2018-12-03 20:38:21 UTC
The problem remains in F29, policycoreutils-python-utils-2.8-8.fc29.noarch.

Comment 13 Fedora Update System 2019-01-21 20:51:12 UTC
policycoreutils-2.8-15.fc29 libselinux-2.8-6.fc29 libsepol-2.8-3.fc29 libsemanage-2.8-8.fc29 checkpolicy-2.8-3.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2019-16fd3acb03

Comment 14 Fedora Update System 2019-01-22 03:04:00 UTC
checkpolicy-2.8-3.fc29, libselinux-2.8-6.fc29, libsemanage-2.8-8.fc29, libsepol-2.8-3.fc29, policycoreutils-2.8-15.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-16fd3acb03

Comment 15 Fedora Update System 2019-01-23 02:28:05 UTC
checkpolicy-2.8-3.fc29, libselinux-2.8-6.fc29, libsemanage-2.8-8.fc29, libsepol-2.8-3.fc29, policycoreutils-2.8-15.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.