<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/security, branch v3.2.2</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/security?h=v3.2.2</id>
<link rel='self' href='https://git.amat.us/linux/atom/security?h=v3.2.2'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2012-01-26T00:13:45Z</updated>
<entry>
<title>TOMOYO: Accept \000 as a valid character.</title>
<updated>2012-01-26T00:13:45Z</updated>
<author>
<name>Tetsuo Handa</name>
<email>from-tomoyo-users-en@I-love.SAKURA.ne.jp</email>
</author>
<published>2012-01-15T02:05:59Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f42395415b6b335ddd8c32776d3fa44dae3cdf21'/>
<id>urn:sha1:f42395415b6b335ddd8c32776d3fa44dae3cdf21</id>
<content type='text'>
commit 25add8cf99c9ec8b8dc0acd8b9241e963fc0d29c upstream.

TOMOYO 2.5 in Linux 3.2 and later handles Unix domain socket's address.
Thus, tomoyo_correct_word2() needs to accept \000 as a valid character, or
TOMOYO 2.5 cannot handle Unix domain's abstract socket address.

Reported-by: Steven Allen &lt;steven@stebalien.com&gt;
Signed-off-by: Tetsuo Handa &lt;penguin-kernel@I-love.SAKURA.ne.jp&gt;
Signed-off-by: James Morris &lt;jmorris@namei.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>ima: fix invalid memory reference</title>
<updated>2012-01-26T00:13:21Z</updated>
<author>
<name>Roberto Sassu</name>
<email>roberto.sassu@polito.it</email>
</author>
<published>2011-12-19T14:57:28Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=858452ff4198a85874a7ee97da454d4a5d67938e'/>
<id>urn:sha1:858452ff4198a85874a7ee97da454d4a5d67938e</id>
<content type='text'>
commit 7b7e5916aa2f46e57f8bd8cb89c34620ebfda5da upstream.

Don't free a valid measurement entry on TPM PCR extend failure.

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: free duplicate measurement memory</title>
<updated>2012-01-26T00:13: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://git.amat.us/linux/commit/?id=4483c1f05a5e7ac2b14b735e1db11950010e8f4c'/>
<id>urn:sha1:4483c1f05a5e7ac2b14b735e1db11950010e8f4c</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>security: Fix security_old_inode_init_security() when CONFIG_SECURITY is not set</title>
<updated>2012-01-04T00:12:19Z</updated>
<author>
<name>Jan Kara</name>
<email>jack@suse.cz</email>
</author>
<published>2012-01-03T12:14:29Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=30e053248da178cf6154bb7e950dc8713567e3fa'/>
<id>urn:sha1:30e053248da178cf6154bb7e950dc8713567e3fa</id>
<content type='text'>
Commit 1e39f384bb01 ("evm: fix build problems") makes the stub version
of security_old_inode_init_security() return 0 when CONFIG_SECURITY is
not set.

But that makes callers such as reiserfs_security_init() assume that
security_old_inode_init_security() has set name, value, and len
arguments properly - but security_old_inode_init_security() left them
uninitialized which then results in interesting failures.

Revert security_old_inode_init_security() to the old behavior of
returning EOPNOTSUPP since both callers (reiserfs and ocfs2) handle this
just fine.

[ Also fixed the S_PRIVATE(inode) case of the actual non-stub
  security_old_inode_init_security() function to return EOPNOTSUPP
  for the same reason, as pointed out by Mimi Zohar.

  It got incorrectly changed to match the new function in commit
  fb88c2b6cbb1: "evm: fix security/security_old_init_security return
  code".   - Linus ]

Reported-by: Jorge Bastos &lt;mysql.jorge@decimal.pt&gt;
Acked-by: James Morris &lt;jmorris@namei.org&gt;
Acked-by: Mimi Zohar &lt;zohar@us.ibm.com&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>SELinux: Fix RCU deref check warning in sel_netport_insert()</title>
<updated>2011-12-21T00:28:56Z</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2011-12-13T14:49:04Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=50345f1ea9cda4618d9c26e590a97ecd4bc7ac75'/>
<id>urn:sha1:50345f1ea9cda4618d9c26e590a97ecd4bc7ac75</id>
<content type='text'>
Fix the following bug in sel_netport_insert() where rcu_dereference() should
be rcu_dereference_protected() as sel_netport_lock is held.

===================================================
[ INFO: suspicious rcu_dereference_check() usage. ]
---------------------------------------------------
security/selinux/netport.c:127 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 ossec-rootcheck/3323:
 #0:  (sel_netport_lock){+.....}, at: [&lt;ffffffff8117d775&gt;] sel_netport_sid+0xbb/0x226

stack backtrace:
Pid: 3323, comm: ossec-rootcheck Not tainted 3.1.0-rc8-fsdevel+ #1095
Call Trace:
 [&lt;ffffffff8105cfb7&gt;] lockdep_rcu_dereference+0xa7/0xb0
 [&lt;ffffffff8117d871&gt;] sel_netport_sid+0x1b7/0x226
 [&lt;ffffffff8117d6ba&gt;] ? sel_netport_avc_callback+0xbc/0xbc
 [&lt;ffffffff8117556c&gt;] selinux_socket_bind+0x115/0x230
 [&lt;ffffffff810a5388&gt;] ? might_fault+0x4e/0x9e
 [&lt;ffffffff810a53d1&gt;] ? might_fault+0x97/0x9e
 [&lt;ffffffff81171cf4&gt;] security_socket_bind+0x11/0x13
 [&lt;ffffffff812ba967&gt;] sys_bind+0x56/0x95
 [&lt;ffffffff81380dac&gt;] ? sysret_check+0x27/0x62
 [&lt;ffffffff8105b767&gt;] ? trace_hardirqs_on_caller+0x11e/0x155
 [&lt;ffffffff81076fcd&gt;] ? audit_syscall_entry+0x17b/0x1ae
 [&lt;ffffffff811b5eae&gt;] ? trace_hardirqs_on_thunk+0x3a/0x3f
 [&lt;ffffffff81380d7b&gt;] system_call_fastpath+0x16/0x1b

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Acked-by: Paul Moore &lt;paul@paul-moore.com&gt;
Acked-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Cc: stable@kernel.org
Signed-off-by: James Morris &lt;jmorris@namei.org&gt;
</content>
</entry>
<entry>
<title>evm: prevent racing during tfm allocation</title>
<updated>2011-12-20T15:50:08Z</updated>
<author>
<name>Dmitry Kasatkin</name>
<email>dmitry.kasatkin@intel.com</email>
</author>
<published>2011-12-05T11:17:42Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=97426f985729573cea06e82e271cc3929f1f5f8e'/>
<id>urn:sha1:97426f985729573cea06e82e271cc3929f1f5f8e</id>
<content type='text'>
There is a small chance of racing during tfm allocation.
This patch fixes it.

Signed-off-by: Dmitry Kasatkin &lt;dmitry.kasatkin@intel.com&gt;
Acked-by: Mimi Zohar &lt;zohar@us.ibm.com&gt;
Signed-off-by: James Morris &lt;jmorris@namei.org&gt;
</content>
</entry>
<entry>
<title>evm: key must be set once during initialization</title>
<updated>2011-12-20T15:45:45Z</updated>
<author>
<name>Dmitry Kasatkin</name>
<email>dmitry.kasatkin@intel.com</email>
</author>
<published>2011-12-05T11:17:41Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d21b59451886cb82448302f8d6f9ac87c3bd56cf'/>
<id>urn:sha1:d21b59451886cb82448302f8d6f9ac87c3bd56cf</id>
<content type='text'>
On multi-core systems, setting of the key before every caclculation,
causes invalid HMAC calculation for other tfm users, because internal
state (ipad, opad) can be invalid before set key call returns.
It needs to be set only once during initialization.

Signed-off-by: Dmitry Kasatkin &lt;dmitry.kasatkin@intel.com&gt;
Acked-by: Mimi Zohar &lt;zohar@us.ibm.com&gt;
Signed-off-by: James Morris &lt;jmorris@namei.org&gt;
</content>
</entry>
<entry>
<title>TOMOYO: Fix pathname handling of disconnected paths.</title>
<updated>2011-12-08T21:18:12Z</updated>
<author>
<name>Tetsuo Handa</name>
<email>penguin-kernel@I-love.SAKURA.ne.jp</email>
</author>
<published>2011-12-08T12:24:06Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=1418a3e5ad4d01b1d4abf2c479c50b0cedd59e3f'/>
<id>urn:sha1:1418a3e5ad4d01b1d4abf2c479c50b0cedd59e3f</id>
<content type='text'>
Current tomoyo_realpath_from_path() implementation returns strange pathname
when calculating pathname of a file which belongs to lazy unmounted tree.
Use local pathname rather than strange absolute pathname in that case.

Also, this patch fixes a regression by commit 02125a82 "fix apparmor
dereferencing potentially freed dentry, sanitize __d_path() API".

Signed-off-by: Tetsuo Handa &lt;penguin-kernel@I-love.SAKURA.ne.jp&gt;
Acked-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>fix apparmor dereferencing potentially freed dentry, sanitize __d_path() API</title>
<updated>2011-12-07T04:57:18Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2011-12-05T13:43:34Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=02125a826459a6ad142f8d91c5b6357562f96615'/>
<id>urn:sha1:02125a826459a6ad142f8d91c5b6357562f96615</id>
<content type='text'>
__d_path() API is asking for trouble and in case of apparmor d_namespace_path()
getting just that.  The root cause is that when __d_path() misses the root
it had been told to look for, it stores the location of the most remote ancestor
in *root.  Without grabbing references.  Sure, at the moment of call it had
been pinned down by what we have in *path.  And if we raced with umount -l, we
could have very well stopped at vfsmount/dentry that got freed as soon as
prepend_path() dropped vfsmount_lock.

It is safe to compare these pointers with pre-existing (and known to be still
alive) vfsmount and dentry, as long as all we are asking is "is it the same
address?".  Dereferencing is not safe and apparmor ended up stepping into
that.  d_namespace_path() really wants to examine the place where we stopped,
even if it's not connected to our namespace.  As the result, it looked
at -&gt;d_sb-&gt;s_magic of a dentry that might've been already freed by that point.
All other callers had been careful enough to avoid that, but it's really
a bad interface - it invites that kind of trouble.

The fix is fairly straightforward, even though it's bigger than I'd like:
	* prepend_path() root argument becomes const.
	* __d_path() is never called with NULL/NULL root.  It was a kludge
to start with.  Instead, we have an explicit function - d_absolute_root().
Same as __d_path(), except that it doesn't get root passed and stops where
it stops.  apparmor and tomoyo are using it.
	* __d_path() returns NULL on path outside of root.  The main
caller is show_mountinfo() and that's precisely what we pass root for - to
skip those outside chroot jail.  Those who don't want that can (and do)
use d_path().
	* __d_path() root argument becomes const.  Everyone agrees, I hope.
	* apparmor does *NOT* try to use __d_path() or any of its variants
when it sees that path-&gt;mnt is an internal vfsmount.  In that case it's
definitely not mounted anywhere and dentry_path() is exactly what we want
there.  Handling of sysctl()-triggered weirdness is moved to that place.
	* if apparmor is asked to do pathname relative to chroot jail
and __d_path() tells it we it's not in that jail, the sucker just calls
d_absolute_path() instead.  That's the other remaining caller of __d_path(),
BTW.
        * seq_path_root() does _NOT_ return -ENAMETOOLONG (it's stupid anyway -
the normal seq_file logics will take care of growing the buffer and redoing
the call of -&gt;show() just fine).  However, if it gets path not reachable
from root, it returns SEQ_SKIP.  The only caller adjusted (i.e. stopped
ignoring the return value as it used to do).

Reviewed-by: John Johansen &lt;john.johansen@canonical.com&gt;
ACKed-by: John Johansen &lt;john.johansen@canonical.com&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Cc: stable@vger.kernel.org
</content>
</entry>
<entry>
<title>Merge branch 'encrypted-key-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity into for-linus</title>
<updated>2011-11-18T00:17:23Z</updated>
<author>
<name>James Morris</name>
<email>jmorris@namei.org</email>
</author>
<published>2011-11-18T00:17:23Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b85c804d5ad48f239871b95afbddd84422e06f25'/>
<id>urn:sha1:b85c804d5ad48f239871b95afbddd84422e06f25</id>
<content type='text'>
</content>
</entry>
</feed>
