~ubuntu-kernel/ubuntu/+source/linux/+git/quantal:master-next

Last commit made on 2014-05-15
Get this branch:
git clone -b master-next https://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/quantal
Members of Ubuntu Kernel Repositories can upload to this branch. Log in for directions.

Branch merges

Branch information

Recent commits

fe87309... by Vlastimil Babka <email address hidden>

mm: try_to_unmap_cluster() should lock_page() before mlocking

A BUG_ON(!PageLocked) was triggered in mlock_vma_page() by Sasha Levin
fuzzing with trinity. The call site try_to_unmap_cluster() does not lock
the pages other than its check_page parameter (which is already locked).

The BUG_ON in mlock_vma_page() is not documented and its purpose is
somewhat unclear, but apparently it serializes against page migration,
which could otherwise fail to transfer the PG_mlocked flag. This would
not be fatal, as the page would be eventually encountered again, but
NR_MLOCK accounting would become distorted nevertheless. This patch adds
a comment to the BUG_ON in mlock_vma_page() and munlock_vma_page() to that
effect.

The call site try_to_unmap_cluster() is fixed so that for page !=
check_page, trylock_page() is attempted (to avoid possible deadlocks as we
already have check_page locked) and mlock_vma_page() is performed only
upon success. If the page lock cannot be obtained, the page is left
without PG_mlocked, which is again not a problem in the whole unevictable
memory design.

Signed-off-by: Vlastimil Babka <email address hidden>
Signed-off-by: Bob Liu <email address hidden>
Reported-by: Sasha Levin <email address hidden>
Cc: Wanpeng Li <email address hidden>
Cc: Michel Lespinasse <email address hidden>
Cc: KOSAKI Motohiro <email address hidden>
Acked-by: Rik van Riel <email address hidden>
Cc: David Rientjes <email address hidden>
Cc: Mel Gorman <email address hidden>
Cc: Hugh Dickins <email address hidden>
Cc: Joonsoo Kim <email address hidden>
Cc: <email address hidden>
Signed-off-by: Andrew Morton <email address hidden>
Signed-off-by: Linus Torvalds <email address hidden>
(back ported from commit 57e68e9cd65b4b8eb4045a1e0d0746458502554c)
CVE-2014-3122
BugLink: http://bugs.launchpad.net/bugs/1316268
Signed-off-by: Luis Henriques <email address hidden>
Acked-by: Andy Whitcroft <email address hidden>
Signed-off-by: Tim Gardner <email address hidden>

abf6435... by Brad Figg

UBUNTU: Ubuntu-3.5.0-51.76

Signed-off-by: Brad Figg <email address hidden>

7e6decf... by Brad Figg

Revert "rtlwifi: Set the link state"

This reverts commit ab69c1640744bd9b16937c28e6c6e50ffe810095.

9298bd3... by Brad Figg

UBUNTU: Start new release

Signed-off-by: Brad Figg <email address hidden>

6ce2734... by Kamal Mostafa

UBUNTU: Ubuntu-3.5.0-51.75

Signed-off-by: Kamal Mostafa <email address hidden>

c0a5ee2... by Matthew Daley <email address hidden>

floppy: don't write kernel-only members to FDRAWCMD ioctl output

CVE-2014-1738

BugLink: http://bugs.launchpad.net/bugs/1316735

Do not leak kernel-only floppy_raw_cmd structure members to userspace.
This includes the linked-list pointer and the pointer to the allocated
DMA space.

Signed-off-by: Matthew Daley <email address hidden>
Signed-off-by: Linus Torvalds <email address hidden>
(cherry picked from commit 2145e15e0557a01b9195d1c7199a1b92cb9be81f)
Acked-by: Andy Whitcroft <email address hidden>
Signed-off-by: Kamal Mostafa <email address hidden>

c677329... by Matthew Daley <email address hidden>

floppy: ignore kernel-only members in FDRAWCMD ioctl input

CVE-2014-1737

BugLink: http://bugs.launchpad.net/bugs/1316729

Always clear out these floppy_raw_cmd struct members after copying the
entire structure from userspace so that the in-kernel version is always
valid and never left in an interdeterminate state.

Signed-off-by: Matthew Daley <email address hidden>
Signed-off-by: Linus Torvalds <email address hidden>
(cherry picked from commit ef87dbe7614341c2e7bfe8d32fcb7028cc97442c)
Acked-by: Andy Whitcroft <email address hidden>
Signed-off-by: Kamal Mostafa <email address hidden>

4389b8d... by Peter Hurley

n_tty: Fix n_tty_write crash when echoing in raw mode

commit 4291086b1f081b869c6d79e5b7441633dc3ace00 upstream.

CVE-2014-0196

BugLink: http://bugs.launchpad.net/bugs/1314762

The tty atomic_write_lock does not provide an exclusion guarantee for
the tty driver if the termios settings are LECHO & !OPOST. And since
it is unexpected and not allowed to call TTY buffer helpers like
tty_insert_flip_string concurrently, this may lead to crashes when
concurrect writers call pty_write. In that case the following two
writers:
* the ECHOing from a workqueue and
* pty_write from the process
race and can overflow the corresponding TTY buffer like follows.

If we look into tty_insert_flip_string_fixed_flag, there is:
  int space = __tty_buffer_request_room(port, goal, flags);
  struct tty_buffer *tb = port->buf.tail;
  ...
  memcpy(char_buf_ptr(tb, tb->used), chars, space);
  ...
  tb->used += space;

so the race of the two can result in something like this:
              A B
__tty_buffer_request_room
                                  __tty_buffer_request_room
memcpy(buf(tb->used), ...)
tb->used += space;
                                  memcpy(buf(tb->used), ...) ->BOOM

B's memcpy is past the tty_buffer due to the previous A's tb->used
increment.

Since the N_TTY line discipline input processing can output
concurrently with a tty write, obtain the N_TTY ldisc output_lock to
serialize echo output with normal tty writes. This ensures the tty
buffer helper tty_insert_flip_string is not called concurrently and
everything is fine.

Note that this is nicely reproducible by an ordinary user using
forkpty and some setup around that (raw termios + ECHO). And it is
present in kernels at least after commit
d945cb9cce20ac7143c2de8d88b187f62db99bdc (pty: Rework the pty layer to
use the normal buffering logic) in 2.6.31-rc3.

js: add more info to the commit log
js: switch to bool
js: lock unconditionally
js: lock only the tty->ops->write call

References: CVE-2014-0196
Reported-and-tested-by: Jiri Slaby <email address hidden>
Signed-off-by: Peter Hurley <email address hidden>
Signed-off-by: Jiri Slaby <email address hidden>
Cc: Linus Torvalds <email address hidden>
Cc: Alan Cox <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>
[ kamal: backport to 3.5 ]
Acked-by: John Johansen <email address hidden>
Acked-by: Andy Whitcroft <email address hidden>
Signed-off-by: Kamal Mostafa <email address hidden>

a86a861... by Kamal Mostafa

UBUNTU: Revert "n_tty: Fix n_tty_write crash when echoing in raw mode"

This reverts commit 4f05cecb40b27777762530f2507b21921c501294.

BugLink: http://bugs.launchpad.net/bugs/1314762

This older version of this fix to be replaced with the correct mainline
version.

Acked-by: John Johansen <email address hidden>
Acked-by: Andy Whitcroft <email address hidden>
Signed-off-by: Kamal Mostafa <email address hidden>

bf63c31... by Kamal Mostafa

UBUNTU: Merged back Ubuntu-3.5.0-49.74 security release

Conflicts:
 debian.master/abi/3.5.0-48.72/amd64/generic.compiler
 debian.master/abi/3.5.0-48.72/amd64/generic.modules
 debian.master/abi/3.5.0-48.72/armel/omap.compiler
 debian.master/abi/3.5.0-48.72/armel/omap.modules
 debian.master/abi/3.5.0-48.72/armhf/highbank
 debian.master/abi/3.5.0-48.72/armhf/highbank.compiler
 debian.master/abi/3.5.0-48.72/armhf/highbank.modules
 debian.master/abi/3.5.0-48.72/armhf/omap.compiler
 debian.master/abi/3.5.0-48.72/armhf/omap.modules
 debian.master/abi/3.5.0-48.72/fwinfo
 debian.master/abi/3.5.0-48.72/i386/generic.compiler
 debian.master/abi/3.5.0-48.72/i386/generic.modules
 debian.master/abi/3.5.0-48.72/powerpc/powerpc-smp.compiler
 debian.master/abi/3.5.0-48.72/powerpc/powerpc-smp.modules
 debian.master/abi/3.5.0-48.72/powerpc/powerpc64-smp.compiler
 debian.master/abi/3.5.0-48.72/powerpc/powerpc64-smp.modules
 debian.master/abi/3.5.0-49.73/amd64/generic
 debian.master/abi/3.5.0-49.73/amd64/generic.compiler
 debian.master/abi/3.5.0-49.73/amd64/generic.modules
 debian.master/abi/3.5.0-49.73/armel/omap
 debian.master/abi/3.5.0-49.73/armel/omap.compiler
 debian.master/abi/3.5.0-49.73/armel/omap.modules
 debian.master/abi/3.5.0-49.73/armhf/highbank
 debian.master/abi/3.5.0-49.73/armhf/highbank.compiler
 debian.master/abi/3.5.0-49.73/armhf/highbank.modules
 debian.master/abi/3.5.0-49.73/armhf/omap
 debian.master/abi/3.5.0-49.73/armhf/omap.compiler
 debian.master/abi/3.5.0-49.73/armhf/omap.modules
 debian.master/abi/3.5.0-49.73/fwinfo
 debian.master/abi/3.5.0-49.73/i386/generic
 debian.master/abi/3.5.0-49.73/i386/generic.compiler
 debian.master/abi/3.5.0-49.73/i386/generic.modules
 debian.master/abi/3.5.0-49.73/powerpc/powerpc-smp
 debian.master/abi/3.5.0-49.73/powerpc/powerpc-smp.compiler
 debian.master/abi/3.5.0-49.73/powerpc/powerpc-smp.modules
 debian.master/abi/3.5.0-49.73/powerpc/powerpc64-smp
 debian.master/abi/3.5.0-49.73/powerpc/powerpc64-smp.compiler
 debian.master/abi/3.5.0-49.73/powerpc/powerpc64-smp.modules
 debian.master/abi/3.5.0-50.74/amd64/generic.compiler
 debian.master/abi/3.5.0-50.74/amd64/generic.modules
 debian.master/abi/3.5.0-50.74/armel/omap.compiler
 debian.master/abi/3.5.0-50.74/armel/omap.modules
 debian.master/abi/3.5.0-50.74/armhf/highbank
 debian.master/abi/3.5.0-50.74/armhf/highbank.compiler
 debian.master/abi/3.5.0-50.74/armhf/highbank.modules
 debian.master/abi/3.5.0-50.74/armhf/omap.compiler
 debian.master/abi/3.5.0-50.74/armhf/omap.modules
 debian.master/abi/3.5.0-50.74/fwinfo
 debian.master/abi/3.5.0-50.74/i386/generic.compiler
 debian.master/abi/3.5.0-50.74/i386/generic.modules
 debian.master/abi/3.5.0-50.74/powerpc/powerpc-smp.compiler
 debian.master/abi/3.5.0-50.74/powerpc/powerpc-smp.modules
 debian.master/abi/3.5.0-50.74/powerpc/powerpc64-smp.compiler
 debian.master/abi/3.5.0-50.74/powerpc/powerpc64-smp.modules
 debian.master/changelog

Signed-off-by: Kamal Mostafa <email address hidden>