<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/security, branch v2.6.36-rc5</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/security?h=v2.6.36-rc5</id>
<link rel='self' href='https://git.amat.us/linux/atom/security?h=v2.6.36-rc5'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2010-09-10T14:30:00Z</updated>
<entry>
<title>KEYS: Fix bug in keyctl_session_to_parent() if parent has no session keyring</title>
<updated>2010-09-10T14:30:00Z</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2010-09-10T08:59:51Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3d96406c7da1ed5811ea52a3b0905f4f0e295376'/>
<id>urn:sha1:3d96406c7da1ed5811ea52a3b0905f4f0e295376</id>
<content type='text'>
Fix a bug in keyctl_session_to_parent() whereby it tries to check the ownership
of the parent process's session keyring whether or not the parent has a session
keyring [CVE-2010-2960].

This results in the following oops:

  BUG: unable to handle kernel NULL pointer dereference at 00000000000000a0
  IP: [&lt;ffffffff811ae4dd&gt;] keyctl_session_to_parent+0x251/0x443
  ...
  Call Trace:
   [&lt;ffffffff811ae2f3&gt;] ? keyctl_session_to_parent+0x67/0x443
   [&lt;ffffffff8109d286&gt;] ? __do_fault+0x24b/0x3d0
   [&lt;ffffffff811af98c&gt;] sys_keyctl+0xb4/0xb8
   [&lt;ffffffff81001eab&gt;] system_call_fastpath+0x16/0x1b

if the parent process has no session keyring.

If the system is using pam_keyinit then it mostly protected against this as all
processes derived from a login will have inherited the session keyring created
by pam_keyinit during the log in procedure.

To test this, pam_keyinit calls need to be commented out in /etc/pam.d/.

Reported-by: Tavis Ormandy &lt;taviso@cmpxchg8b.com&gt;
Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Acked-by: Tavis Ormandy &lt;taviso@cmpxchg8b.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>KEYS: Fix RCU no-lock warning in keyctl_session_to_parent()</title>
<updated>2010-09-10T14:30:00Z</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2010-09-10T08:59:46Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=9d1ac65a9698513d00e5608d93fca0c53f536c14'/>
<id>urn:sha1:9d1ac65a9698513d00e5608d93fca0c53f536c14</id>
<content type='text'>
There's an protected access to the parent process's credentials in the middle
of keyctl_session_to_parent().  This results in the following RCU warning:

  ===================================================
  [ INFO: suspicious rcu_dereference_check() usage. ]
  ---------------------------------------------------
  security/keys/keyctl.c:1291 invoked rcu_dereference_check() without protection!

  other info that might help us debug this:

  rcu_scheduler_active = 1, debug_locks = 0
  1 lock held by keyctl-session-/2137:
   #0:  (tasklist_lock){.+.+..}, at: [&lt;ffffffff811ae2ec&gt;] keyctl_session_to_parent+0x60/0x236

  stack backtrace:
  Pid: 2137, comm: keyctl-session- Not tainted 2.6.36-rc2-cachefs+ #1
  Call Trace:
   [&lt;ffffffff8105606a&gt;] lockdep_rcu_dereference+0xaa/0xb3
   [&lt;ffffffff811ae379&gt;] keyctl_session_to_parent+0xed/0x236
   [&lt;ffffffff811af77e&gt;] sys_keyctl+0xb4/0xb6
   [&lt;ffffffff81001eab&gt;] system_call_fastpath+0x16/0x1b

The code should take the RCU read lock to make sure the parents credentials
don't go away, even though it's holding a spinlock and has IRQ disabled.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>ima: always maintain counters</title>
<updated>2010-09-07T23:51:41Z</updated>
<author>
<name>Mimi Zohar</name>
<email>zohar@linux.vnet.ibm.com</email>
</author>
<published>2010-08-31T13:38:51Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e950598d43dce8d97e7d5270808393425d1e5cbd'/>
<id>urn:sha1:e950598d43dce8d97e7d5270808393425d1e5cbd</id>
<content type='text'>
commit 8262bb85da allocated the inode integrity struct (iint) before any
inodes were created. Only after IMA was initialized in late_initcall were
the counters updated. This patch updates the counters, whether or not IMA
has been initialized, to resolve 'imbalance' messages.

This patch fixes the bug as reported in bugzilla: 15673.  When the i915
is builtin, the ring_buffer is initialized before IMA, causing the
imbalance message on suspend.

Reported-by: Thomas Meyer &lt;thomas@m3y3r.de&gt;
Signed-off-by: Mimi Zohar &lt;zohar@linux.vnet.ibm.com&gt;
Tested-by: Thomas Meyer &lt;thomas@m3y3r.de&gt;
Tested-by: David Safford&lt;safford@watson.ibm.com&gt;
Cc: Stable Kernel &lt;stable@kernel.org&gt;
Signed-off-by: James Morris &lt;jmorris@namei.org&gt;
</content>
</entry>
<entry>
<title>AppArmor: Fix locking from removal of profile namespace</title>
<updated>2010-09-07T23:19:34Z</updated>
<author>
<name>John Johansen</name>
<email>john.johansen@canonical.com</email>
</author>
<published>2010-08-28T01:33:29Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=999b4f0aa2314b76857775334cb94bafa053db64'/>
<id>urn:sha1:999b4f0aa2314b76857775334cb94bafa053db64</id>
<content type='text'>
The locking for profile namespace removal is wrong, when removing a
profile namespace, it needs to be removed from its parent's list.
Lock the parent of namespace list instead of the namespace being removed.

Signed-off-by: John Johansen &lt;john.johansen@canonical.com&gt;
Signed-off-by: James Morris &lt;jmorris@namei.org&gt;
</content>
</entry>
<entry>
<title>AppArmor: Fix splitting an fqname into separate namespace and profile names</title>
<updated>2010-09-07T23:19:31Z</updated>
<author>
<name>John Johansen</name>
<email>john.johansen@canonical.com</email>
</author>
<published>2010-08-28T01:33:28Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=04ccd53f09741c4bc54ab36db000bc1383e4812e'/>
<id>urn:sha1:04ccd53f09741c4bc54ab36db000bc1383e4812e</id>
<content type='text'>
As per Dan Carpenter &lt;error27@gmail.com&gt;
  If we have a ns name without a following profile then in the original
  code it did "*ns_name = &amp;name[1];".  "name" is NULL so "*ns_name" is
  0x1.  That isn't useful and could cause an oops when this function is
  called from aa_remove_profiles().

Beyond this the assignment of the namespace name was wrong in the case
where the profile name was provided as it was being set to &amp;name[1]
after name  = skip_spaces(split + 1);

Move the ns_name assignment before updating name for the split and
also add skip_spaces, making the interface more robust.

Signed-off-by: John Johansen &lt;john.johansen@canonical.com&gt;
Signed-off-by: James Morris &lt;jmorris@namei.org&gt;
</content>
</entry>
<entry>
<title>AppArmor: Fix security_task_setrlimit logic for 2.6.36 changes</title>
<updated>2010-09-07T23:19:29Z</updated>
<author>
<name>John Johansen</name>
<email>john.johansen@canonical.com</email>
</author>
<published>2010-09-06T17:10:20Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3a2dc8382a3e85a51ed9c6f57ea80665ea7a0c95'/>
<id>urn:sha1:3a2dc8382a3e85a51ed9c6f57ea80665ea7a0c95</id>
<content type='text'>
2.6.36 introduced the abilitiy to specify the task that is having its
rlimits set.  Update mediation to ensure that confined tasks can only
set their own group_leader as expected by current policy.

Add TODO note about extending policy to support setting other tasks
rlimits.

Signed-off-by: John Johansen &lt;john.johansen@canonical.com&gt;
Signed-off-by: James Morris &lt;jmorris@namei.org&gt;
</content>
</entry>
<entry>
<title>AppArmor: Drop hack to remove appended " (deleted)" string</title>
<updated>2010-09-07T23:19:24Z</updated>
<author>
<name>John Johansen</name>
<email>john.johansen@canonical.com</email>
</author>
<published>2010-08-28T01:33:26Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e819ff519b2d74373eca4a9a2b417ebf4c1e1b29'/>
<id>urn:sha1:e819ff519b2d74373eca4a9a2b417ebf4c1e1b29</id>
<content type='text'>
The 2.6.36 kernel has refactored __d_path() so that it no longer appends
" (deleted)" to unlinked paths.  So drop the hack that was used to detect
and remove the appended string.

Signed-off-by: John Johansen &lt;john.johansen@canonical.com&gt;
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/viro/vfs-2.6</title>
<updated>2010-08-18T16:35:08Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2010-08-18T16:35:08Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=145c3ae46b37993b0debb0b3da6256daea4a6ec5'/>
<id>urn:sha1:145c3ae46b37993b0debb0b3da6256daea4a6ec5</id>
<content type='text'>
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6:
  fs: brlock vfsmount_lock
  fs: scale files_lock
  lglock: introduce special lglock and brlock spin locks
  tty: fix fu_list abuse
  fs: cleanup files_lock locking
  fs: remove extra lookup in __lookup_hash
  fs: fs_struct rwlock to spinlock
  apparmor: use task path helpers
  fs: dentry allocation consolidation
  fs: fix do_lookup false negative
  mbcache: Limit the maximum number of cache entries
  hostfs -&gt;follow_link() braino
  hostfs: dumb (and usually harmless) tpyo - strncpy instead of strlcpy
  remove SWRITE* I/O types
  kill BH_Ordered flag
  vfs: update ctime when changing the file's permission by setfacl
  cramfs: only unlock new inodes
  fix reiserfs_evict_inode end_writeback second call
</content>
</entry>
<entry>
<title>tty: fix fu_list abuse</title>
<updated>2010-08-18T12:35:47Z</updated>
<author>
<name>Nick Piggin</name>
<email>npiggin@kernel.dk</email>
</author>
<published>2010-08-17T18:37:36Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d996b62a8df1d935b01319bf8defb95b5709f7b8'/>
<id>urn:sha1:d996b62a8df1d935b01319bf8defb95b5709f7b8</id>
<content type='text'>
tty: fix fu_list abuse

tty code abuses fu_list, which causes a bug in remount,ro handling.

If a tty device node is opened on a filesystem, then the last link to the inode
removed, the filesystem will be allowed to be remounted readonly. This is
because fs_may_remount_ro does not find the 0 link tty inode on the file sb
list (because the tty code incorrectly removed it to use for its own purpose).
This can result in a filesystem with errors after it is marked "clean".

Taking idea from Christoph's initial patch, allocate a tty private struct
at file-&gt;private_data and put our required list fields in there, linking
file and tty. This makes tty nodes behave the same way as other device nodes
and avoid meddling with the vfs, and avoids this bug.

The error handling is not trivial in the tty code, so for this bugfix, I take
the simple approach of using __GFP_NOFAIL and don't worry about memory errors.
This is not a problem because our allocator doesn't fail small allocs as a rule
anyway. So proper error handling is left as an exercise for tty hackers.

[ Arguably filesystem's device inode would ideally be divorced from the
driver's pseudo inode when it is opened, but in practice it's not clear whether
that will ever be worth implementing. ]

Cc: linux-kernel@vger.kernel.org
Cc: Christoph Hellwig &lt;hch@infradead.org&gt;
Cc: Alan Cox &lt;alan@lxorguk.ukuu.org.uk&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
Signed-off-by: Nick Piggin &lt;npiggin@kernel.dk&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>fs: cleanup files_lock locking</title>
<updated>2010-08-18T12:35:47Z</updated>
<author>
<name>Nick Piggin</name>
<email>npiggin@kernel.dk</email>
</author>
<published>2010-08-17T18:37:35Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ee2ffa0dfdd2db19705f2ba1c6a4c0bfe8122dd8'/>
<id>urn:sha1:ee2ffa0dfdd2db19705f2ba1c6a4c0bfe8122dd8</id>
<content type='text'>
fs: cleanup files_lock locking

Lock tty_files with a new spinlock, tty_files_lock; provide helpers to
manipulate the per-sb files list; unexport the files_lock spinlock.

Cc: linux-kernel@vger.kernel.org
Cc: Christoph Hellwig &lt;hch@infradead.org&gt;
Cc: Alan Cox &lt;alan@lxorguk.ukuu.org.uk&gt;
Acked-by: Andi Kleen &lt;ak@linux.intel.com&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
Signed-off-by: Nick Piggin &lt;npiggin@kernel.dk&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
</feed>
