An out-of-bounds read vulnerability was found in Netfilter Connection Tracking (conntrack) in the Linux kernel. This flaw allows a remote user to disclose sensitive information via the DCCP protocol.
In the Linux kernel, the following vulnerability has been resolved:
ipv6: Fix KASAN: slab-out-of-bounds Read in fib6nhflushexceptions
Reported by syzbot: HEAD commit: 90c911ad Merge tag 'fixes' of git://git.kernel.org/pub/scm.. git tree: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master dashboard link: https://syzkaller.appspot.com/bug?extid=123aa35098fd3c000eb7 compiler: Debian clang version 11.0.1-2
================================================================== BUG: KASAN: slab-out-of-bounds in fib6nhgetexcptnbucket net/ipv6/route.c:1604 [inline] BUG: KASAN: slab-out-of-bounds in fib6nhflushexceptions+0xbd/0x360 net/ipv6/route.c:1732 Read of size 8 at addr ffff8880145c78f8 by task syz-executor.4/17760
CPU: 0 PID: 17760 Comm: syz-executor.4 Not tainted 5.12.0-rc8-syzkaller #0 Call Trace: <IRQ> dumpstack lib/dumpstack.c:79 [inline] dumpstack+0x202/0x31e lib/dumpstack.c:120 printaddressdescription+0x5f/0x3b0 mm/kasan/report.c:232 kasanreport mm/kasan/report.c:399 [inline] kasanreport+0x15c/0x200 mm/kasan/report.c:416 fib6nhgetexcptnbucket net/ipv6/route.c:1604 [inline] fib6nhflushexceptions+0xbd/0x360 net/ipv6/route.c:1732 fib6nhrelease+0x9a/0x430 net/ipv6/route.c:3536 fib6infodestroyrcu+0xcb/0x1c0 net/ipv6/ip6fib.c:174 rcudobatch kernel/rcu/tree.c:2559 [inline] rcucore+0x8f6/0x1450 kernel/rcu/tree.c:2794 dosoftirq+0x372/0x7a6 kernel/softirq.c:345 invokesoftirq kernel/softirq.c:221 [inline] irqexitrcu+0x22c/0x260 kernel/softirq.c:422 irqexitrcu+0x5/0x20 kernel/softirq.c:434 sysvecapictimerinterrupt+0x91/0xb0 arch/x86/kernel/apic/apic.c:1100 </IRQ> asmsysvecapictimerinterrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:632 RIP: 0010:lockacquire+0x1f6/0x720 kernel/locking/lockdep.c:5515 Code: f6 84 24 a1 00 00 00 02 0f 85 8d 02 00 00 f7 c3 00 02 00 00 49 bd 00 00 00 00 00 fc ff df 74 01 fb 48 c7 44 24 40 0e 36 e0 45 <4b> c7 44 3d 00 00 00 00 00 4b c7 44 3d 09 00 00 00 00 43 c7 44 3d RSP: 0018:ffffc90009e06560 EFLAGS: 00000206 RAX: 1ffff920013c0cc0 RBX: 0000000000000246 RCX: dffffc0000000000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: ffffc90009e066e0 R08: dffffc0000000000 R09: fffffbfff1f992b1 R10: fffffbfff1f992b1 R11: 0000000000000000 R12: 0000000000000000 R13: dffffc0000000000 R14: 0000000000000000 R15: 1ffff920013c0cb4 rculockacquire+0x2a/0x30 include/linux/rcupdate.h:267 rcureadlock include/linux/rcupdate.h:656 [inline] ext4getgroupinfo+0xea/0x340 fs/ext4/ext4.h:3231 ext4mbprefetch+0x123/0x5d0 fs/ext4/mballoc.c:2212 ext4mbregularallocator+0x8a5/0x28f0 fs/ext4/mballoc.c:2379 ext4mbnewblocks+0xc6e/0x24f0 fs/ext4/mballoc.c:4982 ext4extmapblocks+0x2be3/0x7210 fs/ext4/extents.c:4238 ext4mapblocks+0xab3/0x1cb0 fs/ext4/inode.c:638 ext4getblk+0x187/0x6c0 fs/ext4/inode.c:848 ext4bread+0x2a/0x1c0 fs/ext4/inode.c:900 ext4append+0x1a4/0x360 fs/ext4/namei.c:67 ext4initnewdir+0x337/0xa10 fs/ext4/namei.c:2768 ext4mkdir+0x4b8/0xc00 fs/ext4/namei.c:2814 vfsmkdir+0x45b/0x640 fs/namei.c:3819 ovldomkdir fs/overlayfs/overlayfs.h:161 [inline] ovlmkdirreal+0x53/0x1a0 fs/overlayfs/dir.c:146 ovlcreatereal+0x280/0x490 fs/overlayfs/dir.c:193 ovlworkdircreate+0x425/0x600 fs/overlayfs/super.c:788 ovlmakeworkdir+0xed/0x1140 fs/overlayfs/super.c:1355 ovlgetworkdir fs/overlayfs/super.c:1492 [inline] ovlfillsuper+0x39ee/0x5370 fs/overlayfs/super.c:2035 mountnodev+0x52/0xe0 fs/super.c:1413 legacygettree+0xea/0x180 fs/fscontext.c:592 vfsgettree+0x86/0x270 fs/super.c:1497 donewmount fs/namespace.c:2903 [inline] pathmount+0x196f/0x2be0 fs/namespace.c:3233 domount fs/namespace.c:3246 [inline] dosysmount fs/namespace.c:3454 [inline] sesysmount+0x2f9/0x3b0 fs/namespace.c:3431 dosyscall64+0x2d/0x70 arch/x86/entry/common.c:46 entrySYSCALL64afterhwframe+0x44/0xae RIP: 0033:0x4665f9 Code: ff ff c3 66 2e 0f 1f 84 ---truncated---
In the Linux kernel, the following vulnerability has been resolved:
tcp: add sanity checks to rx zerocopy
TCP rx zerocopy intent is to map pages initially allocated from NIC drivers, not pages owned by a fs.
This patch adds to canmapfrag() these additional checks:
- Page must not be a compound one. - page->mapping must be NULL.
This fixes the panic reported by ZhangPeng.
syzbot was able to loopback packets built with sendfile(), mapping pages owned by an ext4 file to TCP rx zerocopy.
r3 = socket$inettcp(0x2, 0x1, 0x0) mmap(&(0x7f0000ff9000/0x4000)=nil, 0x4000, 0x0, 0x12, r3, 0x0) r4 = socket$inettcp(0x2, 0x1, 0x0) bind$inet(r4, &(0x7f0000000000)={0x2, 0x4e24, @multicast1}, 0x10) connect$inet(r4, &(0x7f00000006c0)={0x2, 0x4e24, @empty}, 0x10) r5 = openat$dir(0xffffffffffffff9c, &(0x7f00000000c0)='./file0\x00', 0x181e42, 0x0) fallocate(r5, 0x0, 0x0, 0x85b8) sendfile(r4, r5, 0x0, 0x8ba0) getsockopt$inettcpTCPZEROCOPYRECEIVE(r4, 0x6, 0x23, &(0x7f00000001c0)={&(0x7f0000ffb000/0x3000)=nil, 0x3000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, &(0x7f0000000440)=0x40) r6 = openat$dir(0xffffffffffffff9c, &(0x7f00000000c0)='./file0\x00', 0x181e42, 0x0)
In the Linux kernel, the following vulnerability has been resolved:
ext4: fix double-free of blocks due to wrong extents movedlen
In ext4moveextents(), movedlen is only updated when all moves are successfully executed, and only discards originode and donorinode preallocations when movedlen is not zero. When the loop fails to exit after successfully moving some extents, movedlen is not updated and remains at 0, so it does not discard the preallocations.
If the moved extents overlap with the preallocated extents, the overlapped extents are freed twice in ext4mbreleaseinodepa() and ext4processfreeddata() (as described in commit 94d7c16cbbbd ("ext4: Fix double-free of blocks with EXT4IOCMOVEEXT")), and bbfree is incremented twice. Hence when trim is executed, a zero-division bug is triggered in mbupdateavgfragmentsize() because bbfree is not zero and bbfragments is zero.
Therefore, update movelen after each extent move to avoid the issue.
In the Linux kernel, the following vulnerability has been resolved:
drm/amdgpu: validate the parameters of bo mapping operations more clearly
The Linux kernel CVE team has assigned CVE-2024-26922 to this issue.
Upstream advisory: https://lore.kernel.org/linux-cve-announce/2024042317-CVE-2024-26922-896d@gregkh/T
In the Linux kernel, the following vulnerability has been resolved:
ALSA: emu10k1: Fix out of bounds access in sndemu10k1pcmchannelalloc()
The voice allocator sometimes begins allocating from near the end of the array and then wraps around, however sndemu10k1pcmchannelalloc() accesses the newly allocated voices as if it never wrapped around.
This results in out of bounds access if the first voice has a high enough index so that firstvoice + requestedvoicecount > NUMG (64). The more voices are requested, the more likely it is for this to occur.
This was initially discovered using PipeWire, however it can be reproduced by calling aplay multiple times with 16 channels: aplay -r 48000 -D plughw:CARD=Live,DEV=3 -c 16 /dev/zero
UBSAN: array-index-out-of-bounds in sound/pci/emu10k1/emupcm.c:127:40 index 65 is out of range for type 'sndemu10k1voice [64]' CPU: 1 PID: 31977 Comm: aplay Tainted: G W IOE 6.0.0-rc2-emu10k1+ #7 Hardware name: ASUSTEK COMPUTER INC P5W DH Deluxe/P5W DH Deluxe, BIOS 3002 07/22/2010 Call Trace: <TASK> dumpstacklvl+0x49/0x63 dumpstack+0x10/0x16 ubsanepilogue+0x9/0x3f ubsanhandleoutofbounds.cold+0x44/0x49 sndemu10k1playbackhwparams+0x3bc/0x420 [sndemu10k1] sndpcmhwparams+0x29f/0x600 [sndpcm] sndpcmcommonioctl+0x188/0x1410 [sndpcm] ? exittousermodeprepare+0x35/0x170 ? dosyscall64+0x69/0x90 ? syscallexittousermode+0x26/0x50 ? dosyscall64+0x69/0x90 ? exittousermodeprepare+0x35/0x170 sndpcmioctl+0x27/0x40 [sndpcm] x64sysioctl+0x95/0xd0 dosyscall64+0x5c/0x90 ? dosyscall64+0x69/0x90 ? dosyscall64+0x69/0x90 entrySYSCALL64afterhwframe+0x63/0xcd
In the Linux kernel, the following vulnerability has been resolved:
net: lltemac: Make sure to free skb when it is completely used
With the skb pointer piggy-backed on the TX BD, we have a simple and efficient way to free the skb buffer when the frame has been transmitted. But in order to avoid freeing the skb while there are still fragments from the skb in use, we need to piggy-back on the TX BD of the skb, not the first.
Without this, we are doing use-after-free on the DMA side, when the first BD of a multi TX BD packet is seen as completed in xmitdone, and the remaining BDs are still being processed.
In the Linux kernel, the following vulnerability has been resolved:
net: validate lwtstate->data before returning from skbtunnelinfo()
skbtunnelinfo() returns pointer of lwtstate->data as iptunnelinfo type without validation. lwtstate->data can have various types such as mplsiptunnelencap, etc and these are not compatible. So skbtunnelinfo() should validate before returning that pointer.
Splat looks like: BUG: KASAN: slab-out-of-bounds in vxlangetroute+0x418/0x4b0 [vxlan] Read of size 2 at addr ffff888106ec2698 by task ping/811
CPU: 1 PID: 811 Comm: ping Not tainted 5.13.0+ #1195 Call Trace: dumpstacklvl+0x56/0x7b printaddressdescription.constprop.8.cold.13+0x13/0x2ee ? vxlangetroute+0x418/0x4b0 [vxlan] ? vxlangetroute+0x418/0x4b0 [vxlan] kasanreport.cold.14+0x83/0xdf ? vxlangetroute+0x418/0x4b0 [vxlan] vxlangetroute+0x418/0x4b0 [vxlan] [ ... ] vxlanxmitone+0x148b/0x32b0 [vxlan] [ ... ] vxlanxmit+0x25c5/0x4780 [vxlan] [ ... ] devhardstartxmit+0x1ae/0x6e0 devqueuexmit+0x1f39/0x31a0 [ ... ] neighxmit+0x2f9/0x940 mplsxmit+0x911/0x1600 [mplsiptunnel] lwtunnelxmit+0x18f/0x450 ipfinishoutput2+0x867/0x2040 [ ... ]
In the Linux kernel, the following vulnerability has been resolved:
drm/sched: Avoid data corruptions
Wait for all dependencies of a job to complete before killing it to avoid data corruptions.
In the Linux kernel, the following vulnerability has been resolved:
coresight: tmc-etf: Fix global-out-of-bounds in tmcupdateetfbuffer()
commit 6f755e85c332 ("coresight: Add helper for inserting synchronization packets") removed trailing '\0' from barrierpkt array and updated the call sites like etbupdatebuffer() to have proper checks for barrierpkt size before read but missed updating tmcupdateetfbuffer() which still reads barrierpkt past the array size resulting in KASAN out-of-bounds bug. Fix this by adding a check for barrierpkt size before accessing like it is done in etbupdatebuffer().
BUG: KASAN: global-out-of-bounds in tmcupdateetfbuffer+0x4b8/0x698 Read of size 4 at addr ffffffd05b7d1030 by task perf/2629
Call trace: dumpbacktrace+0x0/0x27c showstack+0x20/0x2c dumpstack+0x11c/0x188 printaddressdescription+0x3c/0x4a4 kasanreport+0x140/0x164 kasanreport+0x10/0x18 asanreportload4noabort+0x1c/0x24 tmcupdateetfbuffer+0x4b8/0x698 etmeventstop+0x248/0x2d8 etmeventdel+0x20/0x2c eventschedout+0x214/0x6f0 groupschedout+0xd0/0x270 ctxschedout+0x2ec/0x518 perfeventtaskschedout+0x4fc/0xe6c schedule+0x1094/0x16a0 preemptscheduleirq+0x88/0x170 arm64preemptscheduleirq+0xf0/0x18c el1irq+0xe8/0x180 perfeventexec+0x4d8/0x56c setupnewexec+0x204/0x400 loadelfbinary+0x72c/0x18c0 searchbinaryhandler+0x13c/0x420 loadscript+0x500/0x6c4 searchbinaryhandler+0x13c/0x420 execbinprm+0x118/0x654 doexecvefile+0x77c/0xba4 arm64compatsysexecve+0x98/0xac el0svccommon+0x1f8/0x5e0 el0svccompathandler+0x84/0xb0 el0svccompat+0x10/0x50
The buggy address belongs to the variable: barrierpkt+0x10/0x40
Memory state around the buggy address: ffffffd05b7d0f00: fa fa fa fa 04 fa fa fa fa fa fa fa 00 00 00 00 ffffffd05b7d0f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffffffd05b7d1000: 00 00 00 00 00 00 fa fa fa fa fa fa 00 00 00 03 ^ ffffffd05b7d1080: fa fa fa fa 00 02 fa fa fa fa fa fa 03 fa fa fa ffffffd05b7d1100: fa fa fa fa 00 00 00 00 05 fa fa fa fa fa fa fa ==================================================================
In the Linux kernel, the following vulnerability has been resolved:
enetc: Fix illegal access when reading affinityhint
irqsetaffinityhit() stores a reference to the cpumaskt parameter in the irq descriptor, and that reference can be accessed later from irqaffinityhintprocshow(). Since the cpumask parameter passed to irqsetaffinityhit() has only temporary storage (it's on the stack memory), later accesses to it are illegal. Thus reads from the corresponding procfs affinityhint file can result in paging request oops.
The issue is fixed by the getcpumask() helper, which provides a permanent storage for the cpumaskt parameter.
In the Linux kernel, the following vulnerability has been resolved:
btrfs: fix abort logic in btrfsreplacefileextents
Error injection testing uncovered a case where we'd end up with a corrupt file system with a missing extent in the middle of a file. This occurs because the if statement to decide if we should abort is wrong.
The only way we would abort in this case is if we got a ret != -EOPNOTSUPP and we called from the file clone code. However the prealloc code uses this path too. Instead we need to abort if there is an error, and the only error we don't abort on is -EOPNOTSUPP and only if we came from the clone file code.
In the Linux kernel, the following vulnerability has been resolved:
ecryptfs: Fix buffer size for tag 66 packet
The 'TAG 66 Packet Format' description is missing the cipher code and checksum fields that are packed into the message packet. As a result, the buffer allocated for the packet is 3 bytes too small and writetag66packet() will write up to 3 bytes past the end of the buffer.
Fix this by increasing the size of the allocation so the whole packet will always fit in the buffer.
This fixes the below kasan slab-out-of-bounds bug:
BUG: KASAN: slab-out-of-bounds in ecryptfsgeneratekeypacketset+0x7d6/0xde0 Write of size 1 at addr ffff88800afbb2a5 by task touch/181
CPU: 0 PID: 181 Comm: touch Not tainted 6.6.13-gnu #1 4c9534092be820851bb687b82d1f92a426598dc6 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.2/GNU Guix 04/01/2014 Call Trace: <TASK> dumpstacklvl+0x4c/0x70 printreport+0xc5/0x610 ? ecryptfsgeneratekeypacketset+0x7d6/0xde0 ? kasancompletemodereportinfo+0x44/0x210 ? ecryptfsgeneratekeypacketset+0x7d6/0xde0 kasanreport+0xc2/0x110 ? ecryptfsgeneratekeypacketset+0x7d6/0xde0 asanstore1+0x62/0x80 ecryptfsgeneratekeypacketset+0x7d6/0xde0 ? pfxecryptfsgeneratekeypacketset+0x10/0x10 ? allocpages+0x2e2/0x540 ? pfxovlopen+0x10/0x10 [overlay 30837f11141636a8e1793533a02e6e2e885dad1d] ? dentryopen+0x8f/0xd0 ecryptfswritemetadata+0x30a/0x550 ? pfxecryptfswritemetadata+0x10/0x10 ? ecryptfsgetlowerfile+0x6b/0x190 ecryptfsinitializefile+0x77/0x150 ecryptfscreate+0x1c2/0x2f0 pathopenat+0x17cf/0x1ba0 ? pfxpathopenat+0x10/0x10 dofilpopen+0x15e/0x290 ? pfxdofilpopen+0x10/0x10 ? kasancheckwrite+0x18/0x30 ? rawspinlock+0x86/0xf0 ? pfxrawspinlock+0x10/0x10 ? kasancheckwrite+0x18/0x30 ? allocfd+0xf4/0x330 dosysopenat2+0x122/0x160 ? pfxdosysopenat2+0x10/0x10 x64sysopenat+0xef/0x170 ? pfxx64sysopenat+0x10/0x10 dosyscall64+0x60/0xd0 entrySYSCALL64afterhwframe+0x6e/0xd8 RIP: 0033:0x7f00a703fd67 Code: 25 00 00 41 00 3d 00 00 41 00 74 37 64 8b 04 25 18 00 00 00 85 c0 75 5b 44 89 e2 48 89 ee bf 9c ff ff ff b8 01 01 00 00 0f 05 <48> 3d 00 f0 ff ff 0f 87 85 00 00 00 48 83 c4 68 5d 41 5c c3 0f 1f RSP: 002b:00007ffc088e30b0 EFLAGS: 00000246 ORIGRAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007ffc088e3368 RCX: 00007f00a703fd67 RDX: 0000000000000941 RSI: 00007ffc088e48d7 RDI: 00000000ffffff9c RBP: 00007ffc088e48d7 R08: 0000000000000001 R09: 0000000000000000 R10: 00000000000001b6 R11: 0000000000000246 R12: 0000000000000941 R13: 0000000000000000 R14: 00007ffc088e48d7 R15: 00007f00a7180040 </TASK>
Allocated by task 181: kasansavestack+0x2f/0x60 kasansettrack+0x29/0x40 kasansaveallocinfo+0x25/0x40 kasankmalloc+0xc5/0xd0 kmalloc+0x66/0x160 ecryptfsgeneratekeypacketset+0x6d2/0xde0 ecryptfswritemetadata+0x30a/0x550 ecryptfsinitializefile+0x77/0x150 ecryptfscreate+0x1c2/0x2f0 pathopenat+0x17cf/0x1ba0 dofilpopen+0x15e/0x290 dosysopenat2+0x122/0x160 x64sysopenat+0xef/0x170 dosyscall64+0x60/0xd0 entrySYSCALL64afterhwframe+0x6e/0xd8
In the Linux kernel, the following vulnerability has been resolved:
jffs2: prevent xattr node from overflowing the eraseblock
Add a check to make sure that the requested xattr node size is no larger than the eraseblock minus the cleanmarker.
Unlike the usual inode nodes, the xattr nodes aren't split into parts and spread across multiple eraseblocks, which means that a xattr node must not occupy more than one eraseblock. If the requested xattr value is too large, the xattr node can spill onto the next eraseblock, overwriting the nodes and causing errors such as:
jffs2: argh. node added in wrong place at 0x0000b050(2) jffs2: nextblock 0x0000a000, expected at 0000b00c jffs2: error: (823) doverifyxattrdatum: node CRC failed at 0x01e050, read=0xfc892c93, calc=0x000000 jffs2: notice: (823) jffs2getinodenodes: Node header CRC failed at 0x01e00c. {848f,2fc4,0fef511f,59a3d171} jffs2: Node at 0x0000000c with length 0x00001044 would run over the end of the erase block jffs2: Perhaps the file system was created with the wrong erase size? jffs2: jffs2scaneraseblock(): Magic bitmask 0x1985 not found at 0x00000010: 0x1044 instead
This breaks the filesystem and can lead to KASAN crashes such as:
BUG: KASAN: slab-out-of-bounds in jffs2sumaddkvec+0x125e/0x15d0 Read of size 4 at addr ffff88802c31e914 by task repro/830 CPU: 0 PID: 830 Comm: repro Not tainted 6.9.0-rc3+ #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Arch Linux 1.16.3-1-1 04/01/2014 Call Trace: <TASK> dumpstacklvl+0xc6/0x120 printreport+0xc4/0x620 ? virtaddrvalid+0x308/0x5b0 kasanreport+0xc1/0xf0 ? jffs2sumaddkvec+0x125e/0x15d0 ? jffs2sumaddkvec+0x125e/0x15d0 jffs2sumaddkvec+0x125e/0x15d0 jffs2flashdirectwritev+0xa8/0xd0 jffs2flashwritev+0x9c9/0xef0 ? x64syssetxattr+0xc4/0x160 ? dosyscall64+0x69/0x140 ? entrySYSCALL64afterhwframe+0x76/0x7e [...]
Found by Linux Verification Center (linuxtesting.org) with Syzkaller.
In the Linux kernel, the following vulnerability has been resolved:
NFSD: Fix NFSv3 SETATTR/CREATE's handling of large file sizes
iattr::iasize is a lofft, so these NFSv3 procedures must be careful to deal with incoming client size values that are larger than s64max without corrupting the value.
Silently capping the value results in storing a different value than the client passed in which is unexpected behavior, so remove the mint() check in decodesattr3().
Note that RFC 1813 permits only the WRITE procedure to return NFS3ERRFBIG. We believe that NFSv3 reference implementations also return NFS3ERRFBIG when iasize is too large.
In the Linux kernel, the following vulnerability has been resolved:
net/packet: fix slab-out-of-bounds access in packetrecvmsg()
syzbot found that when an AFPACKET socket is using PACKETCOPYTHRESH and mmap operations, tpacketrcv() is queueing skbs with garbage in skb->cb[], triggering a too big copy [1]
Presumably, users of afpacket using mmap() already gets correct metadata from the mapped buffer, we can simply make sure to clear 12 bytes that might be copied to user space later.
BUG: KASAN: stack-out-of-bounds in memcpy include/linux/fortify-string.h:225 [inline] BUG: KASAN: stack-out-of-bounds in packetrecvmsg+0x56c/0x1150 net/packet/afpacket.c:3489 Write of size 165 at addr ffffc9000385fb78 by task syz-executor233/3631
CPU: 0 PID: 3631 Comm: syz-executor233 Not tainted 5.17.0-rc7-syzkaller-02396-g0b3660695e80 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: <TASK> dumpstack lib/dumpstack.c:88 [inline] dumpstacklvl+0xcd/0x134 lib/dumpstack.c:106 printaddressdescription.constprop.0.cold+0xf/0x336 mm/kasan/report.c:255 kasanreport mm/kasan/report.c:442 [inline] kasanreport.cold+0x83/0xdf mm/kasan/report.c:459 checkregioninline mm/kasan/generic.c:183 [inline] kasancheckrange+0x13d/0x180 mm/kasan/generic.c:189 memcpy+0x39/0x60 mm/kasan/shadow.c:66 memcpy include/linux/fortify-string.h:225 [inline] packetrecvmsg+0x56c/0x1150 net/packet/afpacket.c:3489 sockrecvmsgnosec net/socket.c:948 [inline] sockrecvmsg net/socket.c:966 [inline] sockrecvmsg net/socket.c:962 [inline] sysrecvmsg+0x2c4/0x600 net/socket.c:2632 sysrecvmsg+0x127/0x200 net/socket.c:2674 sysrecvmsg+0xe2/0x1a0 net/socket.c:2704 dosyscallx64 arch/x86/entry/common.c:50 [inline] dosyscall64+0x35/0xb0 arch/x86/entry/common.c:80 entrySYSCALL64afterhwframe+0x44/0xae RIP: 0033:0x7fdfd5954c29 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 41 15 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffcf8e71e48 EFLAGS: 00000246 ORIGRAX: 000000000000002f RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007fdfd5954c29 RDX: 0000000000000000 RSI: 0000000020000500 RDI: 0000000000000005 RBP: 0000000000000000 R08: 000000000000000d R09: 000000000000000d R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffcf8e71e60 R13: 00000000000f4240 R14: 000000000000c1ff R15: 00007ffcf8e71e54 </TASK>
addr ffffc9000385fb78 is located in stack of task syz-executor233/3631 at offset 32 in frame: sysrecvmsg+0x0/0x600 include/linux/uio.h:246
this frame has 1 object: [32, 160) 'addr'
Memory state around the buggy address: ffffc9000385fa80: 00 04 f3 f3 f3 f3 f3 00 00 00 00 00 00 00 00 00 ffffc9000385fb00: 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00 ffffc9000385fb80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 f3 ^ ffffc9000385fc00: f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00 f1 ffffc9000385fc80: f1 f1 f1 00 f2 f2 f2 00 f2 f2 f2 00 00 00 00 00 ==================================================================
drm/i915/gem: Fix Virtual Memory mapping boundaries calculation
In the Linux kernel, the following vulnerability has been resolved:
media: vivid: fix compose size exceed boundary
syzkaller found a bug:
BUG: unable to handle page fault for address: ffffc9000a3b1000 #PF: supervisor write access in kernel mode #PF: errorcode(0x0002) - not-present page PGD 100000067 P4D 100000067 PUD 10015f067 PMD 1121ca067 PTE 0 Oops: 0002 [#1] PREEMPT SMP CPU: 0 PID: 23489 Comm: vivid-000-vid-c Not tainted 6.1.0-rc1+ #512 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-1ubuntu1.1 04/01/2014 RIP: 0010:memcpyerms+0x6/0x10 [...] Call Trace: <TASK> ? tpgfillplanebuffer+0x856/0x15b0 vividfillbuff+0x8ac/0x1110 vividthreadvidcaptick+0x361/0xc90 vividthreadvidcap+0x21a/0x3a0 kthread+0x143/0x180 retfromfork+0x1f/0x30 </TASK>
This is because we forget to check boundary after adjust compose->height int V4L2SELTGTCROP case. Add v4l2rectmapinside() to fix this problem for this case.
In the Linux kernel, the following vulnerability has been resolved:
In the Linux kernel, the following vulnerability has been resolved:
vhost/scsi: null-ptr-dereference in vhostscsigetreq()
Since commit 3f8ca2e115e5 ("vhost/scsi: Extract common handling code from control queue handler") a null pointer dereference bug can be triggered when guest sends an SCSI AN request.
In vhostscsictlhandlevq(), vc.target is assigned with &vreq.tmf.lun[1] within a switch-case block and is then passed to vhostscsigetreq() which extracts vc->req and tpg. However, for a VIRTIOSCSITAN request, tpg is not required, so vc.target is set to NULL in this branch. Later, in vhostscsigetreq(), vc->target is dereferenced without being checked, leading to a null pointer dereference bug. This bug can be triggered from guest.
When this bug occurs, the vhostworker process is killed while holding vq->mutex and the corresponding tpg will remain occupied indefinitely.
Below is the KASAN report: Oops: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] PREEMPT SMP KASAN NOPTI KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007] CPU: 1 PID: 840 Comm: poc Not tainted 6.10.0+ #1 Hardware name: QEMU Ubuntu 24.04 PC (i440FX + PIIX, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 RIP: 0010:vhostscsigetreq+0x165/0x3a0 Code: 00 fc ff df 48 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 2b 02 00 00 48 b8 00 00 00 00 00 fc ff df 4d 8b 65 30 4c 89 e2 48 c1 ea 03 <0f> b6 04 02 4c 89 e2 83 e2 07 38 d0 7f 08 84 c0 0f 85 be 01 00 00 RSP: 0018:ffff888017affb50 EFLAGS: 00010246 RAX: dffffc0000000000 RBX: ffff88801b000000 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff888017affcb8 RBP: ffff888017affb80 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: ffff888017affc88 R14: ffff888017affd1c R15: ffff888017993000 FS: 000055556e076500(0000) GS:ffff88806b100000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000200027c0 CR3: 0000000010ed0004 CR4: 0000000000370ef0 Call Trace: <TASK> ? showregs+0x86/0xa0 ? dieaddr+0x4b/0xd0 ? excgeneralprotection+0x163/0x260 ? asmexcgeneralprotection+0x27/0x30 ? vhostscsigetreq+0x165/0x3a0 vhostscsictlhandlevq+0x2a4/0xca0 ? pfxvhostscsictlhandlevq+0x10/0x10 ? switchto+0x721/0xeb0 ? schedule+0xda5/0x5710 ? kasancheckwrite+0x14/0x30 ? rawspinlock+0x82/0xf0 vhostscsictlhandlekick+0x52/0x90 vhostrunworklist+0x134/0x1b0 vhosttaskfn+0x121/0x350 ... </TASK> ---[ end trace 0000000000000000 ]---
Let's add a check in vhostscsigetreq.
[whitespace fixes]
In the Linux kernel, the following vulnerability has been resolved:
r8169: add tally counter fields added with RTL8125
RTL8125 added fields to the tally counter, what may result in the chip dma'ing these new fields to unallocated memory. Therefore make sure that the allocated memory area is big enough to hold all of the tally counter values, even if we use only parts of it.
In the Linux kernel, the following vulnerability has been resolved:
ipv4: Handle attempt to delete multipath route when fibinfo contains an nh reference
Gwangun Jung reported a slab-out-of-bounds access in fibnhmatch: fibnhmatch+0xf98/0x1130 linux-6.0-rc7/net/ipv4/fibsemantics.c:961 fibtabledelete+0x5f3/0xa40 linux-6.0-rc7/net/ipv4/fibtrie.c:1753 inetrtmdelroute+0x2b3/0x380 linux-6.0-rc7/net/ipv4/fibfrontend.c:874
Separate nexthop objects are mutually exclusive with the legacy multipath spec. Fix fibnhmatch to return if the config for the to be deleted route contains a multipath spec while the fibinfo is using a nexthop object.
In the Linux kernel, the following vulnerability has been resolved:
mptcp: handle consistently DSS corruption
Bugged peer implementation can send corrupted DSS options, consistently hitting a few warning in the data path. Use DEBUGNET assertions, to avoid the splat on some builds and handle consistently the error, dumping related MIBs and performing fallback and/or reset according to the subflow type.
In the Linux kernel, the following vulnerability has been resolved:
ocfs2: pass u64 to ocfs2truncateinline maybe overflow
Syzbot reported a kernel BUG in ocfs2truncateinline. There are two reasons for this: first, the parameter value passed is greater than ocfs2maxinlinedatawithxattr, second, the start and end parameters of ocfs2truncateinline are "unsigned int".
So, we need to add a sanity check for bytestart and bytelen right before ocfs2truncateinline() in ocfs2removeinoderange(), if they are greater than ocfs2maxinlinedatawithxattr return -EINVAL.
In the Linux kernel, the following vulnerability has been resolved:
netfilter: xtables: fix LED ID check in ledtgcheck()
Syzbot has reported the following BUG detected by KASAN:
BUG: KASAN: slab-out-of-bounds in strlen+0x58/0x70 Read of size 1 at addr ffff8881022da0c8 by task repro/5879 ... Call Trace: <TASK> dumpstacklvl+0x241/0x360 ? pfxdumpstacklvl+0x10/0x10 ? pfxprintk+0x10/0x10 ? printk+0xd5/0x120 ? virtaddrvalid+0x183/0x530 ? virtaddrvalid+0x183/0x530 printreport+0x169/0x550 ? virtaddrvalid+0x183/0x530 ? virtaddrvalid+0x183/0x530 ? virtaddrvalid+0x45f/0x530 ? physaddr+0xba/0x170 ? strlen+0x58/0x70 kasanreport+0x143/0x180 ? strlen+0x58/0x70 strlen+0x58/0x70 kstrdup+0x20/0x80 ledtgcheck+0x18b/0x3c0 xtchecktarget+0x3bb/0xa40 ? pfxxtchecktarget+0x10/0x10 ? stackdepotsaveflags+0x6e4/0x830 ? nfttargetinit+0x174/0xc30 nfttargetinit+0x82d/0xc30 ? pfxnfttargetinit+0x10/0x10 ? nftablesnewrule+0x1609/0x2980 ? nftablesnewrule+0x1609/0x2980 ? rcuiswatching+0x15/0xb0 ? nftablesnewrule+0x1609/0x2980 ? nftablesnewrule+0x1609/0x2980 ? kmallocnoprof+0x21a/0x400 nftablesnewrule+0x1860/0x2980 ? pfxnftablesnewrule+0x10/0x10 ? nlaparse+0x40/0x60 nfnetlinkrcv+0x14e5/0x2ab0 ? pfxvalidatechain+0x10/0x10 ? pfxnfnetlinkrcv+0x10/0x10 ? lockacquire+0x1384/0x2050 ? netlinkdelivertap+0x2e/0x1b0 ? pfxlockrelease+0x10/0x10 ? netlinkdelivertap+0x2e/0x1b0 netlinkunicast+0x7f8/0x990 ? pfxnetlinkunicast+0x10/0x10 ? virtaddrvalid+0x183/0x530 ? checkobjectsize+0x48e/0x900 netlinksendmsg+0x8e4/0xcb0 ? pfxnetlinksendmsg+0x10/0x10 ? aasockmsgperm+0x91/0x160 ? pfxnetlinksendmsg+0x10/0x10 socksendmsg+0x223/0x270 syssendmsg+0x52a/0x7e0 ? pfxsyssendmsg+0x10/0x10 syssendmsg+0x292/0x380 ? pfxsyssendmsg+0x10/0x10 ? lockdephardirqsonprepare+0x43d/0x780 ? pfxlockdephardirqsonprepare+0x10/0x10 ? excpagefault+0x590/0x8c0 ? dosyscall64+0xb6/0x230 dosyscall64+0xf3/0x230 entrySYSCALL64afterhwframe+0x77/0x7f ... </TASK>
Since an invalid (without '\0' byte at all) byte sequence may be passed from userspace, add an extra check to ensure that such a sequence is rejected as possible ID and so never passed to 'kstrdup()' and further.
gfs2: Truncate address space when flipping GFS2DIFJDATA flag
In the Linux kernel, the following vulnerability has been resolved:
can: mcan: mcantxhandler(): fix use after free of skb
canputechoskb() will clone skb then free the skb. Move the canputechoskb() for the mcan version 3.0.x directly before the start of the xmit in hardware, similar to the 3.1.x branch.
In the Linux kernel, the following vulnerability has been resolved:
net: ethernet: mtkethsoc: out of bounds read in mtkhwlrogetfdirentry()
The "fsp->location" variable comes from user via ethtoolgetrxnfc(). Check that it is valid to prevent an out of bounds read.
In the Linux kernel, the following vulnerability has been resolved:
xen/netback: avoid entering xenvifrxnextskb() with an empty rx queue
xenvifrxnextskb() is expecting the rx queue not being empty, but in case the loop in xenvifrxaction() is doing multiple iterations, the availability of another skb in the rx queue is not being checked.
This can lead to crashes:
[40072.537261] BUG: unable to handle kernel NULL pointer dereference at 0000000000000080 [40072.537407] IP: xenvifrxskb+0x23/0x590 [xennetback] [40072.537534] PGD 0 P4D 0 [40072.537644] Oops: 0000 [#1] SMP NOPTI [40072.537749] CPU: 0 PID: 12505 Comm: v1-c40247-q2-gu Not tainted 4.12.14-122.121-default #1 SLE12-SP5 [40072.537867] Hardware name: HP ProLiant DL580 Gen9/ProLiant DL580 Gen9, BIOS U17 11/23/2021 [40072.537999] task: ffff880433b38100 task.stack: ffffc90043d40000 [40072.538112] RIP: e030:xenvifrxskb+0x23/0x590 [xennetback] [40072.538217] RSP: e02b:ffffc90043d43de0 EFLAGS: 00010246 [40072.538319] RAX: 0000000000000000 RBX: ffffc90043cd7cd0 RCX: 00000000000000f7 [40072.538430] RDX: 0000000000000000 RSI: 0000000000000006 RDI: ffffc90043d43df8 [40072.538531] RBP: 000000000000003f R08: 000077ff80000000 R09: 0000000000000008 [40072.538644] R10: 0000000000007ff0 R11: 00000000000008f6 R12: ffffc90043ce2708 [40072.538745] R13: 0000000000000000 R14: ffffc90043d43ed0 R15: ffff88043ea748c0 [40072.538861] FS: 0000000000000000(0000) GS:ffff880484600000(0000) knlGS:0000000000000000 [40072.538988] CS: e033 DS: 0000 ES: 0000 CR0: 0000000080050033 [40072.539088] CR2: 0000000000000080 CR3: 0000000407ac8000 CR4: 0000000000040660 [40072.539211] Call Trace: [40072.539319] xenvifrxaction+0x71/0x90 [xennetback] [40072.539429] xenvifkthreadguestrx+0x14a/0x29c [xennetback]
Fix that by stopping the loop in case the rx queue becomes empty.
In the Linux kernel, the following vulnerability has been resolved:
x86/speculation: Fill RSB on vmexit for IBRS
Prevent RSB underflow/poisoning attacks with RSB. While at it, add a bunch of comments to attempt to document the current state of tribal knowledge about RSB attacks and what exactly is being mitigated.