<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/security/integrity, branch linux-2.6.32.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-2.6.32.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-2.6.32.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2012-01-25T21:53:20Z</updated>
<entry>
<title>ima: free duplicate measurement memory</title>
<updated>2012-01-25T21:53:20Z</updated>
<author>
<name>Roberto Sassu</name>
<email>roberto.sassu@polito.it</email>
</author>
<published>2011-12-19T14:57:27Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=45d08c973d529ac48022b25ad47e5a7044bff116'/>
<id>urn:sha1:45d08c973d529ac48022b25ad47e5a7044bff116</id>
<content type='text'>
commit 45fae7493970d7c45626ccd96d4a74f5f1eea5a9 upstream.

Info about new measurements are cached in the iint for performance.  When
the inode is flushed from cache, the associated iint is flushed as well.
Subsequent access to the inode will cause the inode to be re-measured and
will attempt to add a duplicate entry to the measurement list.

This patch frees the duplicate measurement memory, fixing a memory leak.

Signed-off-by: Roberto Sassu &lt;roberto.sassu@polito.it&gt;
Signed-off-by: Mimi Zohar &lt;zohar@us.ibm.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>ima: fix add LSM rule bug</title>
<updated>2011-01-07T22:43:17Z</updated>
<author>
<name>Mimi Zohar</name>
<email>zohar@linux.vnet.ibm.com</email>
</author>
<published>2011-01-03T22:59:10Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=a19e760f1664050e4bf31ad3af8a28c308e0ae72'/>
<id>urn:sha1:a19e760f1664050e4bf31ad3af8a28c308e0ae72</id>
<content type='text'>
commit 867c20265459d30a01b021a9c1e81fb4c5832aa9 upstream.

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

  &lt; LSM specific rule &gt;
  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.

Signed-off-by: Mimi Zohar &lt;zohar@us.ibm.com&gt;
Cc: James Morris &lt;jmorris@namei.org&gt;
Acked-by: Serge Hallyn &lt;serge.hallyn@canonical.com&gt;
Cc: David Safford &lt;safford@watson.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>ima: replace GFP_KERNEL with GFP_NOFS</title>
<updated>2009-11-18T21:42:01Z</updated>
<author>
<name>Mimi Zohar</name>
<email>zohar@linux.vnet.ibm.com</email>
</author>
<published>2009-11-18T21:16:06Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=c09c59e6a070d6af05f238f255aea268185273ef'/>
<id>urn:sha1:c09c59e6a070d6af05f238f255aea268185273ef</id>
<content type='text'>
While running fsstress tests on the NFSv4 mounted ext3 and ext4
filesystem, the following call trace was generated on the nfs
server machine.

Replace GFP_KERNEL with GFP_NOFS in ima_iint_insert() to avoid a
potential deadlock.

     =================================
    [ INFO: inconsistent lock state ]
    2.6.31-31.el6.x86_64 #1
    ---------------------------------
    inconsistent {RECLAIM_FS-ON-W} -&gt; {IN-RECLAIM_FS-W} usage.
    kswapd2/75 [HC0[0]:SC0[0]:HE1:SE1] takes:
     (jbd2_handle){+.+.?.}, at: [&lt;ffffffff811edd5e&gt;] jbd2_journal_start+0xfe/0x13f
    {RECLAIM_FS-ON-W} state was registered at:
      [&lt;ffffffff81091e40&gt;] mark_held_locks+0x65/0x99
      [&lt;ffffffff81091f31&gt;] lockdep_trace_alloc+0xbd/0xf5
      [&lt;ffffffff81126fdd&gt;] kmem_cache_alloc+0x40/0x185
      [&lt;ffffffff812344d7&gt;] ima_iint_insert+0x3d/0xf1
      [&lt;ffffffff812345b0&gt;] ima_inode_alloc+0x25/0x44
      [&lt;ffffffff811484ac&gt;] inode_init_always+0xec/0x271
      [&lt;ffffffff81148682&gt;] alloc_inode+0x51/0xa1
      [&lt;ffffffff81148700&gt;] new_inode+0x2e/0x94
      [&lt;ffffffff811b2f08&gt;] ext4_new_inode+0xb8/0xdc9
      [&lt;ffffffff811be611&gt;] ext4_create+0xcf/0x175
      [&lt;ffffffff8113e2cd&gt;] vfs_create+0x82/0xb8
      [&lt;ffffffff8113f337&gt;] do_filp_open+0x32c/0x9ee
      [&lt;ffffffff811309b9&gt;] do_sys_open+0x6c/0x12c
      [&lt;ffffffff81130adc&gt;] sys_open+0x2e/0x44
      [&lt;ffffffff81011e42&gt;] system_call_fastpath+0x16/0x1b
      [&lt;ffffffffffffffff&gt;] 0xffffffffffffffff
    irq event stamp: 90371
    hardirqs last  enabled at (90371): [&lt;ffffffff8112708d&gt;]
    kmem_cache_alloc+0xf0/0x185
    hardirqs last disabled at (90370): [&lt;ffffffff81127026&gt;]
    kmem_cache_alloc+0x89/0x185
    softirqs last  enabled at (89492): [&lt;ffffffff81068ecf&gt;]
    __do_softirq+0x1bf/0x1eb
    softirqs last disabled at (89477): [&lt;ffffffff8101312c&gt;] call_softirq+0x1c/0x30

    other info that might help us debug this:
    2 locks held by kswapd2/75:
     #0:  (shrinker_rwsem){++++..}, at: [&lt;ffffffff810f98ba&gt;] shrink_slab+0x44/0x177
     #1:  (&amp;type-&gt;s_umount_key#25){++++..}, at: [&lt;ffffffff811450ba&gt;]

Reported-by: Muni P. Beerakam &lt;mbeeraka@in.ibm.com&gt;
Reported-by: Amit K. Arora &lt;amitarora@in.ibm.com&gt;
Cc: stable@kernel.org
Signed-off-by: Mimi Zohar &lt;zohar@us.ibm.com&gt;
Signed-off-by: James Morris &lt;jmorris@namei.org&gt;
</content>
</entry>
<entry>
<title>const: constify remaining file_operations</title>
<updated>2009-10-01T23:11:11Z</updated>
<author>
<name>Alexey Dobriyan</name>
<email>adobriyan@gmail.com</email>
</author>
<published>2009-10-01T22:43:56Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=828c09509b9695271bcbdc53e9fc9a6a737148d2'/>
<id>urn:sha1:828c09509b9695271bcbdc53e9fc9a6a737148d2</id>
<content type='text'>
[akpm@linux-foundation.org: fix KVM]
Signed-off-by: Alexey Dobriyan &lt;adobriyan@gmail.com&gt;
Acked-by: Mike Frysinger &lt;vapier@gentoo.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>seq_file: constify seq_operations</title>
<updated>2009-09-23T14:39:29Z</updated>
<author>
<name>James Morris</name>
<email>jmorris@namei.org</email>
</author>
<published>2009-09-22T23:43:43Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=88e9d34c727883d7d6f02cf1475b3ec98b8480c7'/>
<id>urn:sha1:88e9d34c727883d7d6f02cf1475b3ec98b8480c7</id>
<content type='text'>
Make all seq_operations structs const, to help mitigate against
revectoring user-triggerable function pointers.

This is derived from the grsecurity patch, although generated from scratch
because it's simpler than extracting the changes from there.

Signed-off-by: James Morris &lt;jmorris@namei.org&gt;
Acked-by: Serge Hallyn &lt;serue@us.ibm.com&gt;
Acked-by: Casey Schaufler &lt;casey@schaufler-ca.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>IMA: update ima_counts_put</title>
<updated>2009-09-07T01:54:58Z</updated>
<author>
<name>Mimi Zohar</name>
<email>zohar@linux.vnet.ibm.com</email>
</author>
<published>2009-09-04T17:08:46Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=acd0c935178649f72c44ec49ca83bee35ce1f79e'/>
<id>urn:sha1:acd0c935178649f72c44ec49ca83bee35ce1f79e</id>
<content type='text'>
- As ima_counts_put() may be called after the inode has been freed,
verify that the inode is not NULL, before dereferencing it.

- Maintain the IMA file counters in may_open() properly, decrementing
any counter increments on subsequent errors.

Reported-by: Ciprian Docan &lt;docan@eden.rutgers.edu&gt;
Reported-by: J.R. Okajima &lt;hooanon05@yahoo.co.jp&gt;
Signed-off-by: Mimi Zohar &lt;zohar@us.ibm.com&gt;
Acked-by: Eric Paris &lt;eparis@redhat.com
Signed-off-by: James Morris &lt;jmorris@namei.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6</title>
<updated>2009-08-27T03:17:07Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2009-08-27T03:17:07Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=5311034ddda7aad48934520d3536b9d0e4502672'/>
<id>urn:sha1:5311034ddda7aad48934520d3536b9d0e4502672</id>
<content type='text'>
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6:
  IMA: iint put in ima_counts_get and put
</content>
</entry>
<entry>
<title>IMA: iint put in ima_counts_get and put</title>
<updated>2009-08-27T01:01:03Z</updated>
<author>
<name>Eric Paris</name>
<email>eparis@redhat.com</email>
</author>
<published>2009-08-26T18:56:48Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=53a7197aff20e341487fca8575275056fe1c63e5'/>
<id>urn:sha1:53a7197aff20e341487fca8575275056fe1c63e5</id>
<content type='text'>
ima_counts_get() calls ima_iint_find_insert_get() which takes a reference
to the iint in question, but does not put that reference at the end of the
function.  This can lead to a nasty memory leak.  Easy enough to reproduce:

#include &lt;sys/mman.h&gt;
#include &lt;stdio.h&gt;

int main (void)
{
	int i;
	void *ptr;

	for (i=0; i &lt; 100000; i++) {
		ptr = mmap(NULL, 4096, PROT_READ|PROT_WRITE,
			   MAP_SHARED|MAP_ANONYMOUS, -1, 0);
		if (ptr == MAP_FAILED)
			return 2;
		munmap(ptr, 4096);
	}

	return 0;
}

Signed-off-by: Eric Paris &lt;eparis@redhat.com&gt;
Signed-off-by: James Morris &lt;jmorris@namei.org&gt;
</content>
</entry>
<entry>
<title>ima: hashing large files bug fix</title>
<updated>2009-08-24T04:58:29Z</updated>
<author>
<name>Mimi Zohar</name>
<email>zohar@linux.vnet.ibm.com</email>
</author>
<published>2009-08-21T18:32:49Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=16bfa38b1936212428cb38fbfbbb8f6c62b8d81f'/>
<id>urn:sha1:16bfa38b1936212428cb38fbfbbb8f6c62b8d81f</id>
<content type='text'>
Hashing files larger than INT_MAX causes process to loop.
Dependent on redefining kernel_read() offset type to loff_t.

(http://bugzilla.kernel.org/show_bug.cgi?id=13909)

Cc: stable@kernel.org
Signed-off-by: Mimi Zohar &lt;zohar@us.ibm.com&gt;
Signed-off-by: James Morris &lt;jmorris@namei.org&gt;
</content>
</entry>
<entry>
<title>integrity: add ima_counts_put (updated)</title>
<updated>2009-06-28T22:59:10Z</updated>
<author>
<name>Mimi Zohar</name>
<email>zohar@linux.vnet.ibm.com</email>
</author>
<published>2009-06-26T18:05:27Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=94e5d714f604d4cb4cb13163f01ede278e69258b'/>
<id>urn:sha1:94e5d714f604d4cb4cb13163f01ede278e69258b</id>
<content type='text'>
This patch fixes an imbalance message as reported by J.R. Okajima.
The IMA file counters are incremented in ima_path_check. If the
actual open fails, such as ETXTBSY, decrement the counters to
prevent unnecessary imbalance messages.

Reported-by: J.R. Okajima &lt;hooanon05@yahoo.co.jp&gt;
Signed-off-by: Mimi Zohar &lt;zohar@us.ibm.com&gt;
Signed-off-by: James Morris &lt;jmorris@namei.org&gt;
</content>
</entry>
</feed>
