<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/security/apparmor, branch v3.0.10</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/security/apparmor?h=v3.0.10</id>
<link rel='self' href='https://git.amat.us/linux/atom/security/apparmor?h=v3.0.10'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2011-08-05T04:58:42Z</updated>
<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>AppArmor: Fix sleep in invalid context from task_setrlimit</title>
<updated>2011-06-09T01:46:53Z</updated>
<author>
<name>John Johansen</name>
<email>john.johansen@canonical.com</email>
</author>
<published>2011-06-08T22:07:47Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=1780f2d3839a0d3eb85ee014a708f9e2c8f8ba0e'/>
<id>urn:sha1:1780f2d3839a0d3eb85ee014a708f9e2c8f8ba0e</id>
<content type='text'>
Affected kernels 2.6.36 - 3.0

AppArmor may do a GFP_KERNEL memory allocation with task_lock(tsk-&gt;group_leader);
held when called from security_task_setrlimit.  This will only occur when the
task's current policy has been replaced, and the task's creds have not been
updated before entering the LSM security_task_setrlimit() hook.

BUG: sleeping function called from invalid context at mm/slub.c:847
 in_atomic(): 1, irqs_disabled(): 0, pid: 1583, name: cupsd
 2 locks held by cupsd/1583:
  #0:  (tasklist_lock){.+.+.+}, at: [&lt;ffffffff8104dafa&gt;] do_prlimit+0x61/0x189
  #1:  (&amp;(&amp;p-&gt;alloc_lock)-&gt;rlock){+.+.+.}, at: [&lt;ffffffff8104db2d&gt;]
do_prlimit+0x94/0x189
 Pid: 1583, comm: cupsd Not tainted 3.0.0-rc2-git1 #7
 Call Trace:
  [&lt;ffffffff8102ebf2&gt;] __might_sleep+0x10d/0x112
  [&lt;ffffffff810e6f46&gt;] slab_pre_alloc_hook.isra.49+0x2d/0x33
  [&lt;ffffffff810e7bc4&gt;] kmem_cache_alloc+0x22/0x132
  [&lt;ffffffff8105b6e6&gt;] prepare_creds+0x35/0xe4
  [&lt;ffffffff811c0675&gt;] aa_replace_current_profile+0x35/0xb2
  [&lt;ffffffff811c4d2d&gt;] aa_current_profile+0x45/0x4c
  [&lt;ffffffff811c4d4d&gt;] apparmor_task_setrlimit+0x19/0x3a
  [&lt;ffffffff811beaa5&gt;] security_task_setrlimit+0x11/0x13
  [&lt;ffffffff8104db6b&gt;] do_prlimit+0xd2/0x189
  [&lt;ffffffff8104dea9&gt;] sys_setrlimit+0x3b/0x48
  [&lt;ffffffff814062bb&gt;] system_call_fastpath+0x16/0x1b

Signed-off-by: John Johansen &lt;john.johansen@canonical.com&gt;
Reported-by: Miles Lane &lt;miles.lane@gmail.com&gt;
Cc: stable@kernel.org
Signed-off-by: James Morris &lt;jmorris@namei.org&gt;
</content>
</entry>
<entry>
<title>AppArmor: fix oops in apparmor_setprocattr</title>
<updated>2011-06-01T03:07:03Z</updated>
<author>
<name>Kees Cook</name>
<email>kees.cook@canonical.com</email>
</author>
<published>2011-05-31T18:31:41Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a5b2c5b2ad5853591a6cac6134cd0f599a720865'/>
<id>urn:sha1:a5b2c5b2ad5853591a6cac6134cd0f599a720865</id>
<content type='text'>
When invalid parameters are passed to apparmor_setprocattr a NULL deref
oops occurs when it tries to record an audit message. This is because
it is passing NULL for the profile parameter for aa_audit. But aa_audit
now requires that the profile passed is not NULL.

Fix this by passing the current profile on the task that is trying to
setprocattr.

Signed-off-by: Kees Cook &lt;kees@ubuntu.com&gt;
Signed-off-by: John Johansen &lt;john.johansen@canonical.com&gt;
Cc: stable@kernel.org
Signed-off-by: James Morris &lt;jmorris@namei.org&gt;
</content>
</entry>
<entry>
<title>Create Documentation/security/,</title>
<updated>2011-05-19T22:59:38Z</updated>
<author>
<name>Randy Dunlap</name>
<email>randy.dunlap@oracle.com</email>
</author>
<published>2011-05-19T22:59:38Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d410fa4ef99112386de5f218dd7df7b4fca910b4'/>
<id>urn:sha1:d410fa4ef99112386de5f218dd7df7b4fca910b4</id>
<content type='text'>
move LSM-, credentials-, and keys-related files from Documentation/
  to Documentation/security/,
add Documentation/security/00-INDEX, and
update all occurrences of Documentation/&lt;moved_file&gt;
  to Documentation/security/&lt;moved_file&gt;.
</content>
</entry>
<entry>
<title>Fix common misspellings</title>
<updated>2011-03-31T14:26:23Z</updated>
<author>
<name>Lucas De Marchi</name>
<email>lucas.demarchi@profusion.mobi</email>
</author>
<published>2011-03-31T01:57:33Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=25985edcedea6396277003854657b5f3cb31a628'/>
<id>urn:sha1:25985edcedea6396277003854657b5f3cb31a628</id>
<content type='text'>
Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi &lt;lucas.demarchi@profusion.mobi&gt;
</content>
</entry>
<entry>
<title>userns: security: make capabilities relative to the user namespace</title>
<updated>2011-03-24T02:47:02Z</updated>
<author>
<name>Serge E. Hallyn</name>
<email>serge@hallyn.com</email>
</author>
<published>2011-03-23T23:43:17Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3486740a4f32a6a466f5ac931654d154790ba648'/>
<id>urn:sha1:3486740a4f32a6a466f5ac931654d154790ba648</id>
<content type='text'>
- Introduce ns_capable to test for a capability in a non-default
  user namespace.
- Teach cap_capable to handle capabilities in a non-default
  user namespace.

The motivation is to get to the unprivileged creation of new
namespaces.  It looks like this gets us 90% of the way there, with
only potential uid confusion issues left.

I still need to handle getting all caps after creation but otherwise I
think I have a good starter patch that achieves all of your goals.

Changelog:
	11/05/2010: [serge] add apparmor
	12/14/2010: [serge] fix capabilities to created user namespaces
	Without this, if user serge creates a user_ns, he won't have
	capabilities to the user_ns he created.  THis is because we
	were first checking whether his effective caps had the caps
	he needed and returning -EPERM if not, and THEN checking whether
	he was the creator.  Reverse those checks.
	12/16/2010: [serge] security_real_capable needs ns argument in !security case
	01/11/2011: [serge] add task_ns_capable helper
	01/11/2011: [serge] add nsown_capable() helper per Bastian Blank suggestion
	02/16/2011: [serge] fix a logic bug: the root user is always creator of
		    init_user_ns, but should not always have capabilities to
		    it!  Fix the check in cap_capable().
	02/21/2011: Add the required user_ns parameter to security_capable,
		    fixing a compile failure.
	02/23/2011: Convert some macros to functions as per akpm comments.  Some
		    couldn't be converted because we can't easily forward-declare
		    them (they are inline if !SECURITY, extern if SECURITY).  Add
		    a current_user_ns function so we can use it in capability.h
		    without #including cred.h.  Move all forward declarations
		    together to the top of the #ifdef __KERNEL__ section, and use
		    kernel-doc format.
	02/23/2011: Per dhowells, clean up comment in cap_capable().
	02/23/2011: Per akpm, remove unreachable 'return -EPERM' in cap_capable.

(Original written and signed off by Eric;  latest, modified version
acked by him)

[akpm@linux-foundation.org: fix build]
[akpm@linux-foundation.org: export current_user_ns() for ecryptfs]
[serge.hallyn@canonical.com: remove unneeded extra argument in selinux's task_has_capability]
Signed-off-by: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
Signed-off-by: Serge E. Hallyn &lt;serge.hallyn@canonical.com&gt;
Acked-by: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Acked-by: Daniel Lezcano &lt;daniel.lezcano@free.fr&gt;
Acked-by: David Howells &lt;dhowells@redhat.com&gt;
Cc: James Morris &lt;jmorris@namei.org&gt;
Signed-off-by: Serge E. Hallyn &lt;serge.hallyn@canonical.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>Merge branch 'security-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jj/apparmor-dev into next</title>
<updated>2011-03-09T03:12:07Z</updated>
<author>
<name>James Morris</name>
<email>jmorris@namei.org</email>
</author>
<published>2011-03-09T03:12:07Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c151694b2c48d956ac8c8c59c6927f89cc29ef70'/>
<id>urn:sha1:c151694b2c48d956ac8c8c59c6927f89cc29ef70</id>
<content type='text'>
</content>
</entry>
<entry>
<title>AppArmor: kill unused macros in lsm.c</title>
<updated>2011-03-09T01:04:07Z</updated>
<author>
<name>Shan Wei</name>
<email>shanwei@cn.fujitsu.com</email>
</author>
<published>2011-01-21T02:13:13Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=1936113c820bc3bfac49c266ccf972f7f8552aae'/>
<id>urn:sha1:1936113c820bc3bfac49c266ccf972f7f8552aae</id>
<content type='text'>
Remove unused macros.

Signed-off-by: Shan Wei &lt;shanwei@cn.fujitsu.com&gt;
Signed-off-by: John Johansen &lt;john.johansen@canonical.com&gt;
</content>
</entry>
<entry>
<title>AppArmor: cleanup generated files correctly</title>
<updated>2011-03-09T01:03:53Z</updated>
<author>
<name>Michal Hocko</name>
<email>mhocko@suse.cz</email>
</author>
<published>2011-01-07T14:03:02Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=0f8250265623e57971cbb57fc8d92e58dd883a19'/>
<id>urn:sha1:0f8250265623e57971cbb57fc8d92e58dd883a19</id>
<content type='text'>
clean-files should be defined as a variable not a target.

Signed-off-by: Michal Hocko &lt;mhocko@suse.cz&gt;
Signed-off-by: John Johansen &lt;john.johansen@canonical.com&gt;
</content>
</entry>
</feed>
