Bug 1104455 (CVE-2014-0476)

Summary: CVE-2014-0476 chkrootkit: local privilege escalation
Product: [Other] Security Response Reporter: Murray McAllister <mmcallis>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: unspecifiedCC: gwync, jrusnack, manuel.wolfshant, upendra.gandhi, vdanen
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-13 05:40:02 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1104456, 1104457    
Bug Blocks:    

Description Murray McAllister 2014-06-04 04:14:07 UTC
A quoting issue was found in chkrootkit which would lead to a file in /tmp/ being executed, if /tmp/ was mounted without the noexec option. chkrootkit is typically run as the root user. A local attacker could use this flaw to escalate their privileges.

The problematic part was:

file_port=$file_port $i

Which is changed to file_port="$file_port $i" to fix the issue. From the Debian diff:

--- chkrootkit-0.49.orig/debian/patches/CVE-2014-0476.patch
+++ chkrootkit-0.49/debian/patches/CVE-2014-0476.patch
@@ -0,0 +1,13 @@
+Index: chkrootkit/chkrootkit
+===================================================================
+--- chkrootkit.orig/chkrootkit
++++ chkrootkit/chkrootkit
+@@ -117,7 +117,7 @@ slapper (){
+    fi
+    for i in ${SLAPPER_FILES}; do
+       if [ -f ${i} ]; then
+-       file_port=$file_port $i
++       file_port="$file_port $i"
+          STATUS=1
+       fi
+    done

Acknowledgements:

Red Hat would like to thank Thomas Stangner for reporting this issue.

Comment 1 Murray McAllister 2014-06-04 04:15:43 UTC
Created chkrootkit tracking bugs for this issue:

Affects: fedora-all [bug 1104456]
Affects: epel-all [bug 1104457]