In the Linux kernel, the following vulnerability has been resolved:
bpf: Fix REG INVARIANTS VIOLATION on speculative pointer arithmetic
Take the following unprivileged program as an example:
r0 = bpfmaplookupelem(...) / PTRTOMAPVALUE, offset 0 / ... 14: r0 += r1 / r1 is a bounded scalar / 15: r9 = r0
Loading it triggers a verifier warning from regboundssanitycheck():
verifier bug: REG INVARIANTS VIOLATION (alu): const subreg tnum out of sync with range bounds r64={.base=0x0, .size=0x0} r32={.base=0x0, .size=0xffffffff} varoff=(0x0, 0x0)
What happens:
1. Processing insn 14 (r0 += r1) in adjustptrminmaxvals(), the new offset is computed into dstreg's varoff and 32/64-bit ranges.
2. Because pointer registers do not track 32-bit subregister bounds, markreg32unbounded() first sets r32 to the full range; r32 is re-derived from the offset at the end of the function by regboundssync().
3. On the unprivileged path, sanitizeptralu() is called and, via sanitizespeculativepath() -> pushstack(), snapshots the current register state and schedules the next instruction (insn 15) to be verified directly as a speculative path.
4. That snapshot is taken between step 2 and the final regboundssync(): at this point dstreg's varoff still holds the (const) original offset while r32 has just been blanked to the full range, i.e. the two are out of sync. When the speculative path later verifies insn 15 (r9 = r0), the inconsistent state reaches regboundssanitycheck() and trips the warning.
varoff and the 32-bit range must always be consistent. There are two ways to keep the snapshot consistent:
1. sync varoff and r32 before the snapshot so they match, or 2. leave r32 at its original (already consistent) value and blank it only after the snapshot.
The whole point of sanitizeptralu() is to insert a harmless masking sequence that keeps the access in bounds under speculation, so the state it snapshots should faithfully represent that. Take approach 2: move markreg32unbounded() to after sanitizeptralu(), so the speculative snapshot keeps the pointer's original, consistent r32. The non-speculative path is unchanged: r32 is still blanked before the offset is applied and re-derived by regboundssync().
drm/gud: validate GUDROTATION0 is present in supported rotations
In the Linux kernel, the following vulnerability has been resolved:
smb/client: invalidate fscache for fallocate range operations
smb3zerorange(), smb3punchhole(), smb3insertrange(), and smb3collapserange() modify file contents through server-side range operations. These operations discard the affected page cache, but leave the FS-Cache cookie valid, so a later read may return data cached before the range operation.
Fix this by invalidating FS-Cache after outstanding I/O has completed and before modifying the file on the server.
Run the following as root on a CIFS mount with fsc enabled and an active CacheFiles backend:
bash -c ' MNT=/mnt/cifs FILE="$MNT/repro"
# Generate four 1 MiB random blocks: [A][B][C][D]. dd if=/dev/urandom of=/tmp/src bs=1M count=4 status=none
# Expected contents after zeroing B: [A][zero][C][D]. cp /tmp/src /tmp/expected dd if=/dev/zero of=/tmp/expected bs=1M seek=1 count=1 \ conv=notrunc status=none cp /tmp/src "$FILE"
# Populate FS-Cache, then discard the page cache. sync echo 1 > /proc/sys/vm/dropcaches cat "$FILE" > /dev/null sync echo 1 > /proc/sys/vm/dropcaches
fallocate --zero-range -o 1M -l 1M "$FILE"
if cmp -s /tmp/expected "$FILE"; then echo "readback: OK" else echo "readback: STALE DATA" fi '
Before this change, the readback differs from /tmp/expected:
readback: STALE DATA
After this change, it matches:
readback: OK
In the Linux kernel, the following vulnerability has been resolved:
ipv6: mcast: fix RCU list diversion in ip6mcdel1src()
When removing a source filter whose count reaches zero, ip6mcdel1src() unlinks psf from pmc->mcasources. If the filter was previously active, the code moved psf directly into pmc->mcatomb by updating psf->sfnext.
Because pmc->mcasources is traversed locklessly under RCU (e.g. by ipv6chkmcastaddr()), mutating psf->sfnext before a grace period elapses diverts concurrent readers to the tombstone list. Consequently, readers miss remaining active sources in pmc->mcasources and improperly examine deleted tombstone entries.
Fix this by allocating a new tombstone node for pmc->mcatomb (as done in sfsetstate()) and retiring the original psf via kfreercu().
In the Linux kernel, the following vulnerability has been resolved:
ipv6: mcast: use copy-on-write RCU updates in ip6mcsource()
pmc->sflist is read locklessly under rcureadlock() by inet6mccheck() during packet reception in the UDP and RAW multicast receive paths.
ip6mcsource() mutated psl->sladdr and psl->slcount in-place when adding or removing a source filter. Additionally, when expanding the filter buffer, newpsl was published via rcuassignpointer() before writing the new source into the array.
Because 16-byte struct in6addr writes are not atomic and array shifting is not synchronized with RCU readers, concurrent readers in inet6mccheck() could read torn IPv6 addresses or observe duplicated/missed source entries.
Fix this by switching ip6mcsource() to copy-on-write RCU updates: allocate and fully populate newpsl before publishing it via rcuassignpointer(), and reclaim the old filter via kfreercu(), matching ip6mcmsfilter().
Also remove the now unused IP6SFBLOCK macro.
btrfs: fix the possible bioclist memory leak during error
In the Linux kernel, the following vulnerability has been resolved:
net/rds: clear cpflags bits individually in rdsconnpathreset()
rdsconnpathreset() wipes the whole flag word with a plain cp->cpflags = 0 store. Every other accessor of that word uses atomic bitops, and some of them can run concurrently with the reset: RDSLLSENDFULL is set from rdssendxmit() and cleared from the transport completion paths, neither of which holds anything that excludes the shutdown worker. A plain store racing an atomic read-modify-write on the same word is a data race, and whichever side loses has its update silently discarded.
Clear the two bits the reset is actually responsible for instead. RDSINXMIT and RDSRECVREFILL need no store at all here: they belong to the caller, rdsconnshutdown(), which waits for both to be clear before calling the transport shutdown and this reset.
This also gives every bit in cpflags a single well-defined writer discipline, which the following patches rely on when they turn RDSINXMIT and RDSRECVREFILL into bit locks held across the teardown: a blanket store mid-teardown would destroy lock ownership that an atomic clear preserves.
Oracle UEK carries the same conversion ("net/rds: Preserve essential connection state flags"), motivated by its asynchronous shutdown state machine, whose progress and destroy flags must survive the reset. UEK's variant also clears RDSINXMIT and RDSRECVREFILL because there the reset runs as the final step of a teardown that owns both bits, making those clears its unlock. Upstream that release belongs in rdsconnshutdown(): once a later patch in this series turns the two bits into locks held across the teardown, ending ownership needs release semantics and a wake-up that a plain clear inside the reset would not provide.
Based on Oracle UEK commit "net/rds: Preserve essential connection state flags" by Gerd Rausch.
erofs: disable LZ4 rolling decompression for now
In the Linux kernel, the following vulnerability has been resolved:
media: airspy: Return queued buffers on startstreaming() failure
The vb2 framework hands buffers to the driver via bufqueue() before calling startstreaming(). If startstreaming() returns an error without first returning those buffers via vb2bufferdone(), vb2startstreaming() fires WARNON(ownedbydrvcount) and the queued buffers leak.
airspystartstreaming() returned -ENODEV early when the USB device had been disconnected (s->udev == NULL) without returning any buffers that bufqueue() had already accepted. Take v4l2lock first and jump to the existing errclearbit label, which already drains s->queuedbufs via vb2bufferdone(..., VB2BUFSTATEQUEUED) before unlocking.
This mirrors the uvcvideo fix in commit 4cf3b6fd54eb ("media: uvcvideo: Return queued buffers on startstreaming() failure").
In the Linux kernel, the following vulnerability has been resolved:
media: meson: vdec: Fix memory leak in error path of vdecopen
The vdecopen() function previously jumped directly to errm2mrelease when vdecinitctrls() failed, skipping release of the m2m context. This caused a resource leak.
Fix it by introducing a proper errm2mctxrelease label that calls v4l2m2mctxrelease(sess->m2mctx) before releasing the m2m device.
This was identified via kmemleak: unreferenced object 0xffff0000205d6878 (size 8): comm "v4lid", pid 5289, jiffies 4294938580 hex dump (first 8 bytes): 40 d2 49 18 00 00 ff ff @.I..... backtrace (crc d3204599): kmemleakalloc+0xc8/0xf0 kvmallocnodenoprof+0x60c/0x850 v4l2ctrlhandlerinitclass+0x1b4/0x2e8 [videodev] vdecopen+0x1f4/0x788 [mesonvdec] v4l2open+0x144/0x460 [videodev] chrdevopen+0x1ac/0x500 dodentryopen+0x3f0/0xfe8 vfsopen+0x68/0x320 doopen+0x2d8/0x9a8 pathopenat+0x1d0/0x4f0 dofilpopen+0x190/0x380 dosysopenat2+0xf8/0x1b0 arm64sysopenat+0x13c/0x1e8 invokesyscall+0xdc/0x268 el0svccommon.constprop.0+0x178/0x258 doel0svc+0x4c/0x70
In the Linux kernel, the following vulnerability has been resolved:
media: msi2500: Return queued buffers on startstreaming() failure
The vb2 framework hands buffers to the driver via bufqueue() before calling startstreaming(). If startstreaming() returns an error without first returning those buffers via vb2bufferdone(), vb2startstreaming() fires WARNON(ownedbydrvcount) and the queued buffers leak.
msi2500startstreaming() had five error paths that all hit this trap and were further tangled by ret-overwriting between calls:
- -ENODEV when the USB device was already disconnected - -ERESTARTSYS when mutexlockinterruptible() was interrupted - msi2500setusbadc() failure: ret was silently overwritten by the next call (msi2500isocinit), so the error was lost entirely - msi2500isocinit() failure: cleanupqueuedbufs was called, but the function then fell through to msi2500ctrlmsg() and again masked the original error by overwriting ret - msi2500ctrlmsg(CMDSTARTSTREAMING) failure: no cleanup at all, leaving isoc URBs submitted with no way for the driver to consume them
Consolidate the error paths into a small goto chain. Every failure now stops the function, drains the queued-buffer list, and returns the real error code. The ctrlmsg failure path also rolls back the preceding msi2500isocinit() via msi2500isoccleanup() before unlocking and draining.
The cleanup helper takes a vb2bufferstate argument so that the startstreaming error paths can pass VB2BUFSTATEQUEUED (as expected by userspace on startstreaming failure) while stopstreaming keeps its existing VB2BUFSTATEERROR semantics.
This mirrors the uvcvideo fix in commit 4cf3b6fd54eb ("media: uvcvideo: Return queued buffers on startstreaming() failure").
In the Linux kernel, the following vulnerability has been resolved:
media: pwc: Drain fillbuf on startstreaming() failure
pwcisocinit() submits its isochronous URBs with usbsubmiturb(.., GFPKERNEL) in a loop. After the first URB is submitted, its completion handler pwcisochandler() can run on another CPU before the loop finishes:
startstreaming() pwcisocinit() usbsubmiturb(urbs[0], GFPKERNEL) pwcisochandler(urbs[0]) pdev->fillbuf = pwcgetnextfillbuf(pdev) usbsubmiturb(urbs[i>0], ..) -> fails pwcisoccleanup(pdev) / kills URBs / return ret; pwccleanupqueuedbufs(pdev, VB2BUFSTATEQUEUED)
pwcgetnextfillbuf() detaches a buffer from pdev->queuedbufs and stores it in pdev->fillbuf. The error path in startstreaming() only drains pdev->queuedbufs, so the buffer parked in pdev->fillbuf is leaked. vb2startstreaming() then triggers WARNON(ownedbydrvcount).
stopstreaming() already handles this since commit 80b0963e1698 ("[media] pwc: fix WARNON"), which added the fillbuf drain in the teardown path but not in the startstreaming() error path. Mirror that handling on failure so startstreaming() returns with no buffer owned by the driver.
Issue identified by automated review of the INV-003 series at https://sashiko.dev/
fs: preserve ACLDONTCACHE state in forgetcachedacl()
geneve: require CAPNETADMIN in the device netns for changelink
In the Linux kernel, the following vulnerability has been resolved:
vxlan: mdb: Fix source list corruption on a failed replace
When replacing the source list of an MDB remote entry, all existing sources are first marked for deletion and vxlanmdbremotesrcsadd() is then called to add the new source list. Sources present in the new list have their deletion mark cleared, and any sources left marked afterwards are removed.
If vxlanmdbremotesrcsadd() fails partway through, its error path deletes all entries on the remote's source list. That rollback is only correct for its other caller, vxlanmdbremoteadd(), where the remote was just allocated and the list contains solely entries added during the call. On the replace path the list also holds pre-existing sources, so a failed replace tears them down together with their (S, G) forwarding entries instead of leaving the entry unchanged.
This is reachable from an existing (, G) remote. An EXCLUDE filter that loses sources starts forwarding traffic that should be blocked, while an INCLUDE filter that loses sources drops traffic that should be forwarded.
Mark entries created during the current pass with a new VXLANSGRPFNEW flag. On failure, delete only those entries and clear the deletion mark on the pre-existing ones, so a failed replace leaves the source list untouched. Retain the flag until the whole operation succeeds and then clear it. Also stop vxlanmdbremotesrcadd() from deleting a pre-existing entry it only looked up when adding that entry's forwarding entry fails.
In the Linux kernel, the following vulnerability has been resolved:
riscv: mm: Unconditionally sfence.vma for spurious fault
Svvptc does not guarantee that it's safe to just return here. Since we have already cleared our bit, if, theoretically, the bounded timeframe for the accessed page to become valid still hasn't happened after sret, we could fault again and actually crash.
Hopefully, these spurious faults should be rare enough that this is an acceptable slowdown.
dma-buf/udmabuf: skip redundant cpu sync to fix cacheline EEXIST warning
AMD-SN-7061: Safe RET Interrupt Vulnerability
Bluetooth: bpa10x: avoid OOB read of revision string in bpa10xsetup()
In the Linux kernel, the following vulnerability has been resolved:
staging: rtl8723bs: fix OOB reads in isapintkip() IE loop
The loop in isapintkip() iterates over IEs without verifying that enough bytes remain before dereferencing the IE header or its payload:
- pIE->elementid and pIE->length are read without checking that i + sizeof(pIE) <= ielength, so a truncated IE at the end of the buffer causes an OOB read.
- For WLANEIDVENDORSPECIFIC the code compares pIE->data + 12, which requires pIE->length >= 16. For WLANEIDRSN it compares pIE->data + 8, requiring pIE->length >= 12. Neither requirement is checked.
Add the missing IE header and payload bounds checks and guard each data access with an explicit pIE->length minimum, matching the pattern established in updatebeaconinfo().
In the Linux kernel, the following vulnerability has been resolved:
userfaultfd: gate mustwait writability check on ptepresent()
userfaultfdmustwait() and userfaultfdhugemustwait() read the PTE without taking the page table lock and then apply ptewrite() / hugeptewrite() to it. Those accessors decode bits from the present encoding only; on a swap or migration entry they read the offset bits that happen to share the same position and return an undefined result.
The intent of the check is "is this fault still WP-blocked?". A non-marker swap entry means the page is in transit -- the userfault context the original fault delivered against is no longer the same, and the swap-in or migration completion path will re-deliver a fresh fault if userspace still needs to handle it. Worst case under the current code the garbage write bit says "wait", and the thread stays asleep until a UFFDIOWAKE that may never arrive.
Gate the writability check on ptepresent() so the lockless re-check only inspects present-PTE bits when the entry is actually present. The non-present, non-marker case returns "don't wait" and lets the fault path retry.
In the Linux kernel, the following vulnerability has been resolved:
KVM: x86: Unconditionally recompute CR8 intercept on PPR update
The TPRTHRESHOLD field in the VMCS is used by VMX to induce VM exits when the guest's virtual TPR falls under the specified threshold, allowing KVM to inject previously masked interrupts.
KVM handles these VM exits in handletprbelowthreshold(). Commit eb90f3417a0c ("KVM: vmx: speed up TPR below threshold vmexits") optimized this function by calling apicupdateppr() instead of raising KVMREQEVENT. apicupdateppr() then raises KVMREQEVENT if there is a pending, deliverable interrupt.
However, if there are no new interrupts pending, apicupdateppr() does not issue the request. Thus, kvmlapicupdatecr8intercept() and vmxupdatecr8intercept() are not called before VM entry, which results in a high, stale TPRTHRESHOLD. This is problematic due to the following sentence in 28.2.1.1 "VM-Execution Control Fields" in the SDM:
The following check is performed if the “use TPR shadow” VM-execution control is 1 and the “virtualize APIC accesses” and “virtual-interrupt delivery” VM-execution controls are both 0: the value of bits 3:0 of the TPR threshold VM-execution control field should not be greater than the value of bits 7:4 of VTPR.
This error condition is typically not observed when KVM runs on a bare metal system because modern processors support APICv, which enables virtual-interrupt delivery, and which KVM uses when possible. This causes the processor to no longer generate TPR-below-threshold exits and to no longer check TPRTHRESHOLD on entry. However, when running on older platforms, or under nested virtualization on a hypervisor that does not support virtual-interrupt delivery and enforces this check (like Hyper-V) this can cause a VM entry failure with hardware error 0x7, as seen in [1].
Call kvmlapicupdatecr8intercept() if apicupdateppr() does not find a deliverable interrupt (and thus does not raise KVMREQEVENT). Remove calls to kvmlapicupdatecr8intercept() on paths that end up in apicupdateppr(), as they now become redundant. This ensures that any path that updates the guest's PPR also figures out if KVM needs to wait for a TPR change (using TPRTHRESHOLD on VMX or CR8 intercepts on SVM).
In the Linux kernel, the following vulnerability has been resolved:
usb: gadget: function: rndis: add length check for header
Add a length check for the rndis header in rndisrmhdr, to ensure that MessageType, MessageLength, DataOffset, and DataLength fields are present before they are accessed.
In the Linux kernel, the following vulnerability has been resolved:
iio: adc: ti-ads1119: fix PM reference leak in buffer preenable
ads1119triggeredbufferpreenable() resumes the device with pmruntimeresumeandget() before starting a conversion.
If i2csmbuswritebyte() fails, the function returns the error directly and leaves the runtime PM usage counter elevated. The matching postdisable callback is not called when preenable fails, so the reference is leaked and the device may remain runtime-active indefinitely.
Store the I2C transfer result in ret and drop the runtime PM reference on failure before returning the error.
In the Linux kernel, the following vulnerability has been resolved:
iio: chemical: scd30: Cleanup initializations and fix sign-extension bug
Include linux/bitfield.h for FIELDGET().
Create new macros for bit manipulation in combination with manual bit manipulation being replaced with FIELDGET().
The current variable declaration and initializations are barely readable and use comma separations across multiple lines. Refactor the initializations so that mantissa and exp have separate declarations and sign gets initialized later.
In addition (and due to the nature of the cleanup), fix a sign-extension bug where, float32 would get bitwise anded with ~BIT(31) (which is 0xFFFFFFFF7FFFFFFF) which corrupted the exponent.
In the Linux kernel, the following vulnerability has been resolved:
iio: light: gp2ap002: fix runtime PM leak on read error
gp2ap002readraw() calls pmruntimegetsync() before reading the lux value, but if gp2ap002getlux() fails, it returns directly. This skips the pmruntimeputautosuspend() call at the "out" label, permanently leaking a runtime PM reference and preventing the device from autosuspending.
Replace the direct return with a "goto out" to ensure the reference is properly dropped on the error path.
audit: Fix data races of skbqueuelen() readers on auditqueue
In the Linux kernel, the following vulnerability has been resolved:
ksmbd: use opener credentials for ADS I/O
Alternate data streams are stored as xattrs. Unlike regular file I/O, their read and write paths therefore call VFS xattr helpers which recheck inode permissions and LSM policy using the current task credentials.
Run ADS I/O with the credentials captured when the SMB handle was opened.
In the Linux kernel, the following vulnerability has been resolved:
proc: protect ptracemayaccess() with execupdatelock (FD links)
procpidgetlink() and procpidreadlink() currently look up the task from the pid once, then do the ptrace access check on that task, then look up the task from the pid a second time to do the actual access. That's racy in several ways.
To fix it, pass the task to the ->procgetlink() handler, and instead of procfdaccessallowed(), introduce a new helper callprocgetlink() that looks up and locks the task, does the access check, and calls ->procgetlink().
In the Linux kernel, the following vulnerability has been resolved:
proc: protect ptracemayaccess() with execupdatelock (part 1)
Fix the easy cases where procfs currently calls ptracemayaccess() without execupdatelock protection, where the fix is to simply add the extra lock or use mmaccess():
- dotaskstat(): grab execupdatelock - procpidwchan(): grab execupdatelock - procmapfileslookup(): use mmaccess() instead of gettaskmm() - procmapfilesreaddir(): use mmaccess() instead of gettaskmm() - procnsgetlink(): grab execupdatelock - procnsreadlink(): grab execupdatelock