Bug 667912 - (CVE-2011-0006) CVE-2011-0006 kernel: ima: fix add LSM rule bug
CVE-2011-0006 kernel: ima: fix add LSM rule bug
Product: Security Response
Classification: Other
Component: vulnerability (Show other bugs)
All Linux
low Severity low
: ---
: ---
Assigned To: Red Hat Product Security
: Security
Depends On: 667914 667915
  Show dependency treegraph
Reported: 2011-01-07 04:09 EST by Eugene Teo (Security Response)
Modified: 2015-08-19 05:02 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2015-07-29 09:37:14 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Eugene Teo (Security Response) 2011-01-07 04:09:53 EST
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:
      dont_measure fsmagic=0x9fa0
      dont_measure fsmagic=0x62656572
      dont_measure fsmagic=0x64626720
      dont_measure fsmagic=0x01021994
      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:

Introduced in 2.6.30-rc1 4af4662f
Comment 2 Eugene Teo (Security Response) 2011-01-11 03:53:13 EST

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 14:11:29 EDT
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.