<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/fs, branch v2.6.35.11</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/fs?h=v2.6.35.11</id>
<link rel='self' href='https://git.amat.us/linux/atom/fs?h=v2.6.35.11'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2011-02-06T19:03:45Z</updated>
<entry>
<title>install_special_mapping skips security_file_mmap check.</title>
<updated>2011-02-06T19:03:45Z</updated>
<author>
<name>Tavis Ormandy</name>
<email>taviso@cmpxchg8b.com</email>
</author>
<published>2010-12-09T14:29:42Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=0409b72407a69538cb62bb0bc2476db0ca2b3de8'/>
<id>urn:sha1:0409b72407a69538cb62bb0bc2476db0ca2b3de8</id>
<content type='text'>
commit 462e635e5b73ba9a4c03913b77138cd57ce4b050 upstream.

The install_special_mapping routine (used, for example, to setup the
vdso) skips the security check before insert_vm_struct, allowing a local
attacker to bypass the mmap_min_addr security restriction by limiting
the available pages for special mappings.

bprm_mm_init() also skips the check, and although I don't think this can
be used to bypass any restrictions, I don't see any reason not to have
the security check.

  $ uname -m
  x86_64
  $ cat /proc/sys/vm/mmap_min_addr
  65536
  $ cat install_special_mapping.s
  section .bss
      resb BSS_SIZE
  section .text
      global _start
      _start:
          mov     eax, __NR_pause
          int     0x80
  $ nasm -D__NR_pause=29 -DBSS_SIZE=0xfffed000 -f elf -o install_special_mapping.o install_special_mapping.s
  $ ld -m elf_i386 -Ttext=0x10000 -Tbss=0x11000 -o install_special_mapping install_special_mapping.o
  $ ./install_special_mapping &amp;
  [1] 14303
  $ cat /proc/14303/maps
  0000f000-00010000 r-xp 00000000 00:00 0                                  [vdso]
  00010000-00011000 r-xp 00001000 00:19 2453665                            /home/taviso/install_special_mapping
  00011000-ffffe000 rwxp 00000000 00:00 0                                  [stack]

It's worth noting that Red Hat are shipping with mmap_min_addr set to
4096.

Signed-off-by: Tavis Ormandy &lt;taviso@google.com&gt;
Acked-by: Kees Cook &lt;kees@ubuntu.com&gt;
Acked-by: Robert Swiecki &lt;swiecki@google.com&gt;
Signed-off-by: Andi Kleen &lt;ak@linux.intel.com&gt;
[ Changed to not drop the error code - akpm ]
Reviewed-by: James Morris &lt;jmorris@namei.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>inotify: stop kernel memory leak on file creation failure</title>
<updated>2011-02-06T19:03:41Z</updated>
<author>
<name>Eric Paris</name>
<email>eparis@redhat.com</email>
</author>
<published>2010-11-23T23:18:37Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a1a584f5c28939e5c11d062b233599034748d6dd'/>
<id>urn:sha1:a1a584f5c28939e5c11d062b233599034748d6dd</id>
<content type='text'>
commit a2ae4cc9a16e211c8a128ba10d22a85431f093ab upstream.

If inotify_init is unable to allocate a new file for the new inotify
group we leak the new group.  This patch drops the reference on the
group on file allocation failure.

Reported-by: Vegard Nossum &lt;vegard.nossum@gmail.com&gt;
Signed-off-by: Eric Paris &lt;eparis@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
Signed-off-by: Andi Kleen &lt;ak@linux.intel.com&gt;

</content>
</entry>
<entry>
<title>NFS: Fix fcntl F_GETLK not reporting some conflicts</title>
<updated>2011-02-06T19:03:27Z</updated>
<author>
<name>Sergey Vlasov</name>
<email>vsu@altlinux.ru</email>
</author>
<published>2010-11-28T21:04:05Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=2341d3c4085fb6d075d6e146c0093f277396249f'/>
<id>urn:sha1:2341d3c4085fb6d075d6e146c0093f277396249f</id>
<content type='text'>
commit 21ac19d484a8ffb66f64487846c8d53afef04d2b upstream.

The commit 129a84de2347002f09721cda3155ccfd19fade40 (locks: fix F_GETLK
regression (failure to find conflicts)) fixed the posix_test_lock()
function by itself, however, its usage in NFS changed by the commit
9d6a8c5c213e34c475e72b245a8eb709258e968c (locks: give posix_test_lock
same interface as -&gt;lock) remained broken - subsequent NFS-specific
locking code received F_UNLCK instead of the user-specified lock type.
To fix the problem, fl-&gt;fl_type needs to be saved before the
posix_test_lock() call and restored if no local conflicts were reported.

Reference: https://bugzilla.kernel.org/show_bug.cgi?id=23892
Tested-by: Alexander Morozov &lt;amorozov@etersoft.ru&gt;
Signed-off-by: Sergey Vlasov &lt;vsu@altlinux.ru&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
Signed-off-by: Andi Kleen &lt;ak@linux.intel.com&gt;

</content>
</entry>
<entry>
<title>nfsd: Fix possible BUG_ON firing in set_change_info</title>
<updated>2011-02-06T19:03:26Z</updated>
<author>
<name>Neil Brown</name>
<email>neilb@suse.de</email>
</author>
<published>2010-12-02T00:14:30Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=74526c3deda36c784c87ba977550234a95ecbb05'/>
<id>urn:sha1:74526c3deda36c784c87ba977550234a95ecbb05</id>
<content type='text'>
commit c1ac3ffcd0bc7e9617f62be8c7043d53ab84deac upstream.

If vfs_getattr in fill_post_wcc returns an error, we don't
set fh_post_change.
For NFSv4, this can result in set_change_info triggering a BUG_ON.
i.e. fh_post_saved being zero isn't really a bug.

So:
 - instead of BUGging when fh_post_saved is zero, just clear -&gt;atomic.
 - if vfs_getattr fails in fill_post_wcc, take a copy of i_ctime anyway.
   This will be used i seg_change_info, but not overly trusted.
 - While we are there, remove the pointless 'if' statements in set_change_info.
   There is no harm setting all the values.

Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
Signed-off-by: J. Bruce Fields &lt;bfields@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
Signed-off-by: Andi Kleen &lt;ak@linux.intel.com&gt;

</content>
</entry>
<entry>
<title>NFS: Fix panic after nfs_umount()</title>
<updated>2011-02-06T19:03:26Z</updated>
<author>
<name>Chuck Lever</name>
<email>chuck.lever@oracle.com</email>
</author>
<published>2010-12-10T17:31:14Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=cdda0cb15d14a9c49c337e0bb9b69a392290016d'/>
<id>urn:sha1:cdda0cb15d14a9c49c337e0bb9b69a392290016d</id>
<content type='text'>
commit 5b362ac3799ff4225c40935500f520cad4d7ed66 upstream.

After a few unsuccessful NFS mount attempts in which the client and
server cannot agree on an authentication flavor both support, the
client panics.  nfs_umount() is invoked in the kernel in this case.

Turns out nfs_umount()'s UMNT RPC invocation causes the RPC client to
write off the end of the rpc_clnt's iostat array.  This is because the
mount client's nrprocs field is initialized with the count of defined
procedures (two: MNT and UMNT), rather than the size of the client's
proc array (four).

The fix is to use the same initialization technique used by most other
upper layer clients in the kernel.

Introduced by commit 0b524123, which failed to update nrprocs when
support was added for UMNT in the kernel.

BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=24302
BugLink: http://bugs.launchpad.net/bugs/683938

Reported-by: Stefan Bader &lt;stefan.bader@canonical.com&gt;
Tested-by: Stefan Bader &lt;stefan.bader@canonical.com&gt;
Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
Signed-off-by: Andi Kleen &lt;ak@linux.intel.com&gt;

</content>
</entry>
<entry>
<title>fuse: fix ioctl when server is 32bit</title>
<updated>2011-02-06T19:03:24Z</updated>
<author>
<name>Miklos Szeredi</name>
<email>mszeredi@suse.cz</email>
</author>
<published>2010-11-30T15:39:27Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=986afbde0f1dde7695987fd2458f9676ce0389aa'/>
<id>urn:sha1:986afbde0f1dde7695987fd2458f9676ce0389aa</id>
<content type='text'>
commit d9d318d39dd5cb686660504a3565aac453709ccc upstream.

If a 32bit CUSE server is run on 64bit this results in EIO being
returned to the caller.

The reason is that FUSE_IOCTL_RETRY reply was defined to use 'struct
iovec', which is different on 32bit and 64bit archs.

Work around this by looking at the size of the reply to determine
which struct was used.  This is only needed if CONFIG_COMPAT is
defined.

A more permanent fix for the interface will be to use the same struct
on both 32bit and 64bit.

Reported-by: "ccmail111" &lt;ccmail111@yahoo.com&gt;
Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
Signed-off-by: Andi Kleen &lt;ak@linux.intel.com&gt;
CC: Tejun Heo &lt;tj@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>fuse: verify ioctl retries</title>
<updated>2011-02-06T19:03:24Z</updated>
<author>
<name>Miklos Szeredi</name>
<email>mszeredi@suse.cz</email>
</author>
<published>2010-11-30T15:39:27Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=84e4371b03088be955408911af51904c66a5b43e'/>
<id>urn:sha1:84e4371b03088be955408911af51904c66a5b43e</id>
<content type='text'>
commit 7572777eef78ebdee1ecb7c258c0ef94d35bad16 upstream.

Verify that the total length of the iovec returned in FUSE_IOCTL_RETRY
doesn't overflow iov_length().

Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
Signed-off-by: Andi Kleen &lt;ak@linux.intel.com&gt;
CC: Tejun Heo &lt;tj@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>Un-inline get_pipe_info() helper function</title>
<updated>2010-12-14T22:40:18Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2010-11-29T00:27:19Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=6efba844d4ad8783c46ee2477344bfd87f737325'/>
<id>urn:sha1:6efba844d4ad8783c46ee2477344bfd87f737325</id>
<content type='text'>
commit 72083646528d4887b920deb71b37e09bc7d227bb upstream.

This avoids some include-file hell, and the function isn't really
important enough to be inlined anyway.

Reported-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
Signed-off-by: Andi Kleen &lt;ak@linux.intel.com&gt;

</content>
</entry>
<entry>
<title>Export 'get_pipe_info()' to other users</title>
<updated>2010-12-14T22:40:18Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2010-11-28T22:09:57Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=23076bfefeb871c22c40f8abad5b5ea7065a265f'/>
<id>urn:sha1:23076bfefeb871c22c40f8abad5b5ea7065a265f</id>
<content type='text'>
commit c66fb347946ebdd5b10908866ecc9fa05ee2cf3d upstream.

And in particular, use it in 'pipe_fcntl()'.

The other pipe functions do not need to use the 'careful' version, since
they are only ever called for things that are already known to be pipes.

The normal read/write/ioctl functions are called through the file
operations structures, so if a file isn't a pipe, they'd never get
called.  But pipe_fcntl() is special, and called directly from the
generic fcntl code, and needs to use the same careful function that the
splice code is using.

Cc: Jens Axboe &lt;jaxboe@fusionio.com&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Cc: Dave Jones &lt;davej@redhat.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
Signed-off-by: Andi Kleen &lt;ak@linux.intel.com&gt;

</content>
</entry>
<entry>
<title>Rename 'pipe_info()' to 'get_pipe_info()'</title>
<updated>2010-12-14T22:40:18Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2010-11-28T21:56:09Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=1e6aa82072d3c8267011461d17fbb25c247a3214'/>
<id>urn:sha1:1e6aa82072d3c8267011461d17fbb25c247a3214</id>
<content type='text'>
commit 71993e62a47dabddf10302807d6aa260455503f4 upstream.

.. and change it to take the 'file' pointer instead of an inode, since
that's what all users want anyway.

The renaming is preparatory to exporting it to other users.  The old
'pipe_info()' name was too generic and is already used elsewhere, so
before making the function public we need to use a more specific name.

Cc: Jens Axboe &lt;jaxboe@fusionio.com&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Cc: Dave Jones &lt;davej@redhat.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
Signed-off-by: Andi Kleen &lt;ak@linux.intel.com&gt;

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