<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/security, branch v3.18.18</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.18.18</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.18.18'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2015-07-04T03:02:31Z</updated>
<entry>
<title>ima: fix ima_show_template_data_ascii()</title>
<updated>2015-07-04T03:02:31Z</updated>
<author>
<name>Mimi Zohar</name>
<email>zohar@linux.vnet.ibm.com</email>
</author>
<published>2015-06-11T15:54:42Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=cdbbbe19dd7dde385233508367aeec020e089c25'/>
<id>urn:sha1:cdbbbe19dd7dde385233508367aeec020e089c25</id>
<content type='text'>
[ Upstream commit 45b26133b97871896b8c5241d59f4ff7839db7b2 ]

This patch fixes a bug introduced in "4d7aeee ima: define new template
ima-ng and template fields d-ng and n-ng".

Changelog:
- change int to uint32 (Roberto Sassu's suggestion)

Signed-off-by: Mimi Zohar &lt;zohar@linux.vnet.ibm.com&gt;
Signed-off-by: Roberto Sassu &lt;rsassu@suse.de&gt;
Cc: stable@vger.kernel.org # 3.13
Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
</content>
</entry>
<entry>
<title>selinux/nlmsg: add XFRM_MSG_MAPPING</title>
<updated>2015-06-28T17:39:25Z</updated>
<author>
<name>Nicolas Dichtel</name>
<email>nicolas.dichtel@6wind.com</email>
</author>
<published>2015-04-10T14:24:28Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=8db8f8f39c21d93bb50de6a4e12ad1aea21411ef'/>
<id>urn:sha1:8db8f8f39c21d93bb50de6a4e12ad1aea21411ef</id>
<content type='text'>
[ Upstream commit bd2cba07381a6dba60bc1c87ed8b37931d244da1 ]

This command is missing.

Fixes: 3a2dfbe8acb1 ("xfrm: Notify changes in UDP encapsulation via netlink")
CC: Martin Willi &lt;martin@strongswan.org&gt;
Reported-by: Stephen Smalley &lt;sds@tycho.nsa.gov&gt;
Signed-off-by: Nicolas Dichtel &lt;nicolas.dichtel@6wind.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
</content>
</entry>
<entry>
<title>selinux/nlmsg: add XFRM_MSG_MIGRATE</title>
<updated>2015-06-28T17:39:25Z</updated>
<author>
<name>Nicolas Dichtel</name>
<email>nicolas.dichtel@6wind.com</email>
</author>
<published>2015-04-10T14:24:27Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d4c2dc5980c149689974c3c4761f4f33978d20c4'/>
<id>urn:sha1:d4c2dc5980c149689974c3c4761f4f33978d20c4</id>
<content type='text'>
[ Upstream commit 8d465bb777179c4bea731b828ec484088cc9fbc1 ]

This command is missing.

Fixes: 5c79de6e79cd ("[XFRM]: User interface for handling XFRM_MSG_MIGRATE")
Reported-by: Stephen Smalley &lt;sds@tycho.nsa.gov&gt;
Signed-off-by: Nicolas Dichtel &lt;nicolas.dichtel@6wind.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
</content>
</entry>
<entry>
<title>selinux/nlmsg: add XFRM_MSG_REPORT</title>
<updated>2015-06-28T17:39:25Z</updated>
<author>
<name>Nicolas Dichtel</name>
<email>nicolas.dichtel@6wind.com</email>
</author>
<published>2015-04-10T14:24:26Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=9829c06108276253371439db20497efbbf0115a5'/>
<id>urn:sha1:9829c06108276253371439db20497efbbf0115a5</id>
<content type='text'>
[ Upstream commit b0b59b0056acd6f157a04cc895f7e24692fb08aa ]

This command is missing.

Fixes: 97a64b4577ae ("[XFRM]: Introduce XFRM_MSG_REPORT.")
Reported-by: Stephen Smalley &lt;sds@tycho.nsa.gov&gt;
Signed-off-by: Nicolas Dichtel &lt;nicolas.dichtel@6wind.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
</content>
</entry>
<entry>
<title>selinux/nlmsg: add XFRM_MSG_[NEW|GET]SADINFO</title>
<updated>2015-06-28T17:39:24Z</updated>
<author>
<name>Nicolas Dichtel</name>
<email>nicolas.dichtel@6wind.com</email>
</author>
<published>2015-04-08T16:36:42Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=3d5df8d994d3711eeed211cf6897435467ba0442'/>
<id>urn:sha1:3d5df8d994d3711eeed211cf6897435467ba0442</id>
<content type='text'>
[ Upstream commit 5b5800fad072133e4a9c2efbf735baaac83dec86 ]

These commands are missing.

Fixes: 28d8909bc790 ("[XFRM]: Export SAD info.")
Signed-off-by: Nicolas Dichtel &lt;nicolas.dichtel@6wind.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
</content>
</entry>
<entry>
<title>selinux/nlmsg: add XFRM_MSG_GETSPDINFO</title>
<updated>2015-06-28T17:39:24Z</updated>
<author>
<name>Nicolas Dichtel</name>
<email>nicolas.dichtel@6wind.com</email>
</author>
<published>2015-04-08T16:36:41Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=97cd3676ab52cc5943a19af63c6698639d532b8a'/>
<id>urn:sha1:97cd3676ab52cc5943a19af63c6698639d532b8a</id>
<content type='text'>
[ Upstream commit 5e6deebafb45fb271ae6939d48832e920b8fb74e ]

This command is missing.

Fixes: ecfd6b183780 ("[XFRM]: Export SPD info")
Signed-off-by: Nicolas Dichtel &lt;nicolas.dichtel@6wind.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
</content>
</entry>
<entry>
<title>selinux/nlmsg: add XFRM_MSG_NEWSPDINFO</title>
<updated>2015-06-28T17:39:23Z</updated>
<author>
<name>Nicolas Dichtel</name>
<email>nicolas.dichtel@6wind.com</email>
</author>
<published>2015-04-08T16:36:40Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=a8de6e18a4c53455c9bae9938c7078a55bb9bbe2'/>
<id>urn:sha1:a8de6e18a4c53455c9bae9938c7078a55bb9bbe2</id>
<content type='text'>
[ Upstream commit 2b7834d3e1b828429faa5dc41a480919e52d3f31 ]

This new command is missing.

Fixes: 880a6fab8f6b ("xfrm: configure policy hash table thresholds by netlink")
Reported-by: Christophe Gouault &lt;christophe.gouault@6wind.com&gt;
Signed-off-by: Nicolas Dichtel &lt;nicolas.dichtel@6wind.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
</content>
</entry>
<entry>
<title>selinux: fix sel_write_enforce broken return value</title>
<updated>2015-04-23T03:32:02Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2015-03-24T01:01:35Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=9da02d84fe5007faeb7bf9f1fbca93960ecf192c'/>
<id>urn:sha1:9da02d84fe5007faeb7bf9f1fbca93960ecf192c</id>
<content type='text'>
[ Upstream commit 6436a123a147db51a0b06024a8350f4c230e73ff ]

Return a negative error value like the rest of the entries in this function.

Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Acked-by:  Stephen Smalley &lt;sds@tycho.nsa.gov&gt;
[PM: tweaked subject line]
Signed-off-by: Paul Moore &lt;pmoore@redhat.com&gt;

Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
</content>
</entry>
<entry>
<title>smack: fix possible use after frees in task_security() callers</title>
<updated>2015-03-06T22:52:59Z</updated>
<author>
<name>Andrey Ryabinin</name>
<email>a.ryabinin@samsung.com</email>
</author>
<published>2015-01-13T15:52:40Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=3ddf67db2e23d693c506b34fe7d81c7655cf5fcc'/>
<id>urn:sha1:3ddf67db2e23d693c506b34fe7d81c7655cf5fcc</id>
<content type='text'>
commit 6d1cff2a885850b78b40c34777b46cf5da5d1050 upstream.

We hit use after free on dereferncing pointer to task_smack struct in
smk_of_task() called from smack_task_to_inode().

task_security() macro uses task_cred_xxx() to get pointer to the task_smack.
task_cred_xxx() could be used only for non-pointer members of task's
credentials. It cannot be used for pointer members since what they point
to may disapper after dropping RCU read lock.

Mainly task_security() used this way:
	smk_of_task(task_security(p))

Intead of this introduce function smk_of_task_struct() which
takes task_struct as argument and returns pointer to smk_known struct
and do this under RCU read lock.
Bogus task_security() macro is not used anymore, so remove it.

KASan's report for this:

	AddressSanitizer: use after free in smack_task_to_inode+0x50/0x70 at addr c4635600
	=============================================================================
	BUG kmalloc-64 (Tainted: PO): kasan error
	-----------------------------------------------------------------------------

	Disabling lock debugging due to kernel taint
	INFO: Allocated in new_task_smack+0x44/0xd8 age=39 cpu=0 pid=1866
		kmem_cache_alloc_trace+0x88/0x1bc
		new_task_smack+0x44/0xd8
		smack_cred_prepare+0x48/0x21c
		security_prepare_creds+0x44/0x4c
		prepare_creds+0xdc/0x110
		smack_setprocattr+0x104/0x150
		security_setprocattr+0x4c/0x54
		proc_pid_attr_write+0x12c/0x194
		vfs_write+0x1b0/0x370
		SyS_write+0x5c/0x94
		ret_fast_syscall+0x0/0x48
	INFO: Freed in smack_cred_free+0xc4/0xd0 age=27 cpu=0 pid=1564
		kfree+0x270/0x290
		smack_cred_free+0xc4/0xd0
		security_cred_free+0x34/0x3c
		put_cred_rcu+0x58/0xcc
		rcu_process_callbacks+0x738/0x998
		__do_softirq+0x264/0x4cc
		do_softirq+0x94/0xf4
		irq_exit+0xbc/0x120
		handle_IRQ+0x104/0x134
		gic_handle_irq+0x70/0xac
		__irq_svc+0x44/0x78
		_raw_spin_unlock+0x18/0x48
		sync_inodes_sb+0x17c/0x1d8
		sync_filesystem+0xac/0xfc
		vdfs_file_fsync+0x90/0xc0
		vfs_fsync_range+0x74/0x7c
	INFO: Slab 0xd3b23f50 objects=32 used=31 fp=0xc4635600 flags=0x4080
	INFO: Object 0xc4635600 @offset=5632 fp=0x  (null)

	Bytes b4 c46355f0: 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a  ZZZZZZZZZZZZZZZZ
	Object c4635600: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b  kkkkkkkkkkkkkkkk
	Object c4635610: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b  kkkkkkkkkkkkkkkk
	Object c4635620: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b  kkkkkkkkkkkkkkkk
	Object c4635630: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b a5  kkkkkkkkkkkkkkk.
	Redzone c4635640: bb bb bb bb                                      ....
	Padding c46356e8: 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a  ZZZZZZZZZZZZZZZZ
	Padding c46356f8: 5a 5a 5a 5a 5a 5a 5a 5a                          ZZZZZZZZ
	CPU: 5 PID: 834 Comm: launchpad_prelo Tainted: PBO 3.10.30 #1
	Backtrace:
	[&lt;c00233a4&gt;] (dump_backtrace+0x0/0x158) from [&lt;c0023dec&gt;] (show_stack+0x20/0x24)
	 r7:c4634010 r6:d3b23f50 r5:c4635600 r4:d1002140
	[&lt;c0023dcc&gt;] (show_stack+0x0/0x24) from [&lt;c06d6d7c&gt;] (dump_stack+0x20/0x28)
	[&lt;c06d6d5c&gt;] (dump_stack+0x0/0x28) from [&lt;c01c1d50&gt;] (print_trailer+0x124/0x144)
	[&lt;c01c1c2c&gt;] (print_trailer+0x0/0x144) from [&lt;c01c1e88&gt;] (object_err+0x3c/0x44)
	 r7:c4635600 r6:d1002140 r5:d3b23f50 r4:c4635600
	[&lt;c01c1e4c&gt;] (object_err+0x0/0x44) from [&lt;c01cac18&gt;] (kasan_report_error+0x2b8/0x538)
	 r6:d1002140 r5:d3b23f50 r4:c6429cf8 r3:c09e1aa7
	[&lt;c01ca960&gt;] (kasan_report_error+0x0/0x538) from [&lt;c01c9430&gt;] (__asan_load4+0xd4/0xf8)
	[&lt;c01c935c&gt;] (__asan_load4+0x0/0xf8) from [&lt;c031e168&gt;] (smack_task_to_inode+0x50/0x70)
	 r5:c4635600 r4:ca9da000
	[&lt;c031e118&gt;] (smack_task_to_inode+0x0/0x70) from [&lt;c031af64&gt;] (security_task_to_inode+0x3c/0x44)
	 r5:cca25e80 r4:c0ba9780
	[&lt;c031af28&gt;] (security_task_to_inode+0x0/0x44) from [&lt;c023d614&gt;] (pid_revalidate+0x124/0x178)
	 r6:00000000 r5:cca25e80 r4:cbabe3c0 r3:00008124
	[&lt;c023d4f0&gt;] (pid_revalidate+0x0/0x178) from [&lt;c01db98c&gt;] (lookup_fast+0x35c/0x43y4)
	 r9:c6429efc r8:00000101 r7:c079d940 r6:c6429e90 r5:c6429ed8 r4:c83c4148
	[&lt;c01db630&gt;] (lookup_fast+0x0/0x434) from [&lt;c01deec8&gt;] (do_last.isra.24+0x1c0/0x1108)
	[&lt;c01ded08&gt;] (do_last.isra.24+0x0/0x1108) from [&lt;c01dff04&gt;] (path_openat.isra.25+0xf4/0x648)
	[&lt;c01dfe10&gt;] (path_openat.isra.25+0x0/0x648) from [&lt;c01e1458&gt;] (do_filp_open+0x3c/0x88)
	[&lt;c01e141c&gt;] (do_filp_open+0x0/0x88) from [&lt;c01ccb28&gt;] (do_sys_open+0xf0/0x198)
	 r7:00000001 r6:c0ea2180 r5:0000000b r4:00000000
	[&lt;c01cca38&gt;] (do_sys_open+0x0/0x198) from [&lt;c01ccc00&gt;] (SyS_open+0x30/0x34)
	[&lt;c01ccbd0&gt;] (SyS_open+0x0/0x34) from [&lt;c001db80&gt;] (ret_fast_syscall+0x0/0x48)
	Read of size 4 by thread T834:
	Memory state around the buggy address:
	 c4635380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
	 c4635400: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
	 c4635480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
	 c4635500: 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc
	 c4635580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
	&gt;c4635600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
	           ^
	 c4635680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
	 c4635700: 00 00 00 00 04 fc fc fc fc fc fc fc fc fc fc fc
	 c4635780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
	 c4635800: 00 00 00 00 00 00 04 fc fc fc fc fc fc fc fc fc
	 c4635880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
	==================================================================

Signed-off-by: Andrey Ryabinin &lt;a.ryabinin@samsung.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>KEYS: close race between key lookup and freeing</title>
<updated>2015-01-30T01:40:45Z</updated>
<author>
<name>Sasha Levin</name>
<email>sasha.levin@oracle.com</email>
</author>
<published>2014-12-29T14:39:01Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=8326fa8ec22f770a900bfe869e7ced22fd42f3e8'/>
<id>urn:sha1:8326fa8ec22f770a900bfe869e7ced22fd42f3e8</id>
<content type='text'>
commit a3a8784454692dd72e5d5d34dcdab17b4420e74c upstream.

When a key is being garbage collected, it's key-&gt;user would get put before
the -&gt;destroy() callback is called, where the key is removed from it's
respective tracking structures.

This leaves a key hanging in a semi-invalid state which leaves a window open
for a different task to try an access key-&gt;user. An example is
find_keyring_by_name() which would dereference key-&gt;user for a key that is
in the process of being garbage collected (where key-&gt;user was freed but
-&gt;destroy() wasn't called yet - so it's still present in the linked list).

This would cause either a panic, or corrupt memory.

Fixes CVE-2014-9529.

Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
</feed>
