As noted in the SUSE bug report [1], numerous /tmp race conditions exist in ppc64-diag, in particular: rtas_errd/diag_support.c:233: char command[]="/usr/bin/find /proc/device-tree -name status -print > /tmp/get_dt_files"; rtas_errd/diag_support.c:241: fp1 = fopen("/tmp/get_dt_files", "r"); rtas_errd/prrn_hotplug:8:TMPFILE=`mktemp -p /tmp` scripts/ppc64_diag_mkrsrc:126:mkdir "/tmp/diagSEsnap", 0775; scripts/ppc64_diag_mkrsrc:127:$general_eed_file = "/tmp/diagSEsnap/snapH.tar.gz"; In the case of rtas_errd/prrn_hotplug, mktemp is used but is assumed to have succeeded; there is no check for the return value. mktemp should probably be used properly in all of these. I don't know if the data in /tmp/diagSEsnap is sensitive or not, but if it is, the permissions on that directory should probably be tightened up. No CVE(s) have been assigned to these issues as of yet. [1] https://bugzilla.novell.com/show_bug.cgi?id=882667
MITRE assigned the following CVEs to these issues: Common Vulnerabilities and Exposures assigned an identifier CVE-2014-4038 to the following vulnerability: Name: CVE-2014-4038 URL: http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-4038 Assigned: 20140612 Reference: http://openwall.com/lists/oss-security/2014/06/17/1 Reference: https://bugzilla.novell.com/show_bug.cgi?id=882667 Reference: https://bugzilla.redhat.com/show_bug.cgi?id=1109371 ppc64-diag 2.6.1 allows local users to overwrite arbitrary files via a symlink attack related to (1) rtas_errd/diag_support.c and /tmp/get_dt_files, (2) scripts/ppc64_diag_mkrsrc and /tmp/diagSEsnap/snapH.tar.gz, or (3) lpd/test/lpd_ela_test.sh and /var/tmp/ras. Common Vulnerabilities and Exposures assigned an identifier CVE-2014-4039 to the following vulnerability: Name: CVE-2014-4039 URL: http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-4039 Assigned: 20140612 Reference: http://openwall.com/lists/oss-security/2014/06/17/1 Reference: https://bugzilla.redhat.com/show_bug.cgi?id=1109371 ppc64-diag 2.6.1 uses 0775 permissions for /tmp/diagSEsnap and does not properly restrict permissions for /tmp/diagSEsnap/snapH.tar.gz, which allows local users to obtain sensitive information by reading files in this archive, as demonstrated by /var/log/messages and /etc/yaboot.conf.
Statement: (none)
This issue has been addressed in the following products: Red Hat Enterprise Linux 7 Via RHSA-2015:0383 https://rhn.redhat.com/errata/RHSA-2015-0383.html
This issue has been addressed in the following products: Red Hat Enterprise Linux 6 Via RHSA-2015:1320 https://rhn.redhat.com/errata/RHSA-2015-1320.html