Bug 475474 (CVE-2008-5374) - CVE-2008-5374 bash: Insecure temporary file use in aliasconv.sh, aliasconv.bash, cshtobash (symlink attack)
Summary: CVE-2008-5374 bash: Insecure temporary file use in aliasconv.sh, aliasconv.ba...
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2008-5374
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL: http://uvw.ru/report.sid.txt
Whiteboard:
Depends On: 657500 700157
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-12-09 12:28 UTC by Jan Lieskovsky
Modified: 2021-02-25 13:49 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-07-21 14:28:36 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2011:0261 0 normal SHIPPED_LIVE Low: bash security and bug fix update 2011-02-16 14:29:52 UTC
Red Hat Product Errata RHSA-2011:1073 0 normal SHIPPED_LIVE Low: bash security, bug fix, and enhancement update 2011-07-21 10:37:04 UTC

Description Jan Lieskovsky 2008-12-09 12:28:25 UTC
Common Vulnerabilities and Exposures assigned an identifier CVE-2008-5374 to
the following vulnerability:

bash-doc 3.2 allows local users to overwrite arbitrary files via a
symlink attack on a /tmp/cb#####.? temporary file, related to the (1)
aliasconv.sh, (2) aliasconv.bash, and (3) cshtobash scripts.

References:
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-5374
http://lists.debian.org/debian-devel/2008/08/msg00347.html
http://uvw.ru/report.sid.txt

Affected files:
/usr/share/doc/bash-3.1/misc/aliasconv.bash
/usr/share/doc/bash-3.1/misc/aliasconv.sh
/usr/share/doc/bash-3.1/misc/cshtobash

Sample affected code:

 10 trap 'rm -f /tmp/cb$$.?' 0 1 2 3 6 15
 11 
 12 T=$'\t'
 13 
 14 cat << \EOF >/tmp/cb$$.1


 36 $BASH /tmp/cb$$.1 | sed -e 's/\$cwd/\$PWD/g' \
 37                      -e 's/\$term/\$TERM/g' \

Problem: A malicious user could pre-create symbolic link with target to
any system file. Subsequent running of above scripts would truncate its
content.

If these files does not needed to be shipped within the bash
package, remove them, or apply fix via 'mktemp'.

Comment 1 Jan Lieskovsky 2008-12-09 12:30:01 UTC
This issue affects all versions of the bash package, as shipped with
Red Hat Enterprise Linux 2.1, 3, 4 or 5.

This issue affects all versions of the bash package, as shipped with
Fedora releases 8, 9 and 10.

Comment 2 Jan Lieskovsky 2008-12-09 12:38:42 UTC
Statement:

This issue has been addressed in Red Hat Enterprise Linux 4 via RHSA-2011:0261 advisory. This issue has been addressed in Red Hat Enterprise Linux 5 via RHSA-2011:1073 advisory.

Comment 10 errata-xmlrpc 2011-02-16 14:29:58 UTC
This issue has been addressed in following products:

  Red Hat Enterprise Linux 4

Via RHSA-2011:0261 https://rhn.redhat.com/errata/RHSA-2011-0261.html

Comment 15 errata-xmlrpc 2011-07-21 10:37:10 UTC
This issue has been addressed in following products:

  Red Hat Enterprise Linux 5

Via RHSA-2011:1073 https://rhn.redhat.com/errata/RHSA-2011-1073.html

Comment 16 errata-xmlrpc 2011-07-21 12:10:22 UTC
This issue has been addressed in following products:

  Red Hat Enterprise Linux 5

Via RHSA-2011:1073 https://rhn.redhat.com/errata/RHSA-2011-1073.html


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