In the Linux kernel, the following vulnerability has been resolved:
net: mvpp2: sync RX data at the hardware packet offset
mvpp2 programs the RX queue packet offset, so hardware writes received data at dmaaddr + MVPP2SKBHEADROOM. The current CPU sync starts at dmaaddr and only covers rxbytes + MVPP2MHSIZE bytes, which syncs the unused headroom and misses the same number of bytes at the packet tail.
On non-coherent DMA systems this can leave the CPU reading stale cache contents for the end of the received frame.
Use dmasyncsinglerangeforcpu() with MVPP2SKBHEADROOM as the range offset so the sync covers the Marvell header and packet data actually written by hardware.
futex: Clear stale exiting pointer in futexlockpi() retry path
In the Linux kernel, the following vulnerability has been resolved:
usb: host: xhci: Fix potential memory leak in xhciallocstreaminfo()
xhciallocstreaminfo() allocates stream context array for streaminfo ->streamctxarray with xhciallocstreamctx(). When some error occurs, streaminfo->streamctxarray is not released, which will lead to a memory leak.
We can fix it by releasing the streaminfo->streamctxarray with xhcifreestreamctx() on the error path to avoid the potential memory leak.
In the Linux kernel, the following vulnerability has been resolved:
media: radio-shark: Add endpoint checks
The syzbot fuzzer was able to provoke a WARNING from the radio-shark2 driver:
------------[ cut here ]------------ usb 1-1: BOGUS urb xfer, pipe 1 != type 3 WARNING: CPU: 0 PID: 3271 at drivers/usb/core/urb.c:504 usbsubmiturb+0xed2/0x1880 drivers/usb/core/urb.c:504 Modules linked in: CPU: 0 PID: 3271 Comm: kworker/0:3 Not tainted 6.1.0-rc4-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 Workqueue: usbhubwq hubevent RIP: 0010:usbsubmiturb+0xed2/0x1880 drivers/usb/core/urb.c:504 Code: 7c 24 18 e8 00 36 ea fb 48 8b 7c 24 18 e8 36 1c 02 ff 41 89 d8 44 89 e1 4c 89 ea 48 89 c6 48 c7 c7 a0 b6 90 8a e8 9a 29 b8 03 <0f> 0b e9 58 f8 ff ff e8 d2 35 ea fb 48 81 c5 c0 05 00 00 e9 84 f7 RSP: 0018:ffffc90003876dd0 EFLAGS: 00010282 RAX: 0000000000000000 RBX: 0000000000000003 RCX: 0000000000000000 RDX: ffff8880750b0040 RSI: ffffffff816152b8 RDI: fffff5200070edac RBP: ffff8880172d81e0 R08: 0000000000000005 R09: 0000000000000000 R10: 0000000080000000 R11: 0000000000000000 R12: 0000000000000001 R13: ffff8880285c5040 R14: 0000000000000002 R15: ffff888017158200 FS: 0000000000000000(0000) GS:ffff8880b9a00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007ffe03235b90 CR3: 000000000bc8e000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: <TASK> usbstartwaiturb+0x101/0x4b0 drivers/usb/core/message.c:58 usbbulkmsg+0x226/0x550 drivers/usb/core/message.c:387 sharkwritereg+0x1ff/0x2e0 drivers/media/radio/radio-shark2.c:88 ...
The problem was caused by the fact that the driver does not check whether the endpoints it uses are actually present and have the appropriate types. This can be fixed by adding a simple check of these endpoints (and similarly for the radio-shark driver).
In the Linux kernel, the following vulnerability has been resolved:
wifi: ath9k: hifusb: fix memory leak of remainskbs
hifdev->remainskb is allocated and used exclusively in ath9khifusbrxstream(). It is implied that an allocated remainskb is processed and subsequently freed (in error paths) only during the next call of ath9khifusbrxstream().
So, if the urbs are deallocated between those two calls due to the device deinitialization or suspend, it is possible that ath9khifusbrxstream() is not called next time and the allocated remainskb is leaked. Our local Syzkaller instance was able to trigger that.
remainskb makes sense when receiving two consecutive urbs which are logically linked together, i.e. a specific data field from the first skb indicates a cached skb to be allocated, memcpy'd with some data and subsequently processed in the next call to ath9khifusbrxstream(). Urbs deallocation supposedly makes that link irrelevant so we need to free the cached skb in those cases.
Fix the leak by introducing a function to explicitly free remainskb (if it is not NULL) when the rx urbs have been deallocated. remainskb is NULL when it has not been allocated at all (hifdev struct is kzalloced) or when it has been processed in next call to ath9khifusbrxstream().
Found by Linux Verification Center (linuxtesting.org) with Syzkaller.
In the Linux kernel, the following vulnerability has been resolved:
wifi: ath6kl: reduce WARN to devdbg() in callback
The warn is triggered on a known race condition, documented in the code above the test, that is correctly handled. Using WARN() hinders automated testing. Reducing severity.
In the Linux kernel, the following vulnerability has been resolved:
mcb: mcb-parse: fix error handing in chameleonparsegdd()
If mcbdeviceregister() returns error in chameleonparsegdd(), the refcount of bus and device name are leaked. Fix this by calling putdevice() to give up the reference, so they can be released in mcbreleasedev() and kobjectcleanup().
In the Linux kernel, the following vulnerability has been resolved:
iommu/amd: Fix pci device refcount leak in pprnotifier()
As comment of pcigetdomainbusandslot() says, it returns a pci device with refcount increment, when finish using it, the caller must decrement the reference count by calling pcidevput(). So call it before returning from pprnotifier() to avoid refcount leak.
In the Linux kernel, the following vulnerability has been resolved:
net: usbnet: Fix WARNING in usbnetstartxmit/usbsubmiturb
The syzbot fuzzer identified a problem in the usbnet driver:
usb 1-1: BOGUS urb xfer, pipe 3 != type 1 WARNING: CPU: 0 PID: 754 at drivers/usb/core/urb.c:504 usbsubmiturb+0xed6/0x1880 drivers/usb/core/urb.c:504 Modules linked in: CPU: 0 PID: 754 Comm: kworker/0:2 Not tainted 6.4.0-rc7-syzkaller-00014-g692b7dc87ca6 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/27/2023 Workqueue: mld mldifcwork RIP: 0010:usbsubmiturb+0xed6/0x1880 drivers/usb/core/urb.c:504 Code: 7c 24 18 e8 2c b4 5b fb 48 8b 7c 24 18 e8 42 07 f0 fe 41 89 d8 44 89 e1 4c 89 ea 48 89 c6 48 c7 c7 a0 c9 fc 8a e8 5a 6f 23 fb <0f> 0b e9 58 f8 ff ff e8 fe b3 5b fb 48 81 c5 c0 05 00 00 e9 84 f7 RSP: 0018:ffffc9000463f568 EFLAGS: 00010086 RAX: 0000000000000000 RBX: 0000000000000001 RCX: 0000000000000000 RDX: ffff88801eb28000 RSI: ffffffff814c03b7 RDI: 0000000000000001 RBP: ffff8881443b7190 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000003 R13: ffff88802a77cb18 R14: 0000000000000003 R15: ffff888018262500 FS: 0000000000000000(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000556a99c15a18 CR3: 0000000028c71000 CR4: 0000000000350ef0 Call Trace: <TASK> usbnetstartxmit+0xfe5/0x2190 drivers/net/usb/usbnet.c:1453 netdevstartxmit include/linux/netdevice.h:4918 [inline] netdevstartxmit include/linux/netdevice.h:4932 [inline] xmitone net/core/dev.c:3578 [inline] devhardstartxmit+0x187/0x700 net/core/dev.c:3594 ...
This bug is caused by the fact that usbnet trusts the bulk endpoint addresses its probe routine receives in the driverinfo structure, and it does not check to see that these endpoints actually exist and have the expected type and directions.
The fix is simply to add such a check.
In the Linux kernel, the following vulnerability has been resolved:
ALSA: usb-audio: Fix potential memory leaks
When the driver hits -ENOMEM at allocating a URB or a buffer, it aborts and goes to the error path that releases the all previously allocated resources. However, when -ENOMEM hits at the middle of the sync EP URB allocation loop, the partially allocated URBs might be left without released, because ep->nurbs is still zero at that point.
Fix it by setting ep->nurbs at first, so that the error handler loops over the full URB list.
In the Linux kernel, the following vulnerability has been resolved:
ntbnetdev: Use devkfreeskbany() in interrupt context
TX/RX callback handlers (ntbnetdevtxhandler(), ntbnetdevrxhandler()) can be called in interrupt context via the DMA framework when the respective DMA operations have completed. As such, any calls by these routines to free skb's, should use the interrupt context safe devkfreeskbany() function.
Previously, these callback handlers would call the interrupt unsafe version of devkfreeskb(). This has not presented an issue on Intel IOAT DMA engines as that driver utilizes tasklets rather than a hard interrupt handler, like the AMD PTDMA DMA driver. On AMD systems, a kernel WARNING message is encountered, which is being issued from skbreleaseheadstate() due to inhardirq() being true.
Besides the user visible WARNING from the kernel, the other symptom of this bug was that TCP/IP performance across the ntbnetdev interface was very poor, i.e. approximately an order of magnitude below what was expected. With the repair to use devkfreeskbany(), kernel WARNINGs from skbreleaseheadstate() ceased and TCP/IP performance, as measured by iperf, was on par with expected results, approximately 20 Gb/s on AMD Milan based server. Note that this performance is comparable with Intel based servers.
In the Linux kernel, the following vulnerability has been resolved:
media: v4l2-mem2mem: add lock to protect parameter numrdy
Getting below error when using KCSAN to check the driver. Adding lock to protect parameter numrdy when getting the value with function: v4l2m2mnumsrcbufsready/v4l2m2mnumdstbufsready.
kworker/u16:3: [name:report&]BUG: KCSAN: data-race in v4l2m2mbufqueue kworker/u16:3: [name:report&]
kworker/u16:3: [name:report&]read-write to 0xffffff8105f35b94 of 1 bytes by task 20865 on cpu 7: kworker/u16:3: v4l2m2mbufqueue+0xd8/0x10c
In the Linux kernel, the following vulnerability has been resolved:
mmc: vub300: fix warning - do not call blocking ops when !TASKRUNNING
vub300enablesdioirq() works with mutex and need TASKRUNNING here. Ensure that we mark current as TASKRUNNING for sleepable context.
[ 77.554641] do not call blocking ops when !TASKRUNNING; state=1 set at [<ffffffff92a72c1d>] sdioirqthread+0x17d/0x5b0 [ 77.554652] WARNING: CPU: 2 PID: 1983 at kernel/sched/core.c:9813 mightsleep+0x116/0x160 [ 77.554905] CPU: 2 PID: 1983 Comm: ksdioirqd/mmc1 Tainted: G OE 6.1.0-rc5 #1 [ 77.554910] Hardware name: Intel(R) Client Systems NUC8i7BEH/NUC8BEB, BIOS BECFL357.86A.0081.2020.0504.1834 05/04/2020 [ 77.554912] RIP: 0010:mightsleep+0x116/0x160 [ 77.554920] RSP: 0018:ffff888107b7fdb8 EFLAGS: 00010282 [ 77.554923] RAX: 0000000000000000 RBX: ffff888118c1b740 RCX: 0000000000000000 [ 77.554926] RDX: 0000000000000001 RSI: 0000000000000004 RDI: ffffed1020f6ffa9 [ 77.554928] RBP: ffff888107b7fde0 R08: 0000000000000001 R09: ffffed1043ea60ba [ 77.554930] R10: ffff88821f5305cb R11: ffffed1043ea60b9 R12: ffffffff93aa3a60 [ 77.554932] R13: 000000000000011b R14: 7fffffffffffffff R15: ffffffffc0558660 [ 77.554934] FS: 0000000000000000(0000) GS:ffff88821f500000(0000) knlGS:0000000000000000 [ 77.554937] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 77.554939] CR2: 00007f8a44010d68 CR3: 000000024421a003 CR4: 00000000003706e0 [ 77.554942] Call Trace: [ 77.554944] <TASK> [ 77.554952] mutexlock+0x78/0xf0 [ 77.554973] vub300enablesdioirq+0x103/0x3c0 [vub300] [ 77.554981] sdioirqthread+0x25c/0x5b0 [ 77.555006] kthread+0x2b8/0x370 [ 77.555017] retfromfork+0x1f/0x30 [ 77.555023] </TASK> [ 77.555025] ---[ end trace 0000000000000000 ]---
In the Linux kernel, the following vulnerability has been resolved:
mtd: rawnand: stm32fmc2: avoid overlapping mappings on ECC buffer
Avoid below overlapping mappings by using a contiguous non-cacheable buffer.
[ 4.077708] DMA-API: stm32fmc2nfc 48810000.nand-controller: cacheline tracking EEXIST, overlapping mappings aren't supported [ 4.089103] WARNING: CPU: 1 PID: 44 at kernel/dma/debug.c:568 adddmaentry+0x23c/0x300 [ 4.097071] Modules linked in: [ 4.100101] CPU: 1 PID: 44 Comm: kworker/u4:2 Not tainted 6.1.82 #1 [ 4.106346] Hardware name: STMicroelectronics STM32MP257F VALID1 SNOR / MB1704 (LPDDR4 Power discrete) + MB1703 + MB1708 (SNOR MB1730) (DT) [ 4.118824] Workqueue: eventsunbound deferredprobeworkfunc [ 4.124674] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 4.131624] pc : adddmaentry+0x23c/0x300 [ 4.135658] lr : adddmaentry+0x23c/0x300 [ 4.139792] sp : ffff800009dbb490 [ 4.143016] x29: ffff800009dbb4a0 x28: 0000000004008022 x27: ffff8000098a6000 [ 4.150174] x26: 0000000000000000 x25: ffff8000099e7000 x24: ffff8000099e7de8 [ 4.157231] x23: 00000000ffffffff x22: 0000000000000000 x21: ffff8000098a6a20 [ 4.164388] x20: ffff000080964180 x19: ffff800009819ba0 x18: 0000000000000006 [ 4.171545] x17: 6361727420656e69 x16: 6c6568636163203a x15: 72656c6c6f72746e [ 4.178602] x14: 6f632d646e616e2e x13: ffff800009832f58 x12: 00000000000004ec [ 4.185759] x11: 00000000000001a4 x10: ffff80000988af58 x9 : ffff800009832f58 [ 4.192916] x8 : 00000000ffffefff x7 : ffff80000988af58 x6 : 80000000fffff000 [ 4.199972] x5 : 000000000000bff4 x4 : 0000000000000000 x3 : 0000000000000000 [ 4.207128] x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffff0000812d2c40 [ 4.214185] Call trace: [ 4.216605] adddmaentry+0x23c/0x300 [ 4.220338] debugdmamapsg+0x198/0x350 [ 4.224373] dmamapsgattrs+0xa0/0x110 [ 4.228411] dmamapsgattrs+0x10/0x2c [ 4.232247] stm32fmc2nfcxfer.isra.0+0x1c8/0x3fc [ 4.237088] stm32fmc2nfcseqreadpage+0xc8/0x174 [ 4.242127] nandreadoob+0x1d4/0x8e0 [ 4.245861] mtdreadoobstd+0x58/0x84 [ 4.249596] mtdreadoob+0x90/0x150 [ 4.253231] mtdread+0x68/0xac
In the Linux kernel, the following vulnerability has been resolved:
ppp: fix memory leak in padcompressskb
If allocskb() fails in padcompressskb(), it returns NULL without releasing the old skb. The caller does:
skb = padcompressskb(ppp, skb); if (!skb) goto drop;
drop: kfreeskb(skb);
When padcompressskb() returns NULL, the reference to the old skb is lost and kfreeskb(skb) ends up doing nothing, leading to a memory leak.
Align padcompressskb() semantics with realloc(): only free the old skb if allocation and compression succeed. At the call site, use the newskb variable so the original skb is not lost when padcompressskb() fails.
In the Linux kernel, the following vulnerability has been resolved:
media: uvcvideo: Handle cameras with invalid descriptors
If the source entity does not contain any pads, do not create a link.
In the Linux kernel, the following vulnerability has been resolved:
ext4: init quota for 'old.inode' in 'ext4rename'
Syzbot found the following issue: ext4parseparam: swantextraisize=128 ext4inodeinfoinit: swantextraisize=32 ext4rename: old.inode=ffff88823869a2c8 old.dir=ffff888238699828 new.inode=ffff88823869d7e8 new.dir=ffff888238699828 ext4markinodedirty: inode=ffff888238699828 eaisize=32 wanteasize=128 ext4markinodedirty: inode=ffff88823869a2c8 eaisize=32 wanteasize=128 ext4xattrblockset: inode=ffff88823869a2c8 ------------[ cut here ]------------ WARNING: CPU: 13 PID: 2234 at fs/ext4/xattr.c:2070 ext4xattrblockset.cold+0x22/0x980 Modules linked in: RIP: 0010:ext4xattrblockset.cold+0x22/0x980 RSP: 0018:ffff888227d3f3b0 EFLAGS: 00010202 RAX: 0000000000000001 RBX: ffff88823007a000 RCX: 0000000000000000 RDX: 0000000000000a03 RSI: 0000000000000040 RDI: ffff888230078178 RBP: 0000000000000000 R08: 000000000000002c R09: ffffed1075c7df8e R10: ffff8883ae3efc6b R11: ffffed1075c7df8d R12: 0000000000000000 R13: ffff88823869a2c8 R14: ffff8881012e0460 R15: dffffc0000000000 FS: 00007f350ac1f740(0000) GS:ffff8883ae200000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f350a6ed6a0 CR3: 0000000237456000 CR4: 00000000000006e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: <TASK> ? ext4xattrsetentry+0x3b7/0x2320 ? ext4xattrblockset+0x0/0x2020 ? ext4xattrsetentry+0x0/0x2320 ? ext4xattrcheckentries+0x77/0x310 ? ext4xattribodyset+0x23b/0x340 ext4xattrmovetoblock+0x594/0x720 ext4expandextraisizeea+0x59a/0x10f0 ext4expandextraisize+0x278/0x3f0 ext4markinodedirty.cold+0x347/0x410 ext4rename+0xed3/0x174f vfsrename+0x13a7/0x2510 dorenameat2+0x55d/0x920 x64sysrename+0x7d/0xb0 dosyscall64+0x3b/0xa0 entrySYSCALL64afterhwframe+0x72/0xdc
As 'ext4rename' will modify 'old.inode' ctime and mark inode dirty, which may trigger expand 'extraisize' and allocate block. If inode didn't init quota will lead to warning. To solve above issue, init 'old.inode' firstly in 'ext4rename'.
In the Linux kernel, the following vulnerability has been resolved:
KVM: x86: use arrayindexnospec with indices that come from guest
min and destid are guest-controlled indices. Using arrayindexnospec() after the bounds checks clamps these values to mitigate speculative execution side-channels.
In the Linux kernel, the following vulnerability has been resolved:
wifi: brcmfmac: fix potential memory leak in brcmfnetdevstartxmit()
The brcmfnetdevstartxmit() returns NETDEVTXOK without freeing skb in case of pskbexpandhead() fails, add devkfreeskb() to fix it. Compile tested only.
In the Linux kernel, the following vulnerability has been resolved:
wifi: ath9k: verify the expected usbendpoints are present
The bug arises when a USB device claims to be an ATH9K but doesn't have the expected endpoints. (In this case there was an interrupt endpoint where the driver expected a bulk endpoint.) The kernel needs to be able to handle such devices without getting an internal error.
usb 1-1: BOGUS urb xfer, pipe 3 != type 1 WARNING: CPU: 3 PID: 500 at drivers/usb/core/urb.c:493 usbsubmiturb+0xce2/0x1430 drivers/usb/core/urb.c:493 Modules linked in: CPU: 3 PID: 500 Comm: kworker/3:2 Not tainted 5.10.135-syzkaller #0 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 Workqueue: events requestfirmwareworkfunc RIP: 0010:usbsubmiturb+0xce2/0x1430 drivers/usb/core/urb.c:493 Call Trace: ath9khifusballocrxurbs drivers/net/wireless/ath/ath9k/hifusb.c:908 [inline] ath9khifusballocurbs+0x75e/0x1010 drivers/net/wireless/ath/ath9k/hifusb.c:1019 ath9khifusbdevinit drivers/net/wireless/ath/ath9k/hifusb.c:1109 [inline] ath9khifusbfirmwarecb+0x142/0x530 drivers/net/wireless/ath/ath9k/hifusb.c:1242 requestfirmwareworkfunc+0x12e/0x240 drivers/base/firmwareloader/main.c:1097 processonework+0x9af/0x1600 kernel/workqueue.c:2279 workerthread+0x61d/0x12f0 kernel/workqueue.c:2425 kthread+0x3b4/0x4a0 kernel/kthread.c:313 retfromfork+0x22/0x30 arch/x86/entry/entry64.S:299
Found by Linux Verification Center (linuxtesting.org) with Syzkaller.
In the Linux kernel, the following vulnerability has been resolved:
UM: cpuinfo: Fix a warning for CONFIGCPUMASKOFFSTACK
When CONFIGCPUMASKOFFSTACK and CONFIGDEBUGPERCPUMAPS is selected, cpumaxbitswarn() generates a runtime warning similar as below while we show /proc/cpuinfo. Fix this by using nrcpuids (the runtime limit) instead of NRCPUS to iterate CPUs.
[ 3.052463] ------------[ cut here ]------------ [ 3.059679] WARNING: CPU: 3 PID: 1 at include/linux/cpumask.h:108 showcpuinfo+0x5e8/0x5f0 [ 3.070072] Modules linked in: efivarfs autofs4 [ 3.076257] CPU: 0 PID: 1 Comm: systemd Not tainted 5.19-rc5+ #1052 [ 3.099465] Stack : 9000000100157b08 9000000000f18530 9000000000cf846c 9000000100154000 [ 3.109127] 9000000100157a50 0000000000000000 9000000100157a58 9000000000ef7430 [ 3.118774] 90000001001578e8 0000000000000040 0000000000000020 ffffffffffffffff [ 3.128412] 0000000000aaaaaa 1ab25f00eec96a37 900000010021de80 900000000101c890 [ 3.138056] 0000000000000000 0000000000000000 0000000000000000 0000000000aaaaaa [ 3.147711] ffff8000339dc220 0000000000000001 0000000006ab4000 0000000000000000 [ 3.157364] 900000000101c998 0000000000000004 9000000000ef7430 0000000000000000 [ 3.167012] 0000000000000009 000000000000006c 0000000000000000 0000000000000000 [ 3.176641] 9000000000d3de08 9000000001639390 90000000002086d8 00007ffff0080286 [ 3.186260] 00000000000000b0 0000000000000004 0000000000000000 0000000000071c1c [ 3.195868] ... [ 3.199917] Call Trace: [ 3.203941] [<90000000002086d8>] showstack+0x38/0x14c [ 3.210666] [<9000000000cf846c>] dumpstacklvl+0x60/0x88 [ 3.217625] [<900000000023d268>] warn+0xd0/0x100 [ 3.223958] [<9000000000cf3c90>] warnslowpathfmt+0x7c/0xcc [ 3.231150] [<9000000000210220>] showcpuinfo+0x5e8/0x5f0 [ 3.238080] [<90000000004f578c>] seqreaditer+0x354/0x4b4 [ 3.245098] [<90000000004c2e90>] newsyncread+0x17c/0x1c4 [ 3.252114] [<90000000004c5174>] vfsread+0x138/0x1d0 [ 3.258694] [<90000000004c55f8>] ksysread+0x70/0x100 [ 3.265265] [<9000000000cfde9c>] dosyscall+0x7c/0x94 [ 3.271820] [<9000000000202fe4>] handlesyscall+0xc4/0x160 [ 3.281824] ---[ end trace 8b484262b4b8c24c ]---
In the Linux kernel, the following vulnerability has been resolved:
mm,hugetlb: take hugetlblock before decrementing h->resvhugepages
The h->hugepages counters are protected by the hugetlblock, but allochugepage has a corner case where it can decrement the counter outside of the lock.
This could lead to a corrupted value of h->resvhugepages, which we have observed on our systems.
Take the hugetlblock before decrementing h->resvhugepages to avoid a potential race.
In the Linux kernel, the following vulnerability has been resolved:
NFS: Fix the setting of capabilities when automounting a new filesystem
Capabilities cannot be inherited when we cross into a new filesystem. They need to be reset to the minimal defaults, and then probed for again.
fs: Prevent file descriptor table allocations exceeding INTMAX
In the Linux kernel, the following vulnerability has been resolved:
media: rainshadow-cec: fix TOCTOU race condition in raininterrupt()
In the interrupt handler raininterrupt(), the buffer full check on rain->buflen is performed before acquiring rain->buflock. This creates a Time-of-Check to Time-of-Use (TOCTOU) race condition, as rain->buflen is concurrently accessed and modified in the work handler rainirqworkhandler() under the same lock.
Multiple interrupt invocations can race, with each reading buflen before it becomes full and then proceeding. This can lead to both interrupts attempting to write to the buffer, incrementing buflen beyond its capacity (DATASIZE) and causing a buffer overflow.
Fix this bug by moving the spinlock() to before the buffer full check. This ensures that the check and the subsequent buffer modification are performed atomically, preventing the race condition. An corresponding spinunlock() is added to the overflow path to correctly release the lock.
This possible bug was found by an experimental static analysis tool developed by our team.
In the Linux kernel, the following vulnerability has been resolved:
media: uvcvideo: Fix 1-byte out-of-bounds read in uvcparseformat()
The buffer length check before calling uvcparseformat() only ensured that the buffer has at least 3 bytes (buflen > 2), buf the function accesses buffer[3], requiring at least 4 bytes.
This can lead to an out-of-bounds read if the buffer has exactly 3 bytes.
Fix it by checking that the buffer has at least 4 bytes in uvcparseformat().
In the Linux kernel, the following vulnerability has been resolved:
perf/core: Exit early on perfmmap() fail
When perfmmap() fails to allocate a buffer, it still invokes the eventmapped() callback of the related event. On X86 this might increase the perfrdpmcallowed reference counter. But nothing undoes this as perfmmapclose() is never called in this case, which causes another reference count leak.
Return early on failure to prevent that.
In the Linux kernel, the following vulnerability has been resolved:
usb: net: sierra: check for no status endpoint
The driver checks for having three endpoints and having bulk in and out endpoints, but not that the third endpoint is interrupt input. Rectify the omission.
In the Linux kernel, the following vulnerability has been resolved:
net: usb: aqc111: fix error handling of usbnet read calls
Syzkaller, courtesy of syzbot, identified an error (see report [1]) in aqc111 driver, caused by incomplete sanitation of usb read calls' results. This problem is quite similar to the one fixed in commit 920a9fa27e78 ("net: asix: add proper error handling of usb read errors").
For instance, usbnetreadcmd() may read fewer than 'size' bytes, even if the caller expected the full amount, and aqc111readcmd() will not check its result properly. As [1] shows, this may lead to MAC address in aqc111bind() being only partly initialized, triggering KMSAN warnings.
Fix the issue by verifying that the number of bytes read is as expected and not less.
[1] Partial syzbot report: BUG: KMSAN: uninit-value in isvalidetheraddr include/linux/etherdevice.h:208 [inline] BUG: KMSAN: uninit-value in usbnetprobe+0x2e57/0x4390 drivers/net/usb/usbnet.c:1830 isvalidetheraddr include/linux/etherdevice.h:208 [inline] usbnetprobe+0x2e57/0x4390 drivers/net/usb/usbnet.c:1830 usbprobeinterface+0xd01/0x1310 drivers/usb/core/driver.c:396 calldriverprobe drivers/base/dd.c:-1 [inline] reallyprobe+0x4d1/0xd90 drivers/base/dd.c:658 driverprobedevice+0x268/0x380 drivers/base/dd.c:800 ...
Uninit was stored to memory at: devaddrmod+0xb0/0x550 net/core/devaddrlists.c:582 devaddrset include/linux/netdevice.h:4874 [inline] ethhwaddrset include/linux/etherdevice.h:325 [inline] aqc111bind+0x35f/0x1150 drivers/net/usb/aqc111.c:717 usbnetprobe+0xbe6/0x4390 drivers/net/usb/usbnet.c:1772 usbprobeinterface+0xd01/0x1310 drivers/usb/core/driver.c:396 ...
Uninit was stored to memory at: etheraddrcopy include/linux/etherdevice.h:305 [inline] aqc111readpermmac drivers/net/usb/aqc111.c:663 [inline] aqc111bind+0x794/0x1150 drivers/net/usb/aqc111.c:713 usbnetprobe+0xbe6/0x4390 drivers/net/usb/usbnet.c:1772 usbprobeinterface+0xd01/0x1310 drivers/usb/core/driver.c:396 calldriverprobe drivers/base/dd.c:-1 [inline] ...
Local variable buf.i created at: aqc111readpermmac drivers/net/usb/aqc111.c:656 [inline] aqc111bind+0x221/0x1150 drivers/net/usb/aqc111.c:713 usbnetprobe+0xbe6/0x4390 drivers/net/usb/usbnet.c:1772
In the Linux kernel, the following vulnerability has been resolved:
net: ch9200: fix uninitialised access during miinwayrestart
In miinwayrestart() the code attempts to call mii->mdioread which is ch9200mdioread(). ch9200mdioread() utilises a local buffer called "buff", which is initialised with controlread(). However "buff" is conditionally initialised inside controlread():
if (err == size) { memcpy(data, buf, size); }
If the condition of "err == size" is not met, then "buff" remains uninitialised. Once this happens the uninitialised "buff" is accessed and returned during ch9200mdioread():
return (buff[0] | buff[1] << 8);
The problem stems from the fact that ch9200mdioread() ignores the return value of controlread(), leading to uinit-access of "buff".
To fix this we should check the return value of controlread() and return early on error.