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.
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/
geneve: require CAPNETADMIN in the device netns for changelink
dma-buf/udmabuf: skip redundant cpu sync to fix cacheline EEXIST warning
Bluetooth: bpa10x: avoid OOB read of revision string in bpa10xsetup()
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:
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:
sysfs: don't remove existing directory on update failure
When sysfsupdategroup() is called for a named group and createfiles() fails (e.g. -ENOMEM), internalcreategroup() calls kernfsremove(kn) on the group directory. In the update path, kn was obtained via kernfsfindandget() and refers to a directory that already existed before this call. Removing it silently destroys a sysfs group that the caller did not create.
Only remove the directory if we created it ourselves. On update failure the directory remains as it is left empty by removefiles() inside createfiles(), but can be repopulated by a retry.
In the Linux kernel, the following vulnerability has been resolved:
batman-adv: tt: fix negative ttbufflen
batadvorignode::ttbufflen was declared as s16, but the field is never intended to hold a negative value. When a value greater than 32767 is assigned, it wraps to a negative signed integer.
In batadvsendotherttresponse(), ttbufflen is temporarily widened to s32. The incorrectly negative s16 value propagates into the s32, causing batadvttpreparetvlvglobaldata() to allocate a full sized buffer but populates only a small portion of it with the collected changeset. All remaining bits are kept uninitialized.
Using an u16 avoids this type confusion and ensures that no (negative) sign extension is performed in batadvsendotherttresponse().
In the Linux kernel, the following vulnerability has been resolved:
In the Linux kernel, the following vulnerability has been resolved:
usb: typec: altmodes/displayport: validate count before reading Status Update VDO
A broken/malicious device can send the incorrect count for a status update VDO, which will cause the kernel to read uninitialized stack data and send it off elsewhere.
Fix this up by correctly verifying the count for the update object.
In the Linux kernel, the following vulnerability has been resolved:
macsec: fix replay protection at XPN lower-PN wrap
In macsecpostdecrypt(), when pn is U32MAX, pn + 1 overflows u32 to 0 and the first branch never fires. If nextpnhalves.lower is also in the upper half, pnsamehalf(pn, lower) is true and the XPN else-if does not fire either, leaving nextpnhalves unchanged. An attacker that captures the legitimate frame carrying pn == 0xFFFFFFFF on an XPN association can then replay it indefinitely, since lowestpn never rises above the captured pn and macsecdecrypt() reconstructs the same IV.
Extend the XPN else-if to also fire when pn + 1 wraps to 0, so receipt of pn == U32MAX advances nextpnhalves to (upper + 1, 0).
In the Linux kernel, the following vulnerability has been resolved:
usb: usbtmc: check URB actuallength for interrupt-IN notifications
USBTMC devices can use an optional interrupt endpoint for notification messages. These typically contain two-byte headers indicating the payload format, but the driver does not check if these headers are present before accessing the data buffers. In cases where the URB actuallength is not enough to fit these headers, the driver will either cause an out-of-bounds read, or consume stale leftover data from a previous notification.
Fix by checking if actualdata contains enough bytes for the headers, otherwise resubmit URB to the interrupt endpoint.
In the Linux kernel, the following vulnerability has been resolved:
USB: serial: belkinsa: validate interrupt status length
The Belkin interrupt callback treats interrupt data as a four-byte status report and reads LSR/MSR fields at offsets 2 and 3. The interrupt-in buffer length is derived from endpoint wMaxPacketSize, and short interrupt transfers may complete successfully with a smaller actuallength.
Check the completed interrupt packet length before parsing status fields so short interrupt endpoints and short successful packets are ignored instead of causing out-of-bounds or stale status-byte reads.
KASAN report as below:
BUG: KASAN: slab-out-of-bounds in belkinsareadintcallback() Read of size 1 Call trace: belkinsareadintcallback() (drivers/usb/serial/belkinsa.c:202) usbhcdgivebackurb() (drivers/usb/core/hcd.c:1630) dummytimer() (?:?)
In the Linux kernel, the following vulnerability has been resolved:
USB: serial: cypressm8: validate interrupt packet headers
cypressreadintcallback() parses the interrupt-in buffer according to the selected Cypress packet format. Format 1 has a two-byte status/count header and format 2 has a one-byte combined status/count header. The usb-serial core sizes the interrupt-in buffer from the endpoint descriptor's wMaxPacketSize, and successful interrupt transfers can complete short when URBSHORTNOTOK is not set.
Check that the completed packet contains the selected header before reading it. Malformed short reports are ignored and the interrupt URB is resubmitted through the existing retry path, preventing out-of-bounds header-byte reads.
KASAN report as below: KASAN slab-out-of-bounds in cypressreadintcallback+0x240/0x7f0 Read of size 1 Call trace: cypressreadintcallback() (drivers/usb/serial/cypressm8.c:1009) usbhcdgivebackurb() dummytimer()
[ johan: use constants in header length sanity checks ]
In the Linux kernel, the following vulnerability has been resolved:
USB: serial: mctu232: fix missing interrupt-in transfer sanity check
Add the missing sanity check on the size of interrupt-in transfers to avoid parsing stale or uninitialised slab data (and leaking it to user space).
In the Linux kernel, the following vulnerability has been resolved:
thunderbolt: property: Reject u32 wrap in tbpropertyentryvalid()
entry->value is u32 and entry->length is u16; the sum is performed in u32 and wraps. A malicious XDomain peer can pick value = 0xffffff00, length = 0x100 so the sum 0x100000000 wraps to 0 and passes the > blocklen check. tbpropertyparse() then passes entry->value to parsedwdata() as a dword offset into the property block, reading attacker-directed memory far past the allocation.
For TEXT-typed entries with the "deviceid" or "vendorid" keys this lands in xd->devicename / xd->vendorname and is readable back via the per-XDomain devicename / vendorname sysfs attributes; the leak is NUL-bounded (kstrdup() stops at the first zero byte) and untargeted (the attacker picks a delta, not an absolute address). DATA-typed entries are parsed into property->value.data but not generically surfaced to userspace.
Use checkaddoverflow() so a wrapped sum is rejected.
In the Linux kernel, the following vulnerability has been resolved:
mptcp: close TOCTOU race while computing rcvwnd
The MPTCP output path access locklessly the MPTCP-level ackseq in multiple times, using possibly different values for the dataack in the DSS option and to compute the announced rcv wnd for the same packet.
Refactor the cote to avoid inconsistencies which may confuse the peer. Also ensure that the MPTCP level rcv wnd is updated only when the egress packet actually contains a DSS ack.
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.