Bug 563301 - --rpm-requires does not imply -n
Summary: --rpm-requires does not imply -n
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: bash
Version: 12
Hardware: All
OS: Linux
medium
high
Target Milestone: ---
Assignee: Roman Rakus
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-02-09 18:59 UTC by Ville Skyttä
Modified: 2014-01-13 00:10 UTC (History)
3 users (show)

Fixed In Version: bash-4.0.35-3.fc12
Clone Of:
Environment:
Last Closed: 2010-04-09 01:28:50 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Ville Skyttä 2010-02-09 18:59:29 UTC
The --rpm-requires argument is documented to imply -n (i.e. don't execute any commands), but that does not hold true; commands in scripts are actually executed, making this a potentially dangerous problem.  Tested on F-12, appears to affect Rawhide as well, FWIW CentOS 5.4's bash-3.2-24.el5 is not affected, don't know about other versions.

$ rpm -q bash
bash-4.0.35-2.fc12.x86_64

$ echo 'echo "hello from script" ; ls /root' > t.sh
$ bash --rpm-requires t.sh
executable(ls)
hello from script
ls: cannot open directory /root: Permission denied

Comment 1 Roman Rakus 2010-03-30 08:50:13 UTC
Thanks for the report. I have done a mistake when reformatting patch. Affected bashes are all since F-11. I will do all necessary updates.

Comment 2 Fedora Update System 2010-03-30 12:47:11 UTC
bash-4.0-10.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/bash-4.0-10.fc11

Comment 3 Fedora Update System 2010-03-30 14:11:13 UTC
bash-4.0.35-3.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/bash-4.0.35-3.fc12

Comment 4 Fedora Update System 2010-03-31 12:25:24 UTC
bash-4.1.2-4.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/bash-4.1.2-4.fc13

Comment 5 Fedora Update System 2010-04-01 01:56:55 UTC
bash-4.0.35-3.fc12 has been pushed to the Fedora 12 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update bash'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/bash-4.0.35-3.fc12

Comment 6 Fedora Update System 2010-04-09 01:28:46 UTC
bash-4.0.35-3.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 7 Fedora Update System 2010-04-09 04:24:47 UTC
bash-4.1.2-4.fc13 has been pushed to the Fedora 13 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.