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

Last commit made on 2014-05-15
Get this branch:
git clone -b master 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

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>

80717fb... by mst

vhost: fix total length when packets are too short

CVE-2014-0077

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

When mergeable buffers are disabled, and the
incoming packet is too large for the rx buffer,
get_rx_bufs returns success.

This was intentional in order for make recvmsg
truncate the packet and then handle_rx would
detect err != sock_len and drop it.

Unfortunately we pass the original sock_len to
recvmsg - which means we use parts of iov not fully
validated.

Fix this up by detecting this overrun and doing packet drop
immediately.

CVE-2014-0077

Signed-off-by: Michael S. Tsirkin <email address hidden>
Signed-off-by: David S. Miller <email address hidden>
(cherry picked from commit d8316f3991d207fe32881a9ac20241be8fa2bad0)
Signed-off-by: Luis Henriques <email address hidden>
Signed-off-by: Tim Gardner <email address hidden>