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.
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:
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: 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:
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
In the Linux kernel, the following vulnerability has been resolved:
mm/slab: do not limit zeroing to origsize when only red zoning is enabled
When init (zeroing) on allocation is requested, for kmalloc() we generally have to zero the full object size even if a smaller size is requested, in order to provide krealloc()'s GFPZERO guarantees.
But if we track the requested size, krealloc() uses that information to do the right thing, so we can zero only the requested size. With red zoning also enabled, any extra size became part of the red zone, so it must not be zeroed and thus we must zero only the requested size.
However the current check is imprecise, and will trigger also when only SLABREDZONE is enabled without SLABSTOREUSER (which enables tracking the requested size). This means enabling red zoning alone can compromise krealloc()'s GFPZERO contract.
Fix this by using slubdebugorigsize() instead, which is the exact check for whether the requested size is tracked. We don't need to care if red zoning is also enabled or not. Also update and expand the comment accordingly.
In the Linux kernel, the following vulnerability has been resolved:
usb: typec: tcpm: Validate SVID index in svdmconsumemodes()
In svdmconsumemodes(), the SVID value is read from pmdata->svids using pmdata->svidindex as an array index without bounds validation:
paltmode->svid = pmdata->svids[pmdata->svidindex];
If pmdata->svidindex is driven beyond SVIDDISCOVERYMAX (16), it results in an out-of-bounds read of the pmdata->svids array. Because pdmodedata is embedded inside struct tcpmport, indexing past svids reads into adjacent fields. In particular: - At index 16, it reads the altmodes count. - At index 18 and beyond, it reads into altmodedesc[], which contains partner-supplied SVDM Discovery Modes VDOs.
By injecting a chosen SVID into altmodedesc[0].vdo and driving svidindex to 20, the partner can force paltmode->svid to be loaded with an arbitrary, partner- chosen SVID, which is then registered via typecpartnerregisteraltmode().
Fix this by validating that pmdata->svidindex is non-negative and strictly less than pmdata->nsvids before accessing the pmdata->svids array inside svdmconsumemodes().
crypto: ecc - Fix carry overflow in vli multiplication
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.
In the Linux kernel, the following vulnerability has been resolved:
Input: mms114 - fix touch indexing for MMS134S and MMS136
The MMS134S and MMS136 touch controllers have an event size of 6 bytes rather than 8 bytes. When mms114readreg() reads the touch data packet from the device into the touch buffer, the events are packed tightly at 6-byte intervals. However, the driver iterates through the events using standard C array indexing (touch[index]), where each element is sizeof(struct mms114touch) (8 bytes) apart. As a result, any touch events beyond the first one are read from incorrect offsets and parsed improperly.
Fix this by explicitly calculating the byte offset for each touch event based on the device's specific event size.