<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/ipc, branch v2.6.16.38</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/ipc?h=v2.6.16.38</id>
<link rel='self' href='https://git.amat.us/linux/atom/ipc?h=v2.6.16.38'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2006-04-24T16:56:05Z</updated>
<entry>
<title>[PATCH] IPC: access to unmapped vmalloc area in grow_ary()</title>
<updated>2006-04-24T16:56:05Z</updated>
<author>
<name>Alexey Kuznetsov</name>
<email>kuznet@ms2.inr.ac.ru</email>
</author>
<published>2006-04-18T03:04:00Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=1fca16492a85f69fbdd498fdd66156f7de44262d'/>
<id>urn:sha1:1fca16492a85f69fbdd498fdd66156f7de44262d</id>
<content type='text'>
grow_ary() should not copy struct ipc_id_ary (it copies new-&gt;p, not
new). Due to this, memcpy() src pointer could hit unmapped vmalloc page
when near page boundary.

Found during OpenVZ stress testing

Signed-off-by: Alexey Kuznetsov &lt;kuznet@ms2.inr.ac.ru&gt;
Signed-off-by: Kirill Korotaev &lt;dev@openvz.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>[PATCH] shmat: stop mprotect from giving write permission to a readonly attachment (CVE-2006-1524)</title>
<updated>2006-04-17T20:16:07Z</updated>
<author>
<name>Hugh Dickins</name>
<email>hugh@veritas.com</email>
</author>
<published>2006-04-12T21:34:27Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=512dba41bae0ec8de72269167f23b75a4770097d'/>
<id>urn:sha1:512dba41bae0ec8de72269167f23b75a4770097d</id>
<content type='text'>
I found that all of 2.4 and 2.6 have been letting mprotect give write
permission to a readonly attachment of shared memory, whether or not IPC
would give the caller that permission.

SUS says "The behaviour of this function [mprotect] is unspecified if the
mapping was not established by a call to mmap", but I don't think we can
interpret that as allowing it to subvert IPC permissions.

I haven't tried 2.2, but the 2.2.26 source looks like it gets it right; and
the patch below reproduces that behaviour - mprotect cannot be used to add
write permission to a shared memory segment attached readonly.

This patch is simple, and I'm sure it's what we should have done in 2.4.0:
if you want to go on to switch write permission on and off with mprotect,
just don't attach the segment readonly in the first place.

However, we could have accumulated apps which attach readonly (even though
they would be permitted to attach read/write), and which subsequently use
mprotect to switch write permission on and off: it's not unreasonable.

I was going to add a second ipcperms check in do_shmat, to check for
writable when readonly, and if not writable find_vma and clear VM_MAYWRITE.
 But security_ipc_permission might do auditing, and it seems wrong to
report an attempt for write permission when there has been none.  Or we
could flag the vma as SHM, note the shmid or shp in vm_private_data, and
then get mprotect to check.

But the patch below is a lot simpler: I'd rather stick with it, if we can
convince ourselves somehow that it'll be safe.

Signed-off-by: Hugh Dickins &lt;hugh@veritas.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>[PATCH] shmdt cannot detach not-alined shm segment cleanly.</title>
<updated>2006-02-10T16:13:12Z</updated>
<author>
<name>KAMEZAWA Hiroyuki</name>
<email>kamezawa.hiroyu@jp.fujitsu.com</email>
</author>
<published>2006-02-10T09:51:12Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8e36709d8cea48a4d341294ce2b46678a2e77159'/>
<id>urn:sha1:8e36709d8cea48a4d341294ce2b46678a2e77159</id>
<content type='text'>
sys_shmdt() can manage shm segments which are covered by multiple vmas.  (This
can happen when a user uses mprotect() after shmat().)

This works well if shm is aligned to PAGE_SIZE, but if not, the last
segment cannot be detached.  It is because a comparison in sys_shmdt()

	(vma-&gt;vm_end - addr) &lt; size
		addr == return address of shmat()
		size == shmsize, argments to shmget()

size should be aligned to PAGE_SIZE before being compared with vma-&gt;vm_end,
which is aligned.

Signed-off-by: KAMEZAWA Hiroyuki &lt;kamezawa.hiroyu@jp.fujitsu.com&gt;
Cc: Manfred Spraul &lt;manfred@colorfullife.com&gt;
Acked-by: Hugh Dickins &lt;hugh@veritas.com&gt;
Cc: &lt;stable@kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[NETLINK]: Fix a severe bug</title>
<updated>2006-02-10T00:43:38Z</updated>
<author>
<name>Alexey Kuznetsov</name>
<email>kuznet@ms2.inr.ac.ru</email>
</author>
<published>2006-02-10T00:40:11Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a70ea994a0d83fd0151a070be72b87d014ef0a7e'/>
<id>urn:sha1:a70ea994a0d83fd0151a070be72b87d014ef0a7e</id>
<content type='text'>
netlink overrun was broken while improvement of netlink.
Destination socket is used in the place where it was meant to be source socket,
so that now overrun is never sent to user netlink sockets, when it should be,
and it even can be set on kernel socket, which results in complete deadlock
of rtnetlink.

Suggested fix is to restore status quo passing source socket as additional
argument to netlink_attachskb().

A little explanation: overrun is set on a socket, when it failed
to receive some message and sender of this messages does not or even
have no way to handle this error. This happens in two cases:
1. when kernel sends something. Kernel never retransmits and cannot
   wait for buffer space.
2. when user sends a broadcast and the message was not delivered
   to some recipients.

Signed-off-by: Alexey Kuznetsov &lt;kuznet@ms2.inr.ac.ru&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>correct email address of Manfred Spraul</title>
<updated>2006-01-15T01:43:54Z</updated>
<author>
<name>Christian Kujau</name>
<email>evil@g-house.de</email>
</author>
<published>2006-01-15T01:43:54Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=624dffcbcf87b9c501b13256416a82487be962bc'/>
<id>urn:sha1:624dffcbcf87b9c501b13256416a82487be962bc</id>
<content type='text'>
I  tried to send the forcedeth maintainer an email, but it came back with:

"The mail address manfreds@colorfullife.com is not read anymore.
Please resent your mail to manfred@ instead of manfreds@."

This patch fixes this.

Signed-off-by: Adrian Bunk &lt;bunk@stusta.de&gt;
</content>
</entry>
<entry>
<title>[PATCH] Fix double decrement of mqueue_mnt-&gt;mnt_count in sys_mq_open</title>
<updated>2006-01-14T20:38:17Z</updated>
<author>
<name>Alexander Viro</name>
<email>aviro@redhat.com</email>
</author>
<published>2006-01-14T20:29:55Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=7c7dce9209161eb260cdf9e9172f72c3a02379e6'/>
<id>urn:sha1:7c7dce9209161eb260cdf9e9172f72c3a02379e6</id>
<content type='text'>
Fixed the refcounting on failure exits in sys_mq_open() and
cleaned the logics up.  Rules are actually pretty simple - dentry_open()
expects vfsmount and dentry to be pinned down and it either transfers
them into created struct file or drops them.  Old code had been very
confused in that area - if dentry_open() had failed either in do_open()
or do_create(), we ended up dentry and mqueue_mnt dropped twice, once
by dentry_open() cleanup and then by sys_mq_open().

Fix consists of making the rules for do_create() and do_open()
same as for dentry_open() and updating the sys_mq_open() accordingly;
that actually leads to more straightforward code and less work on
normal path.

Signed-off-by: Al Viro &lt;aviro@redhat.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] move capable() to capability.h</title>
<updated>2006-01-12T02:42:13Z</updated>
<author>
<name>Randy.Dunlap</name>
<email>rdunlap@xenotime.net</email>
</author>
<published>2006-01-11T20:17:46Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c59ede7b78db329949d9cdcd7064e22d357560ef'/>
<id>urn:sha1:c59ede7b78db329949d9cdcd7064e22d357560ef</id>
<content type='text'>
- Move capable() from sched.h to capability.h;

- Use &lt;linux/capability.h&gt; where capable() is used
	(in include/, block/, ipc/, kernel/, a few drivers/,
	mm/, security/, &amp; sound/;
	many more drivers/ to go)

Signed-off-by: Randy Dunlap &lt;rdunlap@xenotime.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] mutex subsystem, semaphore to mutex: VFS, -&gt;i_sem</title>
<updated>2006-01-09T23:59:24Z</updated>
<author>
<name>Jes Sorensen</name>
<email>jes@sgi.com</email>
</author>
<published>2006-01-09T23:59:24Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=1b1dcc1b57a49136f118a0f16367256ff9994a69'/>
<id>urn:sha1:1b1dcc1b57a49136f118a0f16367256ff9994a69</id>
<content type='text'>
This patch converts the inode semaphore to a mutex. I have tested it on
XFS and compiled as much as one can consider on an ia64. Anyway your
luck with it might be different.

Modified-by: Ingo Molnar &lt;mingo@elte.hu&gt;

(finished the conversion)

Signed-off-by: Jes Sorensen &lt;jes@sgi.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>[PATCH] ipc: expand shm_flags</title>
<updated>2006-01-09T04:13:49Z</updated>
<author>
<name>Andrew Morton</name>
<email>akpm@osdl.org</email>
</author>
<published>2006-01-08T09:02:21Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b33291c0bcecfa44baa905964eec4b8815dcbcdf'/>
<id>urn:sha1:b33291c0bcecfa44baa905964eec4b8815dcbcdf</id>
<content type='text'>
Unobfsucate this struct member

Cc: Manfred Spraul &lt;manfred@colorfullife.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] NOMMU: Make SYSV IPC SHM use ramfs facilities on NOMMU</title>
<updated>2006-01-06T16:33:32Z</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2006-01-06T08:11:42Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b0e15190ead07056ab0c3844a499ff35e66d27cc'/>
<id>urn:sha1:b0e15190ead07056ab0c3844a499ff35e66d27cc</id>
<content type='text'>
The attached patch makes the SYSV IPC shared memory facilities use the new
ramfs facilities on a no-MMU kernel.

The following changes are made:

 (1) There are now shmem_mmap() and shmem_get_unmapped_area() functions to
     allow the IPC SHM facilities to commune with the tiny-shmem and shmem
     code.

 (2) ramfs files now need resizing using do_truncate() rather than by modifying
     the inode size directly (see shmem_file_setup()). This causes ramfs to
     attempt to bind a block of pages of sufficient size to the inode.

 (3) CONFIG_SYSVIPC is no longer contingent on CONFIG_MMU.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
</feed>
