A data race that can trick the kernel into using initialized memory was found. This vulnerability can at least give access to arbitrary SysV shared memory. It is almost certain that this vulnerability can be used to gain arbitrary code execution in the kernel.
While working on KTSAN, Dmitry Vyukov got a report that says that ipcaddid() installs a not-completely initialized object into the shared object table. In particular, uid/gid are not initialized. ipcobtainobjectcheck() in turn obtains the object and verifies uid/gid for permission purposes. Since the fields are not initialized, the check can falsely succeed.
Race report:
ThreadSanitizer: data-race in ipcobtainobjectcheck
Read at 0xffff88047f810f68 of size 8 by thread 2749 on CPU 5: [<ffffffff8147d84d>] ipcobtainobjectcheck+0x7d/0xd0 ipc/util.c:621 [< inline >] msqobtainobjectcheck ipc/msg.c:90 [<ffffffff8147e708>] msgctlnolock.constprop.9+0x208/0x430 ipc/msg.c:480 [< inline >] SYSCmsgctl ipc/msg.c:538 [<ffffffff8147f061>] SySmsgctl+0xa1/0xb0 ipc/msg.c:522 [<ffffffff81ee3e11>] entrySYSCALL64fastpath+0x31/0x95 arch/x86/entry/entry64.S:188
Previous write at 0xffff88047f810f68 of size 8 by thread 2755 on CPU 4: [<ffffffff8147cf97>] ipcaddid+0x217/0x260 ipc/util.c:257 [<ffffffff8147eb4c>] newque+0xac/0x240 ipc/msg.c:141 [< inline >] ipcgetpublic ipc/util.c:355 [<ffffffff8147daa2>] ipcget+0x202/0x280 ipc/util.c:646 [< inline >] SYSCmsgget ipc/msg.c:255 [<ffffffff8147efaa>] SySmsgget+0x7a/0x90 ipc/msg.c:241 [<ffffffff81ee3e11>] entrySYSCALL64fastpath+0x31/0x95 arch/x86/entry/entry64.S:188
Mutexes locked by thread 2755: Mutex 445417 is locked here: [<ffffffff81ee0d45>] downwrite+0x65/0x80 kernel/locking/rwsem.c:62 [< inline >] ipcgetpublic ipc/util.c:348 [<ffffffff8147d90c>] ipcget+0x6c/0x280 ipc/util.c:646 [< inline >] SYSCmsgget ipc/msg.c:255 [<ffffffff8147efaa>] SySmsgget+0x7a/0x90 ipc/msg.c:241 [<ffffffff81ee3e11>] entrySYSCALL64fastpath+0x31/0x95 arch/x86/entry/entry64.S:188
Mutex 453634 is locked here: [< inline >] rawspinlock include/linux/spinlockapismp.h:158 [<ffffffff81ee37d0>] rawspinlock+0x50/0x70 kernel/locking/spinlock.c:151 [< inline >] spinlock include/linux/spinlock.h:312 [<ffffffff8147ce0e>] ipcaddid+0x8e/0x260 ipc/util.c:238 [<ffffffff8147eb4c>] newque+0xac/0x240 ipc/msg.c:141 [< inline >] ipcgetpublic ipc/util.c:355 [<ffffffff8147daa2>] ipcget+0x202/0x280 ipc/util.c:646 [< inline >] SYSCmsgget ipc/msg.c:255 [<ffffffff8147efaa>] SySmsgget+0x7a/0x90 ipc/msg.c:241 [<ffffffff81ee3e11>] entrySYSCALL64fastpath+0x31/0x95 arch/x86/entry/entry64.S:188
ipcaddid installs new ipc object with idralloc, from this point on it is accessible to other threads. At this point the object contains unitialized garbage. Then it fills in uid, etc:
new->cuid = new->uid = euid; new->gid = new->cgid = egid; new->seq = ids->seq++;
While this happens another thread can get access to the object and do uid check on the unitialized garbage, which can give falsely give accesses to the shared object to a process that should not have access to the object.
Upstream patch:
https://github.com/torvalds/linux/commit/b9a532277938
CVE assignment:
http://seclists.org/oss-sec/2015/q4/7
A flaw was found in the way the Linux kernel's file system implementation handled rename operations in which the source was inside and the destination was outside of a bind mount. A privileged user inside a container could use this flaw to escape the bind mount and, potentially, escalate their privileges on the system.
A flaw was found in the way pppol2tpsetsockopt() and pppol2tpgetsockopt() functions in the Linux kernel's PPP over L2TP implementation handled non-SOLPPPOL2TP level.
A local, unprivileged user could use this flaw to escalate their privileges on the system.
Acknowledgements:
Red Hat would like to thank Sasha Levin for reporting this issue.
Array index error in the logidjrawevent function in drivers/hid/hid-logitech-dj.c in the Linux kernel before 3.16.2 allows physically proximate attackers to execute arbitrary code or cause a denial of service (invalid kfree) via a crafted device that provides a malformed REPORTTYPENOTIFDEVICEUNPAIRED value.
Last updated 24 July 2024
Last updated 24 July 2024
Buffer overflow in the picolcdrawevent function in devices/hid/hid-picolcdcore.c in the PicoLCD HID device driver in the Linux kernel through 3.16.3, as used in Android on Nexus 7 devices, allows physically proximate attackers to cause a denial of service (system crash) or possibly execute arbitrary code via a crafted device that sends a large report.
It was found that the Linux kernel's ptrace subsystem allowed a traced process' instruction pointer to be set to a non-canonical memory address without forcing the non-sysret code path when returning to user space. A local, unprivileged user could use this flaw to crash the system or, potentially, escalate their privileges on the system. Note: The CVE-2014-4699 issue only affected systems using an Intel CPU.
It was found that the Linux kernel's Infiniband subsystem did not properly sanitize input parameters while registering memory regions from the userspace via the (u)verbs API. As a result, an unrestricted physical memory access could be achieved.
A local user with access to /dev/infiniband/uverbsX could use this flaw to crash the system or, potentially, escalate their privileges on the system.
journalunmapbuffer()'s zapbuffer: code clears a lot of buffer head state ala discardbuffer(), but does not touch Delay or Unwritten as discardbuffer() does.
This can be problematic in some areas of the ext4 code which assume that if they have found a buffer marked unwritten or delay, then it's a live one. They do not check whether a buffer is mapped, so jbd2's partial teardown can be problematic if they assume that this buffer head is still valid.
(Mounting without a journal also avoids the bug, because with no journal we go to unmapbuffer(), which does the right thing).
An unprivileged local user could use this flaw to crash the system.
Buffer overflow in virt/kvm/irqcomm.c in the KVM subsystem in the Linux kernel before 3.2.24 allows local users to cause a denial of service (crash) and possibly execute arbitrary code via vectors related to Message Signaled Interrupts (MSI), irq routing entries, and an incorrect check by the setuproutingentry function before invoking the kvmsetirq function.
Last updated 24 July 2024
Last updated 24 July 2024
Last updated 24 July 2024
Description of the problem: On 32-bit systems, a large args->buffercount from userspace via ioctl may overflow the allocation size, leading to out-of-bounds access.
References: http://www.openwall.com/lists/oss-security/2012/05/21/1
Upstream fix: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=ed8cd3b2cd61004cab85380c52b1817aca1ca49b
Description of the problem: On 32-bit systems, a large args->numcliprects from userspace via ioctl may overflow the allocation size, leading to out-of-bounds access.
References: http://www.openwall.com/lists/oss-security/2012/05/21/1
Upstream fix: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=44afb3a04391a74309d16180d1e4f8386fdfa745
In some cases it may happen that pmdnoneorclearbad() is called with the mmapsem hold in read mode. In those cases the huge page faults can allocate hugepmds under pmdnoneorclearbad() and that can trigger a false positive from pmdbad() that will not like to see a pmd materializing as trans huge.
A privileged user in the KVM guest can use this flaw to crash the host. An unprivileged local user could use this flaw to crash the system.
Proposed upstream patch: http://comments.gmane.org/gmane.linux.kernel.mm/75413
Florian Weimer of the Red Hat Product Security Team discovered that hypervkvpd would exit when it processed a spoofed Netlink packet that had been sent from an untrusted local user, in the following code:
len = recvfrom(fd, kvprecvbuffer, sizeof(kvprecvbuffer), 0, addrp, &addrl);
if (len < 0 || addr.nlpid) { syslog(LOGERR, "recvfrom failed; pid:%u error:%d %s", addr.nlpid, errno, strerror(errno)); close(fd); return -1; }
Acknowledgements:
This issue was discovered by Florian Weimer of the Red Hat Product Security Team.
Last updated 24 July 2024
Last updated 24 July 2024
A NULL pointer dereference flaw has been found in the way a new node's hot-added memory is propagated to other nodes zonelists. An unprivileged local user can use this flaw to crash the system.
Upstream fix: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=08dff7b7d629807dbb1f398c68dd9cd58dd657a1
arch/x86/include/asm/pgtable.h in the Linux kernel before 3.6.2, when transparent huge pages are used, does not properly support PROTNONE memory regions, which allows local users to cause a denial of service (system crash) via a crafted application.
Last updated 24 July 2024
Last updated 24 July 2024
Access to /dev/cpu//msr was protected only using filesystem checks. A local uid 0 (root) user with all capabilities dropped could use this flaw to execute arbitrary code in kernel mode.
Upstream commit: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commitdiff;h=c903f0456bc69176912dee6dd25c6a66ee1aed00
References: http://grsecurity.net/~spender/msr32.c
A flaw was found in the way skbrecvdatagram() processed skbs with no payload when MSGPEEK was requested. An unprivileged local user could use this flaw to cause local denial of service.
Upstream commit: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=77c1090
References: http://seclists.org/oss-sec/2013/q1/310
If a single descriptor crosses a region, the second chunk length should be decremented by size translated so far, instead it includes the full descriptor length. A privileged guest user could use this flaw to crash the host or, potentially, corrupt host memory.
Upstream fix: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=bd97120fc3d1a11f3124c7c9ba1d91f51829eb85
Last updated 24 July 2024
A flaw was found in the way xeniret() used userspace alterable %ds. An unprivileged local guest user in the 32-bit PV Xen domain could use this flaw to crash the guest or, potentially, escalate their privileges.
Acknowledgements:
This issue was discovered by Andrew Jones of Red Hat.
Description of the problem: A buffer overrun flaw was found in kernels from 3.0 to 3.4 when calling logprefix() function from callconsoledrivers(). In logprefix(), the access to "p[1]", "p[2]" or "simplestrtoul(&p[1], &endp, 10)" may cause a buffer overflow as this function is called from callconsoledrivers by passing "&LOGBUF(curindex)" where the index must be masked to do not exceed the buffer's boundary.
A local user able to write to /dev/kmsg could use this flaw to crash the system.
Note: /dev/kmsg is root writable only (at least on RHEL/Fedora), but it still might cause issues in restricted root environments.
References: https://bugs.gentoo.org/458780 https://secunia.com/advisories/52366/