Bug 667912 (CVE-2011-0006) - CVE-2011-0006 kernel: ima: fix add LSM rule bug
Summary: CVE-2011-0006 kernel: ima: fix add LSM rule bug
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2011-0006
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:
Whiteboard: public=20110104,reported=20110107,sou...
Depends On: 667914 667915
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-01-07 09:09 UTC by Eugene Teo (Security Response)
Modified: 2019-06-08 18:42 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-07-29 13:37:14 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2011:0498 normal SHIPPED_LIVE Important: kernel security, bug fix, and enhancement update 2011-05-10 18:10:04 UTC

Description Eugene Teo (Security Response) 2011-01-07 09:09:53 UTC
If security_filter_rule_init() doesn't return a rule, then not everything is as fine as the return code implies.
    
This bug only occurs when the LSM (eg. SELinux) is disabled at runtime.    

Adding an empty LSM rule causes ima_match_rules() to always succeed, ignoring any remaining rules.
    
     default IMA TCB policy:
      # PROC_SUPER_MAGIC
      dont_measure fsmagic=0x9fa0
      # SYSFS_MAGIC
      dont_measure fsmagic=0x62656572
      # DEBUGFS_MAGIC
      dont_measure fsmagic=0x64626720
      # TMPFS_MAGIC
      dont_measure fsmagic=0x01021994
      # SECURITYFS_MAGIC
      dont_measure fsmagic=0x73636673
    
      < LSM specific rule >
      dont_measure obj_type=var_log_t
    
      measure func=BPRM_CHECK
      measure func=FILE_MMAP mask=MAY_EXEC
      measure func=FILE_CHECK mask=MAY_READ uid=0
    
Thus without the patch, with the boot parameters 'tcb selinux=0', adding the above 'dont_measure obj_type=var_log_t' rule to the default IMA TCB measurement policy, would result in nothing being measured.  The patch prevents the default TCB policy from being replaced.

Upstream commit:
http://git.kernel.org/linus/867c20265459d30a01b021a9c1e81fb4c5832aa9

Introduced in 2.6.30-rc1 4af4662f

Comment 2 Eugene Teo (Security Response) 2011-01-11 08:53:13 UTC
Statement:

The Linux kernel as shipped with Red Hat Enterprise Linux 4, 5, and Red Hat Enterprise MRG are not affected by this issue. A future kernel update in Red Hat Enterprise Linux 6 may address this flaw.

Comment 4 errata-xmlrpc 2011-05-10 18:11:29 UTC
This issue has been addressed in following products:

  Red Hat Enterprise Linux 6

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


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