<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/security, branch linux-2.6.26.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-2.6.26.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-2.6.26.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2008-11-10T19:17:55Z</updated>
<entry>
<title>file caps: always start with clear bprm-&gt;caps_*</title>
<updated>2008-11-10T19:17:55Z</updated>
<author>
<name>Serge Hallyn</name>
<email>serue@us.ibm.com</email>
</author>
<published>2008-10-30T16:52:23Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=d98555a502f4a5d714b99b697942df256b0633ad'/>
<id>urn:sha1:d98555a502f4a5d714b99b697942df256b0633ad</id>
<content type='text'>
commit 3318a386e4ca68c76e0294363d29bdc46fcad670 upstream

While Linux doesn't honor setuid on scripts.  However, it mistakenly
behaves differently for file capabilities.

This patch fixes that behavior by making sure that get_file_caps()
begins with empty bprm-&gt;caps_*.  That way when a script is loaded,
its bprm-&gt;caps_* may be filled when binfmt_misc calls prepare_binprm(),
but they will be cleared again when binfmt_elf calls prepare_binprm()
next to read the interpreter's file capabilities.

Signed-off-by: Serge Hallyn &lt;serue@us.ibm.com&gt;
Acked-by: David Howells &lt;dhowells@redhat.com&gt;
Acked-by: Andrew G. Morgan &lt;morgan@kernel.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>devcgroup: fix permission check when adding entry to child cgroup</title>
<updated>2008-07-13T19:51:18Z</updated>
<author>
<name>Li Zefan</name>
<email>lizf@cn.fujitsu.com</email>
</author>
<published>2008-07-13T19:14:04Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=ec229e830060091b9be63c8f873c1b2407a82821'/>
<id>urn:sha1:ec229e830060091b9be63c8f873c1b2407a82821</id>
<content type='text'>
 # cat devices.list
 c 1:3 r
 # echo 'c 1:3 w' &gt; sub/devices.allow
 # cat sub/devices.list
 c 1:3 w

As illustrated, the parent group has no write permission to /dev/null, so
it's child should not be allowed to add this write permission.

Signed-off-by: Li Zefan &lt;lizf@cn.fujitsu.com&gt;
Acked-by: Serge Hallyn &lt;serue@us.ibm.com&gt;
Cc: Serge Hallyn &lt;serue@us.ibm.com&gt;
Cc: Paul Menage &lt;menage@google.com&gt;
Cc: Pavel Emelyanov &lt;xemul@openvz.org&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>devcgroup: always show positive major/minor num</title>
<updated>2008-07-13T19:51:18Z</updated>
<author>
<name>Li Zefan</name>
<email>lizf@cn.fujitsu.com</email>
</author>
<published>2008-07-13T19:14:02Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=17d213f806dad629e9af36fc45f082b87ed7bceb'/>
<id>urn:sha1:17d213f806dad629e9af36fc45f082b87ed7bceb</id>
<content type='text'>
 # echo "b $((0x7fffffff)):$((0x80000000)) rwm" &gt; devices.allow
 # cat devices.list
 b 214748364:-21474836 rwm

though a major/minor number of 0x800000000 is meaningless, we
should not cast it to a negative value.

Signed-off-by: Li Zefan &lt;lizf@cn.fujitsu.com&gt;
Acked-by: Serge Hallyn &lt;serue@us.ibm.com&gt;
Cc: Serge Hallyn &lt;serue@us.ibm.com&gt;
Cc: Paul Menage &lt;menage@google.com&gt;
Cc: Pavel Emelyanov &lt;xemul@openvz.org&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>devcgroup: fix odd behaviour when writing 'a' to devices.allow</title>
<updated>2008-07-04T17:40:10Z</updated>
<author>
<name>Li Zefan</name>
<email>lizf@cn.fujitsu.com</email>
</author>
<published>2008-07-04T17:00:07Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=d823f6bfec2844493c05961133895de21fa0e02d'/>
<id>urn:sha1:d823f6bfec2844493c05961133895de21fa0e02d</id>
<content type='text'>
 # cat /devcg/devices.list
 a *:* rwm
 # echo a &gt; devices.allow
 # cat /devcg/devices.list
 a *:* rwm
 a 0:0 rwm

This is odd and maybe confusing.  With this patch, writing 'a' to
devices.allow will add 'a *:* rwm' to the whitelist.

Also a few fixes and updates to the document.

Signed-off-by: Li Zefan &lt;lizf@cn.fujitsu.com&gt;
Cc: Pavel Emelyanov &lt;xemul@openvz.org&gt;
Cc: Serge E. Hallyn &lt;serue@us.ibm.com&gt;
Cc: Paul Menage &lt;menage@google.com&gt;
Cc: Balbir Singh &lt;balbir@in.ibm.com&gt;
Cc: James Morris &lt;jmorris@namei.org&gt;
Cc: Chris Wright &lt;chrisw@sous-sol.org&gt;
Cc: Stephen Smalley &lt;sds@tycho.nsa.gov&gt;
Cc: KAMEZAWA Hiroyuki &lt;kamezawa.hiroyu@jp.fujitsu.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>security: filesystem capabilities: fix CAP_SETPCAP handling</title>
<updated>2008-07-04T17:40:08Z</updated>
<author>
<name>Andrew G. Morgan</name>
<email>morgan@kernel.org</email>
</author>
<published>2008-07-04T16:59:59Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=1209726ce942047c9fefe7cd427dc36f8e9ded53'/>
<id>urn:sha1:1209726ce942047c9fefe7cd427dc36f8e9ded53</id>
<content type='text'>
The filesystem capability support meaning for CAP_SETPCAP is less powerful
than the non-filesystem capability support.  As such, when filesystem
capabilities are configured, we should not permit CAP_SETPCAP to 'enhance'
the current process through strace manipulation of a child process.

Signed-off-by: Andrew G. Morgan &lt;morgan@kernel.org&gt;
Acked-by: Serge Hallyn &lt;serue@us.ibm.com&gt;
Cc: David Howells &lt;dhowells@redhat.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>capabilities: add (back) dummy support for KEEPCAPS</title>
<updated>2008-06-13T01:05:40Z</updated>
<author>
<name>Andrew G. Morgan</name>
<email>morgan@kernel.org</email>
</author>
<published>2008-06-12T22:21:33Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=8cdbc2b9826b3543fecff2f6d6400fa77b21ffdd'/>
<id>urn:sha1:8cdbc2b9826b3543fecff2f6d6400fa77b21ffdd</id>
<content type='text'>
The dummy module is used by folk that run security conscious code(!?).  A
feature of such code (for example, dhclient) is that it tries to operate
with minimum privilege (dropping unneeded capabilities).  While the dummy
module doesn't restrict code execution based on capability state, the user
code expects the kernel to appear to support it.  This patch adds back
faked support for the PR_SET_KEEPCAPS etc., calls - making the kernel
behave as before 2.6.26.

For details see: http://bugzilla.kernel.org/show_bug.cgi?id=10748

Signed-off-by: Andrew G. Morgan &lt;morgan@kernel.org&gt;
Acked-by: Serge Hallyn &lt;serue@us.ibm.com&gt;
Cc: James Morris &lt;jmorris@namei.org&gt;
Cc: Stephen Smalley &lt;sds@tycho.nsa.gov&gt;
Cc: Chris Wright &lt;chrisw@sous-sol.org&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>keys: remove unused key_alloc_sem</title>
<updated>2008-06-06T18:29:11Z</updated>
<author>
<name>Daniel Walker</name>
<email>dwalker@mvista.com</email>
</author>
<published>2008-06-06T05:46:32Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=dba6a4d32d8677c99e73798d3375417f8a6d46de'/>
<id>urn:sha1:dba6a4d32d8677c99e73798d3375417f8a6d46de</id>
<content type='text'>
This semaphore doesn't appear to be used, so remove it.

Signed-off-by: Daniel Walker &lt;dwalker@mvista.com&gt;
Cc: David Howells &lt;dhowells@redhat.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>devscgroup: make white list more compact in some cases</title>
<updated>2008-06-06T18:29:11Z</updated>
<author>
<name>Pavel Emelyanov</name>
<email>xemul@openvz.org</email>
</author>
<published>2008-06-06T05:46:28Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=d1ee2971f5bd8a16bc5ecfe1b00e14b4fe407c4f'/>
<id>urn:sha1:d1ee2971f5bd8a16bc5ecfe1b00e14b4fe407c4f</id>
<content type='text'>
Consider you added a 'c foo:bar r' permission to some cgroup and then (a
bit later) 'c'foo:bar w' for it.  After this you'll see the

c foo:bar r
c foo:bar w

lines in a devices.list file.

Another example - consider you added 10 'c foo:bar r' permissions to some
cgroup (e.g.  by mistake).  After this you'll see 10 c foo:bar r lines in
a list file.

This is weird.  This situation also has one more annoying consequence.
Having many items in a white list makes permissions checking slower, sine
it has to walk a longer list.

The proposal is to merge permissions for items, that correspond to the
same device.

Signed-off-by: Pavel Emelyanov &lt;xemul@openvz.org&gt;
Acked-by: Serge Hallyn &lt;serue@us.ibm.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>devscgroup: relax task to dev_cgroup conversion</title>
<updated>2008-06-06T18:29:11Z</updated>
<author>
<name>Pavel Emelyanov</name>
<email>xemul@openvz.org</email>
</author>
<published>2008-06-06T05:46:26Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=cc9cb219aac24ffc711566c8f372c2b3a3bf840f'/>
<id>urn:sha1:cc9cb219aac24ffc711566c8f372c2b3a3bf840f</id>
<content type='text'>
Two functions, that need to get a device_cgroup from a task (they are
devcgroup_inode_permission and devcgroup_inode_mknod) make it in a strange
way:

They get a css_set from task, then a subsys_state from css_set, then a
cgroup from the state and then a subsys_state again from the cgroup.
Besides, the devices_subsys_id is read from memory, whilst there's a
enum-ed constant for it.

Optimize this part a bit:
1. Get the subsys_stats form the task and be done - no 2 extra
   dereferences,
2. Use the device_subsys_id constant, not the value from memory
   (i.e. one less dereference).

Found while preparing 2.6.26 OpenVZ port.

Signed-off-by: Pavel Emelyanov &lt;xemul@openvz.org&gt;
Acked-by: Serge Hallyn &lt;serue@us.ibm.com&gt;
Acked-by: Paul Menage &lt;menage@google.com&gt;
Cc: Balbir Singh &lt;balbir@in.ibm.com&gt;
Cc: James Morris &lt;jmorris@namei.org&gt;
Cc: Chris Wright &lt;chrisw@sous-sol.org&gt;
Cc: Stephen Smalley &lt;sds@tycho.nsa.gov&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>devcgroup: make a helper to convert cgroup_subsys_state to devs_cgroup</title>
<updated>2008-06-06T18:29:11Z</updated>
<author>
<name>Pavel Emelyanov</name>
<email>xemul@openvz.org</email>
</author>
<published>2008-06-06T05:46:24Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=b66862f7663332aa1ecb3ebda4086360ddb8befc'/>
<id>urn:sha1:b66862f7663332aa1ecb3ebda4086360ddb8befc</id>
<content type='text'>
This is just picking the container_of out of cgroup_to_devcgroup into a
separate function.

This new css_to_devcgroup will be used in the 2nd patch.

Signed-off-by: Pavel Emelyanov &lt;xemul@openvz.org&gt;
Acked-by: Serge Hallyn &lt;serue@us.ibm.com&gt;
Cc: Paul Menage &lt;menage@google.com&gt;
Cc: Balbir Singh &lt;balbir@in.ibm.com&gt;
Cc: James Morris &lt;jmorris@namei.org&gt;
Cc: Chris Wright &lt;chrisw@sous-sol.org&gt;
Cc: Stephen Smalley &lt;sds@tycho.nsa.gov&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>
</feed>
