~ubuntu-kernel/ubuntu/+source/linux/+git/utopic:goldfish-test

Last commit made on 2014-02-11
Get this branch:
git clone -b goldfish-test https://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/utopic
Members of Ubuntu Kernel Repositories can upload to this branch. Log in for directions.

Branch merges

Branch information

Name:
goldfish-test
Repository:
lp:~ubuntu-kernel/ubuntu/+source/linux/+git/utopic

Recent commits

6094c8e... by Andy Honig <email address hidden>

KVM: x86: Fix potential divide by 0 in lapic (CVE-2013-6367)

commit b963a22e6d1a266a67e9eecc88134713fd54775c upstream.

Under guest controllable circumstances apic_get_tmcct will execute a
divide by zero and cause a crash. If the guest cpuid support
tsc deadline timers and performs the following sequence of requests
the host will crash.
- Set the mode to periodic
- Set the TMICT to 0
- Set the mode bits to 11 (neither periodic, nor one shot, nor tsc deadline)
- Set the TMICT to non-zero.
Then the lapic_timer.period will be 0, but the TMICT will not be. If the
guest then reads from the TMCCT then the host will perform a divide by 0.

This patch ensures that if the lapic_timer.period is 0, then the division
does not occur.

Reported-by: Andrew Honig <email address hidden>
Signed-off-by: Andrew Honig <email address hidden>
Signed-off-by: Paolo Bonzini <email address hidden>
[bwh: Backported to 3.2: s/kvm_apic_get_reg/apic_get_reg/]
Signed-off-by: Ben Hutchings <email address hidden>
Cc: Vinson Lee <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>

(cherry picked from commit cd1e02030a6f006234061a306454c4e3e4d4701a)
Signed-off-by: Andy Whitcroft <email address hidden>

fde6762... by Andy Honig <email address hidden>

KVM: x86: Convert vapic synchronization to _cached functions (CVE-2013-6368)

commit fda4e2e85589191b123d31cdc21fd33ee70f50fd upstream.

In kvm_lapic_sync_from_vapic and kvm_lapic_sync_to_vapic there is the
potential to corrupt kernel memory if userspace provides an address that
is at the end of a page. This patches concerts those functions to use
kvm_write_guest_cached and kvm_read_guest_cached. It also checks the
vapic_address specified by userspace during ioctl processing and returns
an error to userspace if the address is not a valid GPA.

This is generally not guest triggerable, because the required write is
done by firmware that runs before the guest. Also, it only affects AMD
processors and oldish Intel that do not have the FlexPriority feature
(unless you disable FlexPriority, of course; then newer processors are
also affected).

Fixes: b93463aa59d6 ('KVM: Accelerated apic support')

Reported-by: Andrew Honig <email address hidden>
Cc: <email address hidden>
Signed-off-by: Andrew Honig <email address hidden>
Signed-off-by: Paolo Bonzini <email address hidden>
[ lizf: backported to 3.4: based on Paolo's backport hints for <3.10 ]
Signed-off-by: Li Zefan <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>

(cherry picked from commit 777f8f3bcde8dc29bac9ab7e4e94dd84887ba50d)
Signed-off-by: Andy Whitcroft <email address hidden>

3b276a4... by Linus Torvalds <email address hidden>

x86, fpu, amd: Clear exceptions in AMD FXSAVE workaround

commit 26bef1318adc1b3a530ecc807ef99346db2aa8b0 upstream.

Before we do an EMMS in the AMD FXSAVE information leak workaround we
need to clear any pending exceptions, otherwise we trap with a
floating-point exception inside this code.

Reported-by: halfdog <email address hidden>
Tested-by: Borislav Petkov <email address hidden>
Link: http://lkml.kernel.org/r/CA%<email address hidden>
Signed-off-by: H. Peter Anvin <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>

(cherry picked from commit a63f31f1f2cdb459b121f644ccbd07ae84f45d4e)
Signed-off-by: Andy Whitcroft <email address hidden>

d800a8b... by =?utf-8?q?Salva_Peir=C3=B3?= <email address hidden>

hamradio/yam: fix info leak in ioctl

[ Upstream commit 8e3fbf870481eb53b2d3a322d1fc395ad8b367ed ]

The yam_ioctl() code fails to initialise the cmd field
of the struct yamdrv_ioctl_cfg. Add an explicit memset(0)
before filling the structure to avoid the 4-byte info leak.

Signed-off-by: Salva Peiró <email address hidden>
Signed-off-by: David S. Miller <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>
(cherry picked from commit eb2da112485dc59834cf1a87036b3a7a43fba3c4)
Signed-off-by: Andy Whitcroft <email address hidden>

0fa24cf... by Mathy Vanhoef <email address hidden>

ath9k_htc: properly set MAC address and BSSID mask

commit 657eb17d87852c42b55c4b06d5425baa08b2ddb3 upstream.

Pick the MAC address of the first virtual interface as the new hardware MAC
address. Set BSSID mask according to this MAC address. This fixes CVE-2013-4579.

Signed-off-by: Mathy Vanhoef <email address hidden>
Signed-off-by: John W. Linville <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>

(cherry picked from commit 7110adb76087508116e4ce1496b8ca7a57e2d85d)
Signed-off-by: Andy Whitcroft <email address hidden>

a2c0043... by Dan Carpenter <email address hidden>

xfs: underflow bug in xfs_attrlist_by_handle()

commit 31978b5cc66b8ba8a7e8eef60b12395d41b7b890 upstream.

If we allocate less than sizeof(struct attrlist) then we end up
corrupting memory or doing a ZERO_PTR_SIZE dereference.

This can only be triggered with CAP_SYS_ADMIN.

Reported-by: Nico Golde <email address hidden>
Reported-by: Fabian Yamaguchi <email address hidden>
Signed-off-by: Dan Carpenter <email address hidden>
Reviewed-by: Dave Chinner <email address hidden>
Signed-off-by: Ben Myers <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>

(cherry picked from commit 894a160626d09198b104ea6702d688eca90623ad)
Signed-off-by: Andy Whitcroft <email address hidden>

ce65a6a... by Andy Honig <email address hidden>

KVM: Improve create VCPU parameter (CVE-2013-4587)

commit 338c7dbadd2671189cec7faf64c84d01071b3f96 upstream.

In multiple functions the vcpu_id is used as an offset into a bitfield. Ag
malicious user could specify a vcpu_id greater than 255 in order to set or
clear bits in kernel memory. This could be used to elevate priveges in the
kernel. This patch verifies that the vcpu_id provided is less than 255.
The api documentation already specifies that the vcpu_id must be less than
max_vcpus, but this is currently not checked.

Reported-by: Andrew Honig <email address hidden>
Signed-off-by: Andrew Honig <email address hidden>
Signed-off-by: Paolo Bonzini <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>

(cherry picked from commit f843edd53fec967be6d41c81b1426ec82728934b)
Signed-off-by: Andy Whitcroft <email address hidden>

fc51cf6... by Kees Cook

HID: picolcd_core: validate output report details

commit 1e87a2456b0227ca4ab881e19a11bb99d164e792 upstream.

A HID device could send a malicious output report that would cause the
picolcd HID driver to trigger a NULL dereference during attr file writing.

[<email address hidden>: changed

 report->maxfield < 1

to

 report->maxfield != 1

as suggested by Bruno].

CVE-2013-2899

Signed-off-by: Kees Cook <email address hidden>
Cc: <email address hidden>
Reviewed-by: Bruno Prémont <email address hidden>
Acked-by: Bruno Prémont <email address hidden>
Signed-off-by: Jiri Kosina <email address hidden>
[Kefeng: backported to stable 3.4: adjust filename]
Signed-off-by: Kefeng Wang <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>

(cherry picked from commit 12c1f610fe8574b5ea9374344f1684b5d972d50b)
Signed-off-by: Andy Whitcroft <email address hidden>

0deb0f9... by Hannes Frederic Sowa <email address hidden>

net: rework recvmsg handler msg_name and msg_namelen logic

[ Upstream commit f3d3342602f8bcbf37d7c46641cb9bca7618eb1c ]

This patch now always passes msg->msg_namelen as 0. recvmsg handlers must
set msg_namelen to the proper size <= sizeof(struct sockaddr_storage)
to return msg_name to the user.

This prevents numerous uninitialized memory leaks we had in the
recvmsg handlers and makes it harder for new code to accidentally leak
uninitialized memory.

Optimize for the case recvfrom is called with NULL as address. We don't
need to copy the address at all, so set it to NULL before invoking the
recvmsg handler. We can do so, because all the recvmsg handlers must
cope with the case a plain read() is called on them. read() also sets
msg_name to NULL.

Also document these changes in include/linux/net.h as suggested by David
Miller.

Changes since RFC:

Set msg->msg_name = NULL if user specified a NULL in msg_name but had a
non-null msg_namelen in verify_iovec/verify_compat_iovec. This doesn't
affect sendto as it would bail out earlier while trying to copy-in the
address. It also more naturally reflects the logic by the callers of
verify_iovec.

With this change in place I could remove "
if (!uaddr || msg_sys->msg_namelen == 0)
 msg->msg_name = NULL
".

This change does not alter the user visible error logic as we ignore
msg_namelen as long as msg_name is NULL.

Also remove two unnecessary curly brackets in ___sys_recvmsg and change
comments to netdev style.

Cc: David Miller <email address hidden>
Suggested-by: Eric Dumazet <email address hidden>
Signed-off-by: Hannes Frederic Sowa <email address hidden>
Signed-off-by: David S. Miller <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>
(cherry picked from commit 18719a4c7a90af3de4bb071511dd4a6dcf61a2e0)
Signed-off-by: Andy Whitcroft <email address hidden>

d69717b... by Hannes Frederic Sowa <email address hidden>

inet: prevent leakage of uninitialized memory to user in recv syscalls

[ Upstream commit bceaa90240b6019ed73b49965eac7d167610be69 ]

Only update *addr_len when we actually fill in sockaddr, otherwise we
can return uninitialized memory from the stack to the caller in the
recvfrom, recvmmsg and recvmsg syscalls. Drop the the (addr_len == NULL)
checks because we only get called with a valid addr_len pointer either
from sock_common_recvmsg or inet_recvmsg.

If a blocking read waits on a socket which is concurrently shut down we
now return zero and set msg_msgnamelen to 0.

Reported-by: mpb <email address hidden>
Suggested-by: Eric Dumazet <email address hidden>
Signed-off-by: Hannes Frederic Sowa <email address hidden>
Signed-off-by: David S. Miller <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>
(cherry picked from commit 11afb94fbe0337a06ee7fce36841969b4e538622)
Signed-off-by: Andy Whitcroft <email address hidden>