In the Linux kernel, the following vulnerability has been resolved:
HID: wacom: fix out-of-bounds read in wacomintuosbtirq
The wacomintuosbtirq() function processes Bluetooth HID reports without sufficient bounds checking. A maliciously crafted short report can trigger an out-of-bounds read when copying data into the wacom structure.
Specifically, report 0x03 requires at least 22 bytes to safely read the processed data and battery status, while report 0x04 (which falls through to 0x03) requires 32 bytes.
Add explicit length checks for these report IDs and log a warning if a short report is received.
In the Linux kernel, the following vulnerability has been resolved:
ipv6: prevent possible UaF in addrconfpermanentaddr()
The mentioned helper try to warn the user about an exceptional condition, but the message is delivered too late, accessing the ipv6 after its possible deletion.
Reorder the statement to avoid the possible UaF; while at it, place the warning outside the idev->lock as it needs no protection.
In the Linux kernel, the following vulnerability has been resolved:
netfilter: nfnetlinkcthelper: fix OOB read in nfnlcthelperdumptable()
nfnlcthelperdumptable() has a 'goto restart' that jumps to a label inside the for loop body. When the "last" helper saved in cb->args[1] is deleted between dump rounds, every entry fails the (cur != last) check, so cb->args[1] is never cleared. The for loop finishes with cb->args[0] == nfcthelperhsize, and the 'goto restart' jumps back into the loop body bypassing the bounds check, causing an 8-byte out-of-bounds read on nfcthelperhash[nfcthelperhsize].
The 'goto restart' block was meant to re-traverse the current bucket when "last" is no longer found, but it was placed after the for loop instead of inside it. Move the block into the for loop body so that the restart only occurs while cb->args[0] is still within bounds.
BUG: KASAN: slab-out-of-bounds in nfnlcthelperdumptable+0x9f/0x1b0 Read of size 8 at addr ffff888104ca3000 by task poccthelper/131 Call Trace: nfnlcthelperdumptable+0x9f/0x1b0 netlinkdump+0x333/0x880 netlinkrecvmsg+0x3e2/0x4b0 sockrecvmsg+0xde/0xf0 sysrecvfrom+0x150/0x200 x64sysrecvfrom+0x76/0x90 dosyscall64+0xc3/0x6e0
Allocated by task 1: kvmallocnodenoprof+0x21b/0x700 nfctallochashtable+0x65/0xd0 nfconntrackhelperinit+0x21/0x60 nfconntrackinitstart+0x18d/0x300 nfconntrackstandaloneinit+0x12/0xc0
In the Linux kernel, the following vulnerability has been resolved:
udp: Fix wildcard bind conflict check when using hash2
When binding a udpsock to a local address and port, UDP uses two hashes (udptable->hash and udptable->hash2) for collision detection. The current code switches to "hash2" when hslot->count > 10.
"hash2" is keyed by local address and local port. "hash" is keyed by local port only.
The issue can be shown in the following bind sequence (pseudo code):
bind(fd1, "[fd00::1]:8888") bind(fd2, "[fd00::2]:8888") bind(fd3, "[fd00::3]:8888") bind(fd4, "[fd00::4]:8888") bind(fd5, "[fd00::5]:8888") bind(fd6, "[fd00::6]:8888") bind(fd7, "[fd00::7]:8888") bind(fd8, "[fd00::8]:8888") bind(fd9, "[fd00::9]:8888") bind(fd10, "[fd00::10]:8888")
/ Correctly return -EADDRINUSE because "hash" is used instead of "hash2". udpliblportinuse() detects the conflict. / bind(failfd, "[::]:8888")
/ After one more socket is bound to "[fd00::11]:8888", hslot->count exceeds 10 and "hash2" is used instead. / bind(fd11, "[fd00::11]:8888") bind(failfd, "[::]:8888") / succeeds unexpectedly /
The same issue applies to the IPv4 wildcard address "0.0.0.0" and the IPv4-mapped wildcard address "::ffff:0.0.0.0". For example, if there are existing sockets bound to "192.168.1.[1-11]:8888", then binding "0.0.0.0:8888" or "[::ffff:0.0.0.0]:8888" can also miss the conflict when hslot->count > 10.
TCP inetcskgetport() already has the correct check in inetusebhash2onbind(). Rename it to inetusehash2onbind() and move it to inethashtables.h so udp.c can reuse it in this fix.
In the Linux kernel, the following vulnerability has been resolved:
mm/damon/ops-common: handle extreme intervals in damonhotscore()
Fix three issues in damonhotscore() that comes from wrong handling of extreme (zero or too high) monitoring intervals user setup.
When the user sets sampling interval zero, damonmaxnraccesses(), which is called from damonhotscore(), causes a divide-by-zero. Needless to say, it is a problem.
When the user sets the aggregation interval zero, the function returns zero. It is wrong, since the real maximum nracceses in the setup should be one. Worse yet, it can cause another divide-by-zero from its caller, damonhotscore(), since it uses damonmaxnraccesses() return value as a denominator.
When the user sets the aggregation interval very high, damonhotscore() could return a value out of [0, DAMOSMAXSCORE] range. Since the return value is used as an index to the regionsscorehistogram array, which is DAMOSMAXSCORE+1 size, it causes out of bounds array access.
The issues can be relatively easily reproduced like below. The sysfs write permission is required, though.
# ./damo start --damosaction lruprio --damosquotaspace 100M \ --damosquotainterval 1s # cd /sys/kernel/mm/damon/admin/kdamonds/0 # echo 0 > contexts/0/monitoringattrs/intervals/sampleus # echo 0 > contexts/0/monitoringattrs/intervals/aggrus # echo commit > state # dmesg [...] [ 131.329762] Oops: divide error: 0000 [#1] SMP NOPTI [...] [ 131.336089] RIP: 0010:damonhotscore+0x27/0xd0 [...]
Fix the divide-by-zero intervals problems by explicitly handling the zero intervals in damonmaxnraccesses(). Fix the out-of-bound array access by applying [0, DAMOSMAXSCORE] bounds before returning from damonhotscore().
The issue was discovered [1] by Sashiko.
ALSA: caiaq: fix out-of-bounds read in the Traktor Kontrol S4 input parser
In the Linux kernel, the following vulnerability has been resolved:
bpf: Support for hardening against JIT spraying
In the Linux kernel, the following vulnerability has been resolved:
x86/bugs: Enable IBPB flush on BPF JIT allocation
Enable hardening against JIT spraying when Spectre-v2 mitigations are in use. Specifically, issue an IBPB flush on BPF JIT memory reuse. Skip enabling the IBPB flush if the BPF dispatcher is already using a retpoline sequence.
This hardening applies only when BPF-JIT is in use. Guard the enabling under CONFIGBPFJIT so that bugs.c still builds with CONFIGBPFJIT=n.
In the Linux kernel, the following vulnerability has been resolved:
drm/amdgpu/jpeg: set nouserfence for JPEG v2.5 ring
JPEG rings do not support 64-bit user fence writes, reject CS submissions with user fences.
(cherry picked from commit 3216a7f4e2642bda5fd14f57586e835ae9202587)
In the Linux kernel, the following vulnerability has been resolved:
drm/amdgpu/jpeg: set nouserfence for JPEG v2.0 ring
JPEG rings do not support 64-bit user fence writes, reject CS submissions with user fences.
(cherry picked from commit 96179da0c6b059eb31706a0abe8dd6381c533143)
drm/amdgpu: Limit BO list entry count to prevent resource exhaustion
In the Linux kernel, the following vulnerability has been resolved:
fs/ntfs3: fix deadlock in nireadfoliocmpr
Syzbot reported a task hung in nireadpagecmpr (now nireadfoliocmpr). This is caused by a lock inversion deadlock involving the inode mutex (nilock) and page locks.
Scenario: 1. Task A enters ntfsreadfolio() for page X. It acquires nilock. 2. Task A calls nireadfoliocmpr(), which attempts to lock all pages in the compressed frame (including page Y). 3. Concurrently, Task B (e.g., via readahead) has locked page Y and calls ntfsreadfolio(). 4. Task B waits for nilock (held by A). 5. Task A waits for page Y lock (held by B). -> DEADLOCK.
The fix is to restructure locking: do not take nilock in ntfsreadfolio(). Instead, acquire nilock inside nireadfoliocmpr() ONLY AFTER all required page locks for the frame have been successfully acquired. This restores the correct lock ordering (Page Lock -> nilock) consistent with VFS.
[almaz.alexandrovich@paragon-software.com: nireadpagecmpr was renamed to nireadfoliocmpr]
In the Linux kernel, the following vulnerability has been resolved:
net/smc: reject CHID-0 ACCEPT that matches an empty ismdev slot
On the SMC-D client, slot 0 of ini->ismdev[]/ini->ismchid[] is reserved for an SMC-Dv1 device. smcfindismv2deviceclnt() populates V2 entries starting at index 1, so when no V1 device is selected slot 0 is left in its kzalloc()'ed state with ismdev[0] == NULL and ismchid[0] == 0.
smcv2determineacceptedchid() then matches the peer's CHID against the array starting from index 0 using the CHID alone. A malicious peer replying to a SMC-Dv2-only proposal with d1.chid == 0 matches the empty slot, ini->ismselected becomes 0, and the subsequent ismdev[0]->lgrlock dereference in smcconncreate() faults at offsetof(struct smcddev, lgrlock) == 0x68:
BUG: KASAN: null-ptr-deref in rawspinlockbh+0x79/0xe0 Write of size 4 at addr 0000000000000068 by task exploit/144 Call Trace: rawspinlockbh smcconncreate (net/smc/smccore.c:1997) smcconnect (net/smc/afsmc.c:1447) smcconnect (net/smc/afsmc.c:1720) sysconnect x64sysconnect dosyscall64
Require ismdev[i] to be non-NULL before accepting a CHID match.
Bluetooth: hcicore: Fix race condition during device registration
In the Linux kernel, the following vulnerability has been resolved:
usb: typec: tcpm: bound altmodedesc[] per iteration in svdmconsumemodes()
svdmconsumemodes() checks pmdata->altmodes against the array size once before the loop over the count, but forgot to check the bound at every point in the loop.
In the well-behaved SVDM discovery flow this is harmless because each of at most SVIDDISCOVERYMAX SVIDs contributes at most MODEDISCOVERYMAX modes, exactly filling altmodedesc[ALTMODEDISCOVERYMAX]. But the CMDTRSPACK handler in tcpmpdsvdm() does not correlate an incoming ACK with any request the port actually sent. Once port->partner is set, an unsolicited Discover Modes ACK is consumed unconditionally. A broken or malicious port partner can therefore drive altmodes to ALTMODEDISCOVERYMAX - 1 via the normal flow, and then send one extra Discover Modes ACK with seven VDOs. Because the pre-loop check passes, the loop could then writes up to five entries past altmodedesc[]. For modedataprime the next field in struct tcpmport is the partneraltmode[] pointer array, which then receives partner-chosen SVID/VDO bytes.
Move the bound check inside the loop so the array can never be indexed past ALTMODEDISCOVERYMAX regardless of how many VDOs the partner supplies or how the function was reached.
In the Linux kernel, the following vulnerability has been resolved:
drm/amdgpu/jpeg: set nouserfence for JPEG v3.0 ring
JPEG rings do not support 64-bit user fence writes, reject CS submissions with user fences.
(cherry picked from commit 4d7d774f100efb5089c86a1fb8c5bf47c63fc9ef)
In the Linux kernel, the following vulnerability has been resolved:
net/sched: schnetem: fix out-of-bounds access in packet corruption
In netemenqueue(), the packet corruption logic uses getrandomu32below(skbheadlen(skb)) to select an index for modifying skb->data. When an AFPACKET TXRING sends fully non-linear packets over an IPIP tunnel, skbheadlen(skb) evaluates to 0.
Passing 0 to getrandomu32below() takes the variable-ceil slow path which returns an unconstrained 32-bit random integer. Using this unconstrained value as an offset into skb->data results in an out-of-bounds memory access.
Fix this by verifying skbheadlen(skb) is non-zero before attempting to corrupt the linear data area. Fully non-linear packets will silently bypass the corruption logic.
drm/amdkfd: Fix buffer overflow in SDMA queue checkpoint/restore on GFX11
afpacket: Don't cast tpackethdr.tplen to int in tpacketparseheader().
In the Linux kernel, the following vulnerability has been resolved:
net: hsr: free learned nodes on device setup failure
hsrdevfinalize() can fail after a lower-device RX handler has already been registered (slave A is added before the failable slave B and interlink adds). RX handlers run in softirq regardless of the master's state, so frames received in that window can learn dynamic nodes into nodedb, and the error unwind never releases them.
Free both owned dynamic databases in the unwind, mirroring hsrdellink(). proxynodedb is provably empty on every current error exit (only interlink RX feeds it, and the interlink add is the last failable step) and is freed for symmetry. The order is safe: hsrdelport() unregisters each RX handler with synchronizenet() before hsrdelnodes() runs, which removes remaining entries with listdelrcu() and defers their release with callrcu() for readers already under RCU.
In the Linux kernel, the following vulnerability has been resolved:
smb: client: require a full NFS mode SID before reading mode bits
parsedacl() treats an ACE SID matching sidunixNFSmode as an NFS mode SID and reads sid.subauth[2] to recover the mode bits.
That assumes the ACE carries three subauthorities, but comparesids() only compares min(a, b) subauthorities. A malicious server can return an ACE with numsubauth = 2 and subauth[] = {88, 3}, which still matches sidunixNFSmode and then drives the subauth[2] read four bytes past the end of the ACE.
Require numsubauth >= 3 before treating the ACE as an NFS mode SID. This keeps the fix local to the special-SID mode path without changing comparesids() semantics for the rest of cifsacl.
In the Linux kernel, the following vulnerability has been resolved:
staging: rtl8723bs: fix buffer over-read in rtwupdateprotection
rtwupdateprotection() is called with a pointer offset into the ies buffer but the full ielength is passed, causing a potential buffer over-read.
In the Linux kernel, the following vulnerability has been resolved:
smb/client: fix out-of-bounds read in smb2compoundop()
If a server sends a truncated response but a large OutputBufferLength, and terminates the EA list early, checkwsleas() returns success without validating that the entire OutputBufferLength fits within iovlen.
Then smb2compoundop() does: memcpy(idata->wsl.eas, data[0], size[0]);
Where size[0] is OutputBufferLength. If iovlen is smaller than size[0], memcpy can read beyond the end of the rspiov allocation and leak adjacent kernel heap memory.
In the Linux kernel, the following vulnerability has been resolved:
smb/client: validate new EOF for insert range
smb3insertrange() does not check if the new file size (isize + len) is valid. This allows FALLOCFLINSERTRANGE to bypass RLIMITFSIZE, exceed smaxbytes, or produce a size outside the lofft range.
Use checkaddoverflow() to calculate the new EOF. Validate it with inodenewsizeok() before modifying the file.
Reproducer, using a file on a CIFS mount:
bash -c ' FILE=/mnt/cifs/repro
trap "" SIGXFSZ ulimit -f 3072 # RLIMITFSIZE = 3 MiB
# A regular write is stopped at 3 MiB. dd if=/dev/zero of="$FILE" bs=1M count=4 status=none stat -c "size after write: %s" "$FILE"
# Insert 2 MiB into a 2 MiB file. truncate -s 2M "$FILE" fallocate -i -o 0 -l 2M "$FILE" stat -c "size after insert: %s" "$FILE" '
Before this change, the regular write stops at the 3 MiB limit, but insert range grows the file to 4 MiB:
dd: error writing '/mnt/cifs/repro': File too large size after write: 3145728 size after insert: 4194304
After this change, insert range also fails at the limit and leaves the 2 MiB file unchanged:
dd: error writing '/mnt/cifs/repro': File too large size after write: 3145728 fallocate: fallocate failed: File too large size after insert: 2097152
ASoC: amd: yc: fix memory leak in acp6xpdmdmaclose()
In the Linux kernel, the following vulnerability has been resolved:
usb: typec: ucsi: unregister debugfs entries on teardown
ucsiregister() creates per-instance debugfs entries, but ucsiunregister() keeps them around until ucsidestroy().
Drivers like ucsiglink that unregister/register the same UCSI instance across remoteproc restart then try to create an already existing debugfs directory and log:
debugfs: 'pmicglink.ucsi.0' already exists in 'ucsi'
Unregister debugfs entries as part of ucsiunregister(), and clear ucsi->debugfs after freeing it so repeated unregister paths remain safe.
In the Linux kernel, the following vulnerability has been resolved:
ASoC: Intel: avs: Clean up the bus when fetching ML caps fails
sndhdacextbusgetmlcapabilities() may fail and its return code shall be checked and accounted for. Address the issue by updating the error-path for avspciprobe().
At the same time, if the function in question succeeds but the next part of avspciprobe() fails, the hlink list shall be cleaned up before leaving the scope.
In the Linux kernel, the following vulnerability has been resolved:
ipvs: fix reversed sequence option serialization
htonseq() expects the host-order source first and the unaligned network-order destination second. The version 1 sync sender passes these arguments in reverse for both sequence blocks. This leaves 24 bytes of the kmalloc-backed message unwritten. It may disclose stale heap data and replace the live connection sequence state with values read from the buffer.
Pass the connection sequence state as the source and the message payload as the destination for both blocks.
In the Linux kernel, the following vulnerability has been resolved:
media: rc: igorplugusb: heed coherency rules
In a control request, the USB request structure can be subject to DMA on some HCs. Hence it must obey the rules for DMA coherency. Allocate it separately.