<feed xmlns='http://www.w3.org/2005/Atom'>
<title>litmus-rt.git/security/integrity/ima, branch tracing-devel</title>
<subtitle>The LITMUS^RT kernel.</subtitle>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/litmus-rt.git/'/>
<entry>
<title>ima: replace GFP_KERNEL with GFP_NOFS</title>
<updated>2009-11-18T21:42:01+00:00</updated>
<author>
<name>Mimi Zohar</name>
<email>zohar@linux.vnet.ibm.com</email>
</author>
<published>2009-11-18T21:16:06+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/litmus-rt.git/commit/?id=c09c59e6a070d6af05f238f255aea268185273ef'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</content>
</entry>
<entry>
<title>const: constify remaining file_operations</title>
<updated>2009-10-01T23:11:11+00:00</updated>
<author>
<name>Alexey Dobriyan</name>
<email>adobriyan@gmail.com</email>
</author>
<published>2009-10-01T22:43:56+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/litmus-rt.git/commit/?id=828c09509b9695271bcbdc53e9fc9a6a737148d2'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[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;
</pre>
</div>
</content>
</entry>
<entry>
<title>seq_file: constify seq_operations</title>
<updated>2009-09-23T14:39:29+00:00</updated>
<author>
<name>James Morris</name>
<email>jmorris@namei.org</email>
</author>
<published>2009-09-22T23:43:43+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/litmus-rt.git/commit/?id=88e9d34c727883d7d6f02cf1475b3ec98b8480c7'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</content>
</entry>
<entry>
<title>IMA: update ima_counts_put</title>
<updated>2009-09-07T01:54:58+00:00</updated>
<author>
<name>Mimi Zohar</name>
<email>zohar@linux.vnet.ibm.com</email>
</author>
<published>2009-09-04T17:08:46+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/litmus-rt.git/commit/?id=acd0c935178649f72c44ec49ca83bee35ce1f79e'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- 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;
</pre>
</div>
</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:07+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2009-08-27T03:17:07+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/litmus-rt.git/commit/?id=5311034ddda7aad48934520d3536b9d0e4502672'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* '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
</pre>
</div>
</content>
</entry>
<entry>
<title>IMA: iint put in ima_counts_get and put</title>
<updated>2009-08-27T01:01:03+00:00</updated>
<author>
<name>Eric Paris</name>
<email>eparis@redhat.com</email>
</author>
<published>2009-08-26T18:56:48+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/litmus-rt.git/commit/?id=53a7197aff20e341487fca8575275056fe1c63e5'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</content>
</entry>
<entry>
<title>ima: hashing large files bug fix</title>
<updated>2009-08-24T04:58:29+00:00</updated>
<author>
<name>Mimi Zohar</name>
<email>zohar@linux.vnet.ibm.com</email>
</author>
<published>2009-08-21T18:32:49+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/litmus-rt.git/commit/?id=16bfa38b1936212428cb38fbfbbb8f6c62b8d81f'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</content>
</entry>
<entry>
<title>integrity: add ima_counts_put (updated)</title>
<updated>2009-06-28T22:59:10+00:00</updated>
<author>
<name>Mimi Zohar</name>
<email>zohar@linux.vnet.ibm.com</email>
</author>
<published>2009-06-26T18:05:27+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/litmus-rt.git/commit/?id=94e5d714f604d4cb4cb13163f01ede278e69258b'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</content>
</entry>
<entry>
<title>integrity: ima audit hash_exists fix</title>
<updated>2009-06-28T22:57:49+00:00</updated>
<author>
<name>Mimi Zohar</name>
<email>zohar@linux.vnet.ibm.com</email>
</author>
<published>2009-06-26T15:25:00+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/litmus-rt.git/commit/?id=79b854c549c62c54fa27f87e04465c01db889f8d'/>
<id>79b854c549c62c54fa27f87e04465c01db889f8d</id>
<content type='text'>
Audit the file name, not the template name.

Signed-off-by: Mimi Zohar &lt;zohar@us.ibm.com&gt;
Signed-off-by: James Morris &lt;jmorris@namei.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Audit the file name, not the template name.

Signed-off-by: Mimi Zohar &lt;zohar@us.ibm.com&gt;
Signed-off-by: James Morris &lt;jmorris@namei.org&gt;
</pre>
</div>
</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-06-11T17:01:41+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2009-06-11T17:01:41+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/litmus-rt.git/commit/?id=3296ca27f50ecbd71db1d808c7a72d311027f919'/>
<id>3296ca27f50ecbd71db1d808c7a72d311027f919</id>
<content type='text'>
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6: (44 commits)
  nommu: Provide mmap_min_addr definition.
  TOMOYO: Add description of lists and structures.
  TOMOYO: Remove unused field.
  integrity: ima audit dentry_open failure
  TOMOYO: Remove unused parameter.
  security: use mmap_min_addr indepedently of security models
  TOMOYO: Simplify policy reader.
  TOMOYO: Remove redundant markers.
  SELinux: define audit permissions for audit tree netlink messages
  TOMOYO: Remove unused mutex.
  tomoyo: avoid get+put of task_struct
  smack: Remove redundant initialization.
  integrity: nfsd imbalance bug fix
  rootplug: Remove redundant initialization.
  smack: do not beyond ARRAY_SIZE of data
  integrity: move ima_counts_get
  integrity: path_check update
  IMA: Add __init notation to ima functions
  IMA: Minimal IMA policy and boot param for TCB IMA policy
  selinux: remove obsolete read buffer limit from sel_read_bool
  ...
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6: (44 commits)
  nommu: Provide mmap_min_addr definition.
  TOMOYO: Add description of lists and structures.
  TOMOYO: Remove unused field.
  integrity: ima audit dentry_open failure
  TOMOYO: Remove unused parameter.
  security: use mmap_min_addr indepedently of security models
  TOMOYO: Simplify policy reader.
  TOMOYO: Remove redundant markers.
  SELinux: define audit permissions for audit tree netlink messages
  TOMOYO: Remove unused mutex.
  tomoyo: avoid get+put of task_struct
  smack: Remove redundant initialization.
  integrity: nfsd imbalance bug fix
  rootplug: Remove redundant initialization.
  smack: do not beyond ARRAY_SIZE of data
  integrity: move ima_counts_get
  integrity: path_check update
  IMA: Add __init notation to ima functions
  IMA: Minimal IMA policy and boot param for TCB IMA policy
  selinux: remove obsolete read buffer limit from sel_read_bool
  ...
</pre>
</div>
</content>
</entry>
</feed>
