Bug 1104999 (CVE-2014-3982, CVE-2014-3986) - CVE-2014-3982 CVE-2014-3986 lynis: insecure temporary file issues leading to privilege escalation
Summary: CVE-2014-3982 CVE-2014-3986 lynis: insecure temporary file issues leading to ...
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2014-3982, CVE-2014-3986
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
high
high
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1105000 1105001
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-06-05 07:58 UTC by Murray McAllister
Modified: 2019-09-29 13:18 UTC (History)
2 users (show)

Fixed In Version: lynis-1.5.6-1.fc20 lynis-1.5.6-1.el6 lynis-1.5.6-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-02-27 00:53:40 UTC
Embargoed:


Attachments (Terms of Use)

Description Murray McAllister 2014-06-05 07:58:53 UTC
It was reported[1] lynis, a security auditing tool, uses a predictable filename in /tmp/. As lynis must be run as root, a local attacker could possibly use this flaw to perform a symbolic link attack and escalate their privileges to root.

The report may be referring to the following:

 39     if [ "${OS}" = "AIX" ]; then
 40         TMPFILE=/tmp/lynis.$$ 

Testing on Fedora 20 revealed /tmp/ffiYFc1nZ  was used across multiple runs; however, this name does not appear in the source and may be related to something else.

[1] http://seclists.org/fulldisclosure/2014/Jun/21

CVE request: http://www.openwall.com/lists/oss-security/2014/06/05/14

Comment 1 Murray McAllister 2014-06-05 07:59:49 UTC
Created lynis tracking bugs for this issue:

Affects: fedora-all [bug 1105000]
Affects: epel-6 [bug 1105001]

Comment 2 Murray McAllister 2014-06-05 08:00:09 UTC
Sorry for the useless bug. Filed trackers in case the maintainers know more...

Comment 3 Murray McAllister 2014-06-10 02:46:11 UTC
MITRE assigned CVE-2014-3982 to the following issue:

if [ "${OS}" = "AIX" ]; then
 TMPFILE=/tmp/lynis.$$

This should not affect Linux.

MITRE also assigned CVE-2014-3986 to the following which does affect Linux:

TMPFILE=`mktemp /tmp/lynis.XXXXXX`
...
find ${I} -name "*.conf" -print >> ${TMPFILE}.unsorted

This is the issue the original report (http://seclists.org/fulldisclosure/2014/Jun/21) refers to.

References:
http://www.openwall.com/lists/oss-security/2014/06/06/12
http://www.openwall.com/lists/oss-security/2014/06/07/3

Comment 4 Murray McAllister 2014-06-10 04:13:28 UTC
These issues were fixed upstream in version 1.5.5:

http://linux-audit.com/lynis-security-notice-154-and-older/

Comment 5 Fedora Update System 2014-06-17 23:32:14 UTC
lynis-1.5.6-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 6 Fedora Update System 2014-07-03 17:56:30 UTC
lynis-1.5.6-1.el6 has been pushed to the Fedora EPEL 6 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.