In the Linux kernel, the following vulnerability has been resolved:
Bluetooth: btmtk: validate WMT event SKB length before struct access
btmtkusbhciwmtsync() casts the WMT event response SKB data to struct btmtkhciwmtevt (7 bytes) and struct btmtkhciwmtevtfuncc (9 bytes) without first checking that the SKB contains enough data. A short firmware response causes out-of-bounds reads from SKB tailroom.
Use skbpulldata() to validate and advance past the base WMT event header. For the FUNCCTRL case, pull the additional status field bytes before accessing them.
dma-buf/udmabuf: skip redundant cpu sync to fix cacheline EEXIST warning
AMD-SN-7061: Safe RET Interrupt Vulnerability
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:
most: core: fix resource leak in mostregisterinterface error paths
The function mostregisterinterface() did not correctly release resources if it failed early (before registering the device). In these cases, it returned an error code immediately, leaking the memory allocated for the interface.
Fix this by initializing the device early via deviceinitialize() and calling putdevice() on all error paths.
The mostregisterinterface() is expected to call putdevice() on error which frees the resources allocated in the caller. The putdevice() either calls releasemdev() or dim2release(), depending on the caller.
Switch to using deviceadd() instead of deviceregister() to handle the split initialization.
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.
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/
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:
NFSv4: include MAYWRITE in open permission mask for OTRUNC
POSIX requires write permission to truncate a file, so an open() that specifies OTRUNC must be authorized for write access regardless of the OACCMODE access mode.
nfsopenpermissionmask() builds the access mask passed to nfsmayopen(), which is the local authorization gate for OPENs the client serves itself from a cached write delegation via the canopendelegated() path in nfs4tryopencached(). The mask is derived from OACCMODE alone, so an open(ORDONLY | OTRUNC) against a file the caller cannot write requests only MAYREAD and passes the local check. The OPEN is then satisfied locally and the truncation is issued to the server as a SETATTR(size=0) over the delegation stateid, which the server accepts under standard write-delegation semantics. POSIX requires that this open fail with EACCES.
Include MAYWRITE in the mask whenever OTRUNC is set so the local check matches the access the server would have enforced.
fs: preserve ACLDONTCACHE state in forgetcachedacl()
drm/amdgpu/vcn4: avoid rereading IB param length
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:
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.
geneve: require CAPNETADMIN in the device netns for changelink
In the Linux kernel, the following vulnerability has been resolved:
net: ipgre: require CAPNETADMIN in the device netns for changelink
A tunnel changelink() operates on at most two netns, devnet(dev) and the tunnel link netns t->net. They differ once the device is created in or moved to a netns other than the one the request runs in. The rtnl changelink path checks CAPNETADMIN only against devnet(dev), so a caller privileged there but not in t->net can rewrite a tunnel that lives in t->net.
Add rtnldevlinknetcapable() next to rtnlgetnetnscapable() in net/core/rtnetlink.c. It requires CAPNETADMIN in the link netns and is skipped when the link netns is devnet(dev), where the rtnl path already checked it. The other patches in this series use the same helper.
Gate ipgrechangelink() and erspanchangelink() with it, at the top of the op before any attribute is parsed, because the parsers update live tunnel fields first. ipgrenetlinkparms() sets t->collectmd before iptunnelchangelink() runs.
Commit 8b484efd5cb4 ("ip6: vti: Use ip6tnl.net in vti6siocdevprivate().") added the same check on the ioctl path. This adds it on RTMNEWLINK.
crypto: ecc - Fix carry overflow in vli multiplication
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 dualshock4parsereport of hid-playstation.c, there is a possible out-of-bounds read due to a missing bounds check. This could lead to physical information disclosure with no additional execution privileges needed. User interaction is not needed for exploitation.
In the Linux kernel, the following vulnerability has been resolved:
KVM: nSVM: Raise #UD if unhandled VMMCALL isn't intercepted by L1
Explicitly synthesize a #UD for VMMCALL if L2 is active, L1 does NOT want to intercept VMMCALL, nestedsvml2tlbflushenabled() is true, and the hypercall is something other than one of the supported Hyper-V hypercalls. When all of the above conditions are met, KVM will intercept VMMCALL but never forward it to L1, i.e. will let L2 make hypercalls as if it were L1.
The TLFS says a whole lot of nothing about this scenario, so go with the architectural behavior, which says that VMMCALL #UDs if it's not intercepted.
Opportunistically do a 2-for-1 stub trade by stub-ifying the new API instead of the helpers it uses. The last remaining "single" stub will soon be dropped as well.
[sean: rewrite changelog and comment, tag for stable, remove defunct stubs]
fanotify: fix false positive on permission events
In the Linux kernel, the following vulnerability has been resolved:
drm/amd/display: Fix out-of-bounds read in dpgeteqauxrdinterval()
[Why & How] The auxrdinterval array in struct dclttprcaps is declared with MAXREPEATERCNT - 1 (7) elements, indexed 0..6. However, the offset parameter passed to dpgeteqauxrdinterval() can be as large as MAXREPEATERCNT (8) when a sink reports 8 LTTPR repeaters via DPCD. This leads to an out-of-bounds read of auxrdinterval[7] when offset is 8.
Fix this by growing auxrdinterval to MAXREPEATERCNT elements to accommodate the full range of valid repeater counts defined by the DP spec.
(cherry picked from commit a55a458a8df37a65ffda5cf721d554a8f74f6b04)
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().
erofs: disable LZ4 rolling decompression for now
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().
In the Linux kernel, the following vulnerability has been resolved:
riscv: kvm: fix vector context allocation leak
When the second kzalloc (hostcontext.vector.datap) fails in kvmriscvvcpuallocvectorcontext, the first allocation (guestcontext.vector.datap) is leaked. Free it before returning.
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:
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.
fbdev: fbcon: fix out-of-bounds read in errout of fbcondosetfont()
drm/gud: validate GUDROTATION0 is present in supported rotations
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