<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/security, branch v2.6.32</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v2.6.32</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v2.6.32'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2009-11-18T21:42:01Z</updated>
<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://git.shady.money/linux/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>KEYS: get_instantiation_keyring() should inc the keyring refcount in all cases</title>
<updated>2009-10-15T22:19:58Z</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2009-10-15T09:14:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=21279cfa107af07ef985539ac0de2152b9cba5f5'/>
<id>urn:sha1:21279cfa107af07ef985539ac0de2152b9cba5f5</id>
<content type='text'>
The destination keyring specified to request_key() and co. is made available to
the process that instantiates the key (the slave process started by
/sbin/request-key typically).  This is passed in the request_key_auth struct as
the dest_keyring member.

keyctl_instantiate_key and keyctl_negate_key() call get_instantiation_keyring()
to get the keyring to attach the newly constructed key to at the end of
instantiation.  This may be given a specific keyring into which a link will be
made later, or it may be asked to find the keyring passed to request_key().  In
the former case, it returns a keyring with the refcount incremented by
lookup_user_key(); in the latter case, it returns the keyring from the
request_key_auth struct - and does _not_ increment the refcount.

The latter case will eventually result in an oops when the keyring prematurely
runs out of references and gets destroyed.  The effect may take some time to
show up as the key is destroyed lazily.

To fix this, the keyring returned by get_instantiation_keyring() must always
have its refcount incremented, no matter where it comes from.

This can be tested by setting /etc/request-key.conf to:

#OP	TYPE	DESCRIPTION	CALLOUT INFO	PROGRAM ARG1 ARG2 ARG3 ...
#======	=======	===============	===============	===============================
create  *	test:*		*		|/bin/false %u %g %d %{user:_display}
negate	*	*		*		/bin/keyctl negate %k 10 @u

and then doing:

	keyctl add user _display aaaaaaaa @u
        while keyctl request2 user test:x test:x @u &amp;&amp;
        keyctl list @u;
        do
                keyctl request2 user test:x test:x @u;
                sleep 31;
                keyctl list @u;
        done

which will oops eventually.  Changing the negate line to have @u rather than
%S at the end is important as that forces the latter case by passing a special
keyring ID rather than an actual keyring ID.

Reported-by: Alexander Zangerl &lt;az@bond.edu.au&gt;
Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Tested-by: Alexander Zangerl &lt;az@bond.edu.au&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.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://git.shady.money/linux/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>Merge git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current</title>
<updated>2009-09-24T15:31:04Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2009-09-24T15:31:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6d39b27f0ac7e805ae3bd9efa51d7da04bec0360'/>
<id>urn:sha1:6d39b27f0ac7e805ae3bd9efa51d7da04bec0360</id>
<content type='text'>
* git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current:
  lsm: Use a compressed IPv6 string format in audit events
  Audit: send signal info if selinux is disabled
  Audit: rearrange audit_context to save 16 bytes per struct
  Audit: reorganize struct audit_watch to save 8 bytes
</content>
</entry>
<entry>
<title>sysctl: remove "struct file *" argument of -&gt;proc_handler</title>
<updated>2009-09-24T14:21:04Z</updated>
<author>
<name>Alexey Dobriyan</name>
<email>adobriyan@gmail.com</email>
</author>
<published>2009-09-23T22:57:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8d65af789f3e2cf4cfbdbf71a0f7a61ebcd41d38'/>
<id>urn:sha1:8d65af789f3e2cf4cfbdbf71a0f7a61ebcd41d38</id>
<content type='text'>
It's unused.

It isn't needed -- read or write flag is already passed and sysctl
shouldn't care about the rest.

It _was_ used in two places at arch/frv for some reason.

Signed-off-by: Alexey Dobriyan &lt;adobriyan@gmail.com&gt;
Cc: David Howells &lt;dhowells@redhat.com&gt;
Cc: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Cc: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Cc: Ralf Baechle &lt;ralf@linux-mips.org&gt;
Cc: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: "David S. Miller" &lt;davem@davemloft.net&gt;
Cc: James Morris &lt;jmorris@namei.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>do_wait() wakeup optimization: change __wake_up_parent() to use filtered wakeup</title>
<updated>2009-09-24T14:20:59Z</updated>
<author>
<name>Oleg Nesterov</name>
<email>oleg@redhat.com</email>
</author>
<published>2009-09-23T22:56:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0b7570e77f7c3abd43107dabc47ea89daf9a1cba'/>
<id>urn:sha1:0b7570e77f7c3abd43107dabc47ea89daf9a1cba</id>
<content type='text'>
Ratan Nalumasu reported that in a process with many threads doing
unnecessary wakeups.  Every waiting thread in the process wakes up to loop
through the children and see that the only ones it cares about are still
not ready.

Now that we have struct wait_opts we can change do_wait/__wake_up_parent
to use filtered wakeups.

We can make child_wait_callback() more clever later, right now it only
checks eligible_child().

Signed-off-by: Oleg Nesterov &lt;oleg@redhat.com&gt;
Acked-by: Roland McGrath &lt;roland@redhat.com&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Ratan Nalumasu &lt;rnalumasu@gmail.com&gt;
Cc: Vitaly Mayatskikh &lt;vmayatsk@redhat.com&gt;
Acked-by: James Morris &lt;jmorris@namei.org&gt;
Tested-by: Valdis Kletnieks &lt;valdis.kletnieks@vt.edu&gt;
Acked-by: David Howells &lt;dhowells@redhat.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>cgroups: let ss-&gt;can_attach and ss-&gt;attach do whole threadgroups at a time</title>
<updated>2009-09-24T14:20:58Z</updated>
<author>
<name>Ben Blum</name>
<email>bblum@google.com</email>
</author>
<published>2009-09-23T22:56:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=be367d09927023d081f9199665c8500f69f14d22'/>
<id>urn:sha1:be367d09927023d081f9199665c8500f69f14d22</id>
<content type='text'>
Alter the ss-&gt;can_attach and ss-&gt;attach functions to be able to deal with
a whole threadgroup at a time, for use in cgroup_attach_proc.  (This is a
pre-patch to cgroup-procs-writable.patch.)

Currently, new mode of the attach function can only tell the subsystem
about the old cgroup of the threadgroup leader.  No subsystem currently
needs that information for each thread that's being moved, but if one were
to be added (for example, one that counts tasks within a group) this bit
would need to be reworked a bit to tell the subsystem the right
information.

[hidave.darkstar@gmail.com: fix build]
Signed-off-by: Ben Blum &lt;bblum@google.com&gt;
Signed-off-by: Paul Menage &lt;menage@google.com&gt;
Acked-by: Li Zefan &lt;lizf@cn.fujitsu.com&gt;
Reviewed-by: Matt Helsley &lt;matthltc@us.ibm.com&gt;
Cc: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Cc: Oleg Nesterov &lt;oleg@redhat.com&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Dave Young &lt;hidave.darkstar@gmail.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>lsm: Use a compressed IPv6 string format in audit events</title>
<updated>2009-09-24T07:50:26Z</updated>
<author>
<name>Paul Moore</name>
<email>paul.moore@hp.com</email>
</author>
<published>2009-09-23T17:46:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d81165919ebf6e1cb9eeb612150f9287ad414659'/>
<id>urn:sha1:d81165919ebf6e1cb9eeb612150f9287ad414659</id>
<content type='text'>
Currently the audit subsystem prints uncompressed IPv6 addresses which not
only differs from common usage but also results in ridiculously large audit
strings which is not a good thing.  This patch fixes this by simply converting
audit to always print compressed IPv6 addresses.

Old message example:

 audit(1253576792.161:30): avc:  denied  { ingress } for
  saddr=0000:0000:0000:0000:0000:0000:0000:0001 src=5000
  daddr=0000:0000:0000:0000:0000:0000:0000:0001 dest=35502 netif=lo
  scontext=system_u:object_r:unlabeled_t:s15:c0.c1023
  tcontext=system_u:object_r:lo_netif_t:s0-s15:c0.c1023 tclass=netif

New message example:

 audit(1253576792.161:30): avc:  denied  { ingress } for
  saddr=::1 src=5000 daddr=::1 dest=35502 netif=lo
  scontext=system_u:object_r:unlabeled_t:s15:c0.c1023
  tcontext=system_u:object_r:lo_netif_t:s0-s15:c0.c1023 tclass=netif

Signed-off-by: Paul Moore &lt;paul.moore@hp.com&gt;
Signed-off-by: Eric Paris &lt;eparis@redhat.com&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&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-09-23T22:18:57Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2009-09-23T22:18:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c82ffab9a857f8286ed2b559624b7005a367b638'/>
<id>urn:sha1:c82ffab9a857f8286ed2b559624b7005a367b638</id>
<content type='text'>
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6:
  SELinux: do not destroy the avc_cache_nodep
  KEYS: Have the garbage collector set its timer for live expired keys
  tpm-fixup-pcrs-sysfs-file-update
  creds_are_invalid() needs to be exported for use by modules:
  include/linux/cred.h: fix build

Fix trivial BUILD_BUG_ON-induced conflicts in drivers/char/tpm/tpm.c
</content>
</entry>
<entry>
<title>SELinux: do not destroy the avc_cache_nodep</title>
<updated>2009-09-23T18:16:20Z</updated>
<author>
<name>Eric Paris</name>
<email>eparis@redhat.com</email>
</author>
<published>2009-09-21T01:21:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5224ee086321fec78970e2f2805892d2b34e8957'/>
<id>urn:sha1:5224ee086321fec78970e2f2805892d2b34e8957</id>
<content type='text'>
The security_ops reset done when SELinux is disabled at run time is done
after the avc cache is freed and after the kmem_cache for the avc is also
freed.  This means that between the time the selinux disable code destroys
the avc_node_cachep another process could make a security request and could
try to allocate from the cache.  We are just going to leave the cachep around,
like we always have.

SELinux:  Disabled at runtime.
BUG: unable to handle kernel NULL pointer dereference at (null)
IP: [&lt;ffffffff81122537&gt;] kmem_cache_alloc+0x9a/0x185
PGD 0
Oops: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC
last sysfs file:
CPU 1
Modules linked in:
Pid: 12, comm: khelper Not tainted 2.6.31-tip-05525-g0eeacc6-dirty #14819
System Product Name
RIP: 0010:[&lt;ffffffff81122537&gt;]  [&lt;ffffffff81122537&gt;]
kmem_cache_alloc+0x9a/0x185
RSP: 0018:ffff88003f9258b0  EFLAGS: 00010086
RAX: 0000000000000001 RBX: 0000000000000000 RCX: 0000000078c0129e
RDX: 0000000000000000 RSI: ffffffff8130b626 RDI: ffffffff81122528
RBP: ffff88003f925900 R08: 0000000078c0129e R09: 0000000000000001
R10: 0000000000000000 R11: 0000000078c0129e R12: 0000000000000246
R13: 0000000000008020 R14: ffff88003f8586d8 R15: 0000000000000001
FS:  0000000000000000(0000) GS:ffff880002b00000(0000)
knlGS:0000000000000000
CS:  0010 DS: 0018 ES: 0018 CR0: 000000008005003b
CR2: 0000000000000000 CR3: 0000000001001000 CR4: 00000000000006e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: ffffffff827bd420 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process khelper (pid: 12, threadinfo ffff88003f924000, task
ffff88003f928000)
Stack:
 0000000000000246 0000802000000246 ffffffff8130b626 0000000000000001
&lt;0&gt; 0000000078c0129e 0000000000000000 ffff88003f925a70 0000000000000002
&lt;0&gt; 0000000000000001 0000000000000001 ffff88003f925960 ffffffff8130b626
Call Trace:
 [&lt;ffffffff8130b626&gt;] ? avc_alloc_node+0x36/0x273
 [&lt;ffffffff8130b626&gt;] avc_alloc_node+0x36/0x273
 [&lt;ffffffff8130b545&gt;] ? avc_latest_notif_update+0x7d/0x9e
 [&lt;ffffffff8130b8b4&gt;] avc_insert+0x51/0x18d
 [&lt;ffffffff8130bcce&gt;] avc_has_perm_noaudit+0x9d/0x128
 [&lt;ffffffff8130bf20&gt;] avc_has_perm+0x45/0x88
 [&lt;ffffffff8130f99d&gt;] current_has_perm+0x52/0x6d
 [&lt;ffffffff8130fbb2&gt;] selinux_task_create+0x2f/0x45
 [&lt;ffffffff81303bf7&gt;] security_task_create+0x29/0x3f
 [&lt;ffffffff8105c6ba&gt;] copy_process+0x82/0xdf0
 [&lt;ffffffff81091578&gt;] ? register_lock_class+0x2f/0x36c
 [&lt;ffffffff81091a13&gt;] ? mark_lock+0x2e/0x1e1
 [&lt;ffffffff8105d596&gt;] do_fork+0x16e/0x382
 [&lt;ffffffff81091578&gt;] ? register_lock_class+0x2f/0x36c
 [&lt;ffffffff810d9166&gt;] ? probe_workqueue_execution+0x57/0xf9
 [&lt;ffffffff81091a13&gt;] ? mark_lock+0x2e/0x1e1
 [&lt;ffffffff810d9166&gt;] ? probe_workqueue_execution+0x57/0xf9
 [&lt;ffffffff8100cdb2&gt;] kernel_thread+0x82/0xe0
 [&lt;ffffffff81078b1f&gt;] ? ____call_usermodehelper+0x0/0x139
 [&lt;ffffffff8100ce10&gt;] ? child_rip+0x0/0x20
 [&lt;ffffffff81078aea&gt;] ? __call_usermodehelper+0x65/0x9a
 [&lt;ffffffff8107a5c7&gt;] run_workqueue+0x171/0x27e
 [&lt;ffffffff8107a573&gt;] ? run_workqueue+0x11d/0x27e
 [&lt;ffffffff81078a85&gt;] ? __call_usermodehelper+0x0/0x9a
 [&lt;ffffffff8107a7bc&gt;] worker_thread+0xe8/0x10f
 [&lt;ffffffff810808e2&gt;] ? autoremove_wake_function+0x0/0x63
 [&lt;ffffffff8107a6d4&gt;] ? worker_thread+0x0/0x10f
 [&lt;ffffffff8108042e&gt;] kthread+0x91/0x99
 [&lt;ffffffff8100ce1a&gt;] child_rip+0xa/0x20
 [&lt;ffffffff8100c754&gt;] ? restore_args+0x0/0x30
 [&lt;ffffffff8108039d&gt;] ? kthread+0x0/0x99
 [&lt;ffffffff8100ce10&gt;] ? child_rip+0x0/0x20
Code: 0f 85 99 00 00 00 9c 58 66 66 90 66 90 49 89 c4 fa 66 66 90 66 66 90
e8 83 34 fb ff e8 d7 e9 26 00 48 98 49 8b 94 c6 10 01 00 00 &lt;48&gt; 8b 1a 44
8b 7a 18 48 85 db 74 0f 8b 42 14 48 8b 04 c3 ff 42
RIP  [&lt;ffffffff81122537&gt;] kmem_cache_alloc+0x9a/0x185
 RSP &lt;ffff88003f9258b0&gt;
CR2: 0000000000000000
---[ end trace 42f41a982344e606 ]---

Reported-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Eric Paris &lt;eparis@redhat.com&gt;
Signed-off-by: James Morris &lt;jmorris@namei.org&gt;
</content>
</entry>
</feed>
