<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/security, branch v3.0.10</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/security?h=v3.0.10</id>
<link rel='self' href='https://git.amat.us/linux/atom/security?h=v3.0.10'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2011-11-21T22:31:18Z</updated>
<entry>
<title>KEYS: Fix a NULL pointer deref in the user-defined key type</title>
<updated>2011-11-21T22:31:18Z</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2011-11-15T22:09:45Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=31a05f7dd79da9b4889008847e2a851835c14269'/>
<id>urn:sha1:31a05f7dd79da9b4889008847e2a851835c14269</id>
<content type='text'>
commit 9f35a33b8d06263a165efe3541d9aa0cdbd70b3b upstream.

Fix a NULL pointer deref in the user-defined key type whereby updating a
negative key into a fully instantiated key will cause an oops to occur
when the code attempts to free the non-existent old payload.

This results in an oops that looks something like the following:

  BUG: unable to handle kernel NULL pointer dereference at 0000000000000008
  IP: [&lt;ffffffff81085fa1&gt;] __call_rcu+0x11/0x13e
  PGD 3391d067 PUD 3894a067 PMD 0
  Oops: 0002 [#1] SMP
  CPU 1
  Pid: 4354, comm: keyctl Not tainted 3.1.0-fsdevel+ #1140                  /DG965RY
  RIP: 0010:[&lt;ffffffff81085fa1&gt;]  [&lt;ffffffff81085fa1&gt;] __call_rcu+0x11/0x13e
  RSP: 0018:ffff88003d591df8  EFLAGS: 00010246
  RAX: 0000000000000000 RBX: 0000000000000000 RCX: 000000000000006e
  RDX: ffffffff8161d0c0 RSI: 0000000000000000 RDI: 0000000000000000
  RBP: ffff88003d591e18 R08: 0000000000000000 R09: ffffffff8152fa6c
  R10: 0000000000000000 R11: 0000000000000300 R12: ffff88003b8f9538
  R13: ffffffff8161d0c0 R14: ffff88003b8f9d50 R15: ffff88003c69f908
  FS:  00007f97eb18c720(0000) GS:ffff88003bd00000(0000) knlGS:0000000000000000
  CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
  CR2: 0000000000000008 CR3: 000000003d47a000 CR4: 00000000000006e0
  DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
  DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
  Process keyctl (pid: 4354, threadinfo ffff88003d590000, task ffff88003c78a040)
  Stack:
   ffff88003e0ffde0 ffff88003b8f9538 0000000000000001 ffff88003b8f9d50
   ffff88003d591e28 ffffffff810860f0 ffff88003d591e68 ffffffff8117bfea
   ffff88003d591e68 ffffffff00000000 ffff88003e0ffde1 ffff88003e0ffde0
  Call Trace:
   [&lt;ffffffff810860f0&gt;] call_rcu_sched+0x10/0x12
   [&lt;ffffffff8117bfea&gt;] user_update+0x8d/0xa2
   [&lt;ffffffff8117723a&gt;] key_create_or_update+0x236/0x270
   [&lt;ffffffff811789b1&gt;] sys_add_key+0x123/0x17e
   [&lt;ffffffff813b84bb&gt;] system_call_fastpath+0x16/0x1b

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Acked-by: Jeff Layton &lt;jlayton@redhat.com&gt;
Acked-by: Neil Horman &lt;nhorman@redhat.com&gt;
Acked-by: Steve Dickson &lt;steved@redhat.com&gt;
Acked-by: James Morris &lt;jmorris@namei.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>AppArmor: Fix masking of capabilities in complain mode</title>
<updated>2011-08-05T04:58:42Z</updated>
<author>
<name>John Johansen</name>
<email>john.johansen@canonical.com</email>
</author>
<published>2011-06-25T15:57:07Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=06b943855b6dbcc8cb3cdca954c19711ce7b76b6'/>
<id>urn:sha1:06b943855b6dbcc8cb3cdca954c19711ce7b76b6</id>
<content type='text'>
commit 25e75dff519bcce2cb35023105e7df51d7b9e691 upstream.

AppArmor is masking the capabilities returned by capget against the
capabilities mask in the profile.  This is wrong, in complain mode the
profile has effectively all capabilities, as the profile restrictions are
not being enforced, merely tested against to determine if an access is
known by the profile.

This can result in the wrong behavior of security conscience applications
like sshd which examine their capability set, and change their behavior
accordingly.  In this case because of the masked capability set being
returned sshd fails due to DAC checks, even when the profile is in complain
mode.

Kernels affected: 2.6.36 - 3.0.

Signed-off-by: John Johansen &lt;john.johansen@canonical.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>AppArmor: Fix reference to rcu protected pointer outside of rcu_read_lock</title>
<updated>2011-08-05T04:58:41Z</updated>
<author>
<name>John Johansen</name>
<email>john.johansen@canonical.com</email>
</author>
<published>2011-06-28T14:06:38Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=0635a74b4ab037ed0c6d628d9cc737b949a15731'/>
<id>urn:sha1:0635a74b4ab037ed0c6d628d9cc737b949a15731</id>
<content type='text'>
commit 04fdc099f9c80c7775dbac388fc97e156d4d47e7 upstream.

The pointer returned from tracehook_tracer_task() is only valid inside
the rcu_read_lock.  However the tracer pointer obtained is being passed
to aa_may_ptrace outside of the rcu_read_lock critical section.

Mover the aa_may_ptrace test into the rcu_read_lock critical section, to
fix this.

Kernels affected: 2.6.36 - 3.0

Reported-by: Oleg Nesterov &lt;oleg@redhat.com&gt;
Signed-off-by: John Johansen &lt;john.johansen@canonical.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>KEYS: Fix error handling in construct_key_and_link()</title>
<updated>2011-06-22T01:31:45Z</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2011-06-21T13:32:05Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b1d7dd80aadb9042e83f9778b484a2f92e0b04d4'/>
<id>urn:sha1:b1d7dd80aadb9042e83f9778b484a2f92e0b04d4</id>
<content type='text'>
Fix error handling in construct_key_and_link().

If construct_alloc_key() returns an error, it shouldn't pass out through
the normal path as the key_serial() called by the kleave() statement
will oops when it gets an error code in the pointer:

  BUG: unable to handle kernel paging request at ffffffffffffff84
  IP: [&lt;ffffffff8120b401&gt;] request_key_and_link+0x4d7/0x52f
  ..
  Call Trace:
   [&lt;ffffffff8120b52c&gt;] request_key+0x41/0x75
   [&lt;ffffffffa00ed6e8&gt;] cifs_get_spnego_key+0x206/0x226 [cifs]
   [&lt;ffffffffa00eb0c9&gt;] CIFS_SessSetup+0x511/0x1234 [cifs]
   [&lt;ffffffffa00d9799&gt;] cifs_setup_session+0x90/0x1ae [cifs]
   [&lt;ffffffffa00d9c02&gt;] cifs_get_smb_ses+0x34b/0x40f [cifs]
   [&lt;ffffffffa00d9e05&gt;] cifs_mount+0x13f/0x504 [cifs]
   [&lt;ffffffffa00caabb&gt;] cifs_do_mount+0xc4/0x672 [cifs]
   [&lt;ffffffff8113ae8c&gt;] mount_fs+0x69/0x155
   [&lt;ffffffff8114ff0e&gt;] vfs_kern_mount+0x63/0xa0
   [&lt;ffffffff81150be2&gt;] do_kern_mount+0x4d/0xdf
   [&lt;ffffffff81152278&gt;] do_mount+0x63c/0x69f
   [&lt;ffffffff8115255c&gt;] sys_mount+0x88/0xc2
   [&lt;ffffffff814fbdc2&gt;] system_call_fastpath+0x16/0x1b

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Acked-by: Jeff Layton &lt;jlayton@redhat.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.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>2011-06-21T03:09:15Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2011-06-21T03:09:15Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=36698206504fca9198b8563f1fc2c9e38e063e11'/>
<id>urn:sha1:36698206504fca9198b8563f1fc2c9e38e063e11</id>
<content type='text'>
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6:
  devcgroup_inode_permission: take "is it a device node" checks to inlined wrapper
  fix comment in generic_permission()
  kill obsolete comment for follow_down()
  proc_sys_permission() is OK in RCU mode
  reiserfs_permission() doesn't need to bail out in RCU mode
  proc_fd_permission() is doesn't need to bail out in RCU mode
  nilfs2_permission() doesn't need to bail out in RCU mode
  logfs doesn't need -&gt;permission() at all
  coda_ioctl_permission() is safe in RCU mode
  cifs_permission() doesn't need to bail out in RCU mode
  bad_inode_permission() is safe from RCU mode
  ubifs: dereferencing an ERR_PTR in ubifs_mount()
</content>
</entry>
<entry>
<title>devcgroup_inode_permission: take "is it a device node" checks to inlined wrapper</title>
<updated>2011-06-20T14:46:04Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2011-06-19T17:01:04Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=482e0cd3dbaa70f2a2bead4b5f2c0d203ef654ba'/>
<id>urn:sha1:482e0cd3dbaa70f2a2bead4b5f2c0d203ef654ba</id>
<content type='text'>
inode_permission() calls devcgroup_inode_permission() and almost all such
calls are _not_ for device nodes; let's at least keep the common path
straight...

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>KEYS/DNS: Fix ____call_usermodehelper() to not lose the session keyring</title>
<updated>2011-06-17T16:40:48Z</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2011-06-17T10:25:59Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=879669961b11e7f40b518784863a259f735a72bf'/>
<id>urn:sha1:879669961b11e7f40b518784863a259f735a72bf</id>
<content type='text'>
____call_usermodehelper() now erases any credentials set by the
subprocess_inf::init() function.  The problem is that commit
17f60a7da150 ("capabilites: allow the application of capability limits
to usermode helpers") creates and commits new credentials with
prepare_kernel_cred() after the call to the init() function.  This wipes
all keyrings after umh_keys_init() is called.

The best way to deal with this is to put the init() call just prior to
the commit_creds() call, and pass the cred pointer to init().  That
means that umh_keys_init() and suchlike can modify the credentials
_before_ they are published and potentially in use by the rest of the
system.

This prevents request_key() from working as it is prevented from passing
the session keyring it set up with the authorisation token to
/sbin/request-key, and so the latter can't assume the authority to
instantiate the key.  This causes the in-kernel DNS resolver to fail
with ENOKEY unconditionally.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Acked-by: Eric Paris &lt;eparis@redhat.com&gt;
Tested-by: Jeff Layton &lt;jlayton@redhat.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-linus' of git://git.infradead.org/users/eparis/selinux into for-linus</title>
<updated>2011-06-14T23:41:48Z</updated>
<author>
<name>James Morris</name>
<email>jmorris@namei.org</email>
</author>
<published>2011-06-14T23:41:48Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=82b88bb24e28dd4fb4bec30e75412f41326130f0'/>
<id>urn:sha1:82b88bb24e28dd4fb4bec30e75412f41326130f0</id>
<content type='text'>
</content>
</entry>
<entry>
<title>SELinux: skip file_name_trans_write() when policy downgraded.</title>
<updated>2011-06-14T16:58:51Z</updated>
<author>
<name>Roy.Li</name>
<email>rongqing.li@windriver.com</email>
</author>
<published>2011-05-20T02:38:06Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ded509880f6a0213b09f8ae7bef84acb16eaccbf'/>
<id>urn:sha1:ded509880f6a0213b09f8ae7bef84acb16eaccbf</id>
<content type='text'>
When policy version is less than POLICYDB_VERSION_FILENAME_TRANS,
skip file_name_trans_write().

Signed-off-by: Roy.Li &lt;rongqing.li@windriver.com&gt;
Signed-off-by: Eric Paris &lt;eparis@redhat.com&gt;
</content>
</entry>
<entry>
<title>TOMOYO: Fix oops in tomoyo_mount_acl().</title>
<updated>2011-06-14T05:18:42Z</updated>
<author>
<name>Tetsuo Handa</name>
<email>penguin-kernel@I-love.SAKURA.ne.jp</email>
</author>
<published>2011-06-13T04:49:11Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4e78c724d47e2342aa8fde61f6b8536f662f795f'/>
<id>urn:sha1:4e78c724d47e2342aa8fde61f6b8536f662f795f</id>
<content type='text'>
In tomoyo_mount_acl() since 2.6.36, kern_path() was called without checking
dev_name != NULL. As a result, an unprivileged user can trigger oops by issuing
mount(NULL, "/", "ext3", 0, NULL) request.
Fix this by checking dev_name != NULL before calling kern_path(dev_name).

Signed-off-by: Tetsuo Handa &lt;penguin-kernel@I-love.SAKURA.ne.jp&gt;
Cc: stable@kernel.org
Signed-off-by: James Morris &lt;jmorris@namei.org&gt;
</content>
</entry>
</feed>
