In the Linux kernel, the following vulnerability has been resolved:
KVM: x86/mmu: Check write tracking in all address spaces
kvmgfniswritetracked() checks only the supplied memslot, but page tracking is per-address-space and shadow pages are shared across all address spaces. With SMM, a GFN can therefore be write-tracked in one address space and appear untracked through the other.
Check the supplied slot first, then the slot for the other address space. This ensures all callers honor write tracking regardless of the active address space. In particular, it prevents mmutrytounsyncpages() from marking an upper-level shadow page unsync and eventually triggering the BUG in ptelistremove().
[invert direction of the conditional. - Paolo]
In the Linux kernel, the following vulnerability has been resolved:
wifi: iwlwifi: mei: pass correct argument to function
The first argument to iwlmeiwritecyclicbuf() should be the cldev but the qhead pointer is passed instead. Fix it.
In the Linux kernel, the following vulnerability has been resolved:
sctp: fix a TOCTOU race in SCTPCMDTIMERSTART
The SCTPCMDTIMERSTART handler checks timerpending() before calling timerreduce(). The timer can expire and detach between these operations, causing timerreduce() to rearm the timer without taking the association reference required for the newly armed timer.
The timer callback later unconditionally drops its association reference, which can leave the association reference count unbalanced and result in use-after-free during association teardown.
Use the return value of timerreduce() to determine whether the timer was actually armed. Take the association reference only when timerreduce() successfully starts a new timer, closing the race between checking the timer state and rearming it.
This issue was reported by Nico Yip (@cyeaa) working with TrendAI Zero Day Initiative.
In the Linux kernel, the following vulnerability has been resolved:
vxlan: mdb: Fix use-after-free in vxlanmdbremotesrcdel()
vxlanmdbisvalidsource(), which validates MDBEATTRSOURCE and every MDBEATTRSRCLIST member, accepts the all-zeros address.
A source list is only accepted on a (, G) entry, whose source is the all-zeros address, and for each member of the list an (S, G) entry is derived from it by substituting the source. Entries are keyed by a plain memcmp() of struct vxlanmdbentrykey, so if MDBEATTRSOURCE is present and holds the all-zeros address and the source list holds it as well, the derived (S, G) key is byte-identical to the (, G) key and resolves to the same entry. Omitting MDBEATTRSOURCE is not equivalent, as the key is then left with a zero address family.
vxlanmdbremotesrcdel() removes the forwarding entry of a source before freeing the source entry:
vxlanmdbremotesrcfwddel(vxlan, group, remote, &ent->addr); vxlanmdbremotesrcentrydel(ent);
With the keys aliased, the first call deletes the remote of the entry that owns 'ent' instead of a separate (S, G) entry, and frees 'ent'. The second call then runs on the freed entry, and its hlistdel() reads ->pprev and ->next out of it and writes through them.
Adding the (, G) entry with NLMFREPLACE and no source list marks the all-zeros source for deletion and reaches this from the sweep at the end of vxlanmdbremotesrcsreplace().
BUG: KASAN: slab-use-after-free in vxlanmdbadd+0x1cd/0xd70 Read of size 8 at addr ffff888102852500 by task poc/84 vxlanmdbadd+0x1cd/0xd70 vxlanmdbadd+0xc0/0x140 rtnlmdbadd+0x157/0x2a0 rtnetlinkrcvmsg+0x207/0x5a0 Allocated by task 84: kmalloccachenoprof+0x153/0x360 vxlanmdbremotesrcsadd+0x2eb/0x440 vxlanmdbadd+0x803/0xd70 Freed by task 84: kfree+0x14c/0x3b0 vxlanmdbremotedel+0x129/0x1a0 vxlanmdbdel+0x4f/0xe0 vxlanmdbremotesrcfwddel.isra.0+0x162/0x1b0 vxlanmdbadd+0x1c5/0xd70
The MDB operations are netns-scoped, so an unprivileged user can perform them in a new user and network namespace.
Reject the all-zeros address in vxlanmdbisvalidsource(), which covers both call sites. A (, G) entry is expressed by omitting the source, so nothing legitimate is refused.
Discovered by XBOW, triaged by Baul Lee <baul.lee@xbow.com>
In the Linux kernel, the following vulnerability has been resolved:
sctp: fix soft lockup from unpadded ASCONF-ACK parameter iteration
sctpverifyasconf() walks ASCONF-ACK parameters with sctpwalkparams(), which advances by SCTPPAD4(length), while the consumer sctpgetasconfresponse() iterates the same parameters advancing by the raw length, without padding. A single odd-length parameter desynchronises the two walks and makes the consumer interpret attacker-controlled bytes at a misaligned offset.
When those bytes yield a length of zero, the while loop over asconfacklen makes no progress, spinning forever in softirq context, and the watchdog reports a soft lockup. All reads stay within the received skb, so the lockup is a pure remote denial of service. A remote peer can trigger it with a crafted ASCONF-ACK on an ADD-IP enabled association with an outstanding ASCONF (RFC 5061 section 4.1.2 requires the chunk to be authenticated, but the predefined empty key id 0 allows the peer to compute the same association HMAC from publicly exchanged parameters, so the gate does not help).
The SCTPPARAMERRCAUSE case of sctpverifyasconf() also performs no length check, letting a parameter without a complete error header reach the consumer, which reads errhdr.cause past the end of the parameter, an out-of-bounds read.
Reject SCTPPARAMERRCAUSE parameters shorter than sizeof(struct sctpaddipparam) + sizeof(struct sctperrhdr) at the verifier, and advance the consumer iterator with the same padding rule as the verifier to keep the two walks in lockstep. The verifier change guarantees a complete error header in every ERRCAUSE parameter the consumer can see, so the consumer's asconfacklen check is dropped and it returns errparam->cause directly. The consumer padding fix is still required because odd lengths remain valid for SCTPPARAMERRCAUSE per RFC 5061.
The issue was found by ZeroHive, a vulnerability hunting agent at Tencent Yunding Lab.
ALSA: pcm: Serialize PCM mmap with buffer reallocation to fix page UAF
Bluetooth: L2CAP: fix chan mode for LECONNREQ + EXTFLOWCTL pchan
Bluetooth: L2CAP: fix out-of-bounds write in l2capecredconnect
In the Linux kernel, the following vulnerability has been resolved:
net/sched: clsu32: fix duplicate handle when node ID pool is exhausted
gennewkid() falls back to returning max (htid | 0xFFF) when both idrallocu32() ranges are full, instead of reporting an error. u32change() trusts that value and inserts a new knode with a handle that is already live in the hash table, breaking handle uniqueness within the table's node ID space.
The handle was never reserved in ht->handleidr, so every later error path that does idrremove(&ht->handleidr, handle) removes the reservation of a different, live knode, which is then reused — one failed add compounds into further duplicates.
The 4095 limit is per (table, bucket) — ht->handleidr is per hash table and the range is derived from htid (bucketid), so a table with divisor 256 can legitimately hold 2564095 knodes.
The sibling helper gennewhtid() has the same silent in-band failure: it returns 0 when the tpc handle pool (1..0x7FF) is full, and u32init() publishes the root hash table with handle 0 without checking. Two root tables with handle 0 alias in u32lookupht(), allowing cross-tcfproto knode add/lookup/delete. Add the same exhaustion check that the divisor path already has.
Return an error so u32change() fails with ENOSPC/ENOMEM when the node ID space is exhausted, and so u32init() fails with -ENOMEM when the hash table ID space is exhausted. The extack message distinguishes pool exhaustion (-ENOSPC) from a transient allocation failure (-ENOMEM).
Conditions to recreate the bug: - CONFIGNETSCHED=y, CONFIGCLSU32=y (or =m with module loaded) - Create a clsact qdisc on a device, then add 4095 u32 filters with auto-generated handles to fill the node ID space for the root hash table (single bucket). The 4096th auto-handle filter add triggers the duplicate handle (fh 800::fff reused). Reachable at Level 2 (unshare -Urn, namespace-local CAPNETADMIN). - For gennewhtid: create 2047 u32 proto entries on the same block to fill the tpc handle pool, then create one more. The root table gets handle 0 and aliases with other handle-0 root tables.
In the Linux kernel, the following vulnerability has been resolved:
scsi: mpt3sas: Avoid out-of-bounds cpumaskofnode() call in baseassignreplyqueues()
devtonode() can return NUMANONODE (-1) on systems without NUMA topology information for the PCI device, such as single-socket boards that don't expose device-to-node affinity. Passing -1 directly into cpumaskofnode() indexes nodetocpumaskmap[-1], an out-of-bounds array read caught by UBSAN:
UBSAN: array-index-out-of-bounds in arch/x86/include/asm/topology.h:72:28 index -1 is out of range for type 'cpumask [1024]'
Fall back to cpuonlinemask when no NUMA node is available, rather than assuming devtonode() always returns a valid node index.
btrfs: fix transaction use-after-free in raid stripe insertion
bpf: backtracking shouldn't clear outer frame R1-R5 for callbacks
In the Linux kernel, the following vulnerability has been resolved:
tracing/probes: Fix use-after-free on field name/type of events with multiple probes
The fields of a probe-based dynamic event (kprobe, uprobe, eprobe and fprobe events) are created in traceprobedefineargfields() by handing the probearg name/type strings to tracedefinefield(), which only stores the pointers without copying. Those strings are owned by the traceprobe and are freed when that probe is removed.
An event can have several probes attached. The field list is defined only once, by the first probe that registers the event, but it is kept alive by any surviving sibling probe. Deleting just that first probe by symbol -
# primary A: fields are defined from A's args echo 'p:kprobes/ev vfsread a1=$arg1' > kprobeevents # append B: shares A's event call echo 'p:kprobes/ev vfswrite a1=$arg1' >> kprobeevents # delete only A (matched by symbol), B survives echo '-:kprobes/ev vfsread' >> kprobeevents
frees A's args (traceprobecleanup() -> traceprobefreeprobearg()), but traceprobeunlink() keeps the traceprobeevent because the probe list is not empty. The event call stays registered via B while its fields now reference freed memory. Any field lookup then reads it, e.g.
echo 'a1 == 1' > events/kprobes/ev/filter
BUG: KASAN: slab-use-after-free in strcmp+0xa7/0xb0 Call Trace: strcmp tracefindeventfield parsepred processpreds createfilter applyeventfilter eventfilterwrite
field->name references parg->name (kstrdup'd, freed with the probe) and, for array arguments, field->type references parg->fmt (kmalloc'd, freed with the probe) - the scalar type otherwise points at the static fmttype rodata, which is safe.
Have traceprobedefineargfields() duplicate the name and type strings and anchor the copies on the traceprobeevent, which embeds the event call and outlives every individual probe; traceprobeeventfree() releases them.
The reproducer above triggers reliably; the field lookup and the delete both run under eventmutex, so this is a dangling reference after removal rather than a race.
The issue was found by the autokbug dynamic kernel fuzzer at Tencent Yunding Lab.
bpf: reject BPFPSEUDOFUNC reference to the main program
In the Linux kernel, the following vulnerability has been resolved:
net: Remove conflicting altnames for dying netns in devchangenetnamespace().
syzbot reported the warning in cfg80211pernetexit(). [0]
The repro does the following:
1. create two device in root netns and non-root netns 2. assign the same altname for the two devices 3. remove the non-root netns
Since commit 7663d522099e ("net: check for altname conflicts when changing netdev's netns"), cfg80211switchnetns() and cfg802154switchnetns() fail if initnet has a device with the conflicting altname.
defaultdeviceexitnet() had the same issue and commit d09486a04f5d ("net: fix removing a namespace with conflicting altnames") fixed it.
cfg80211pernetexit() and cfg802154pernetexit() need the same fix.
Let's generalise the fix by removing conflicting altnames for dying netns in devchangenetnamespace().
[0]: cfg80211switchnetns(rdev, &initnet) WARNING: net/wireless/core.c:1871 at cfg80211pernetexit+0xd5/0x120 net/wireless/core.c:1871, CPU#1: kworker/u8:9/1160 Modules linked in: CPU: 1 UID: 0 PID: 1160 Comm: kworker/u8:9 Not tainted syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026 Workqueue: netns cleanupnet RIP: 0010:cfg80211pernetexit+0xd5/0x120 net/wireless/core.c:1871 Code: e8 03 42 80 3c 20 00 74 08 4c 89 f7 e8 b4 ef 0e f7 4d 8b 36 49 81 fe 20 10 4a 90 74 12 e8 03 3d 9f f6 eb 85 e8 fc 3c 9f f6 90 <0f> 0b 90 eb cc e8 f1 3c 9f f6 eb 05 e8 ea 3c 9f f6 5b 41 5c 41 5e RSP: 0018:ffffc900057a78f0 EFLAGS: 00010293 RAX: ffffffff8b287154 RBX: ffff88807ba72780 RCX: ffff8880213e8000 RDX: 0000000000000000 RSI: 00000000ffffffef RDI: 0000000000000000 RBP: 00000000ffffffef R08: ffffffff9024cc67 R09: 0000000000000000 R10: fffff52000af4eb0 R11: fffffbfff204998d R12: dffffc0000000000 R13: ffffffff904a1080 R14: ffff888144ed0008 R15: ffff888144ed0e20 FS: 0000000000000000(0000) GS:ffff888124de6000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00005642de0a8a70 CR3: 000000007a40c000 CR4: 00000000003526f0 Call Trace: <TASK> opsexitlist net/core/netnamespace.c:200 [inline] opsundolist+0x43d/0x8d0 net/core/netnamespace.c:253 cleanupnet+0x572/0x810 net/core/netnamespace.c:706 processonework kernel/workqueue.c:3387 [inline] processscheduledworks+0xc3d/0x1630 kernel/workqueue.c:3470 workerthread+0xa47/0xfb0 kernel/workqueue.c:3551 kthread+0x38b/0x480 kernel/kthread.c:436 retfromfork+0x514/0xb70 arch/x86/kernel/process.c:158 retfromforkasm+0x1a/0x30 arch/x86/entry/entry64.S:245 </TASK>
In the Linux kernel, the following vulnerability has been resolved:
net/rds: acquire RDSINXMIT in rdstcpresetcallbacks()
rdstcpresetcallbacks() quiesces the transmit path by setting the path state to RDSCONNRESETTING and then waiting for RDSINXMIT to be sampled clear before swapping the underlying socket and calling rdssendpathreset().
Sampling the bit clear is not the same as owning it: rdssendxmit() can re-acquire RDSINXMIT right after the waitevent() returns. Its state recheck after taking the lock is a store-buffering pattern (the resetter writes the state and reads the bit, the sender writes the bit and reads the state) and acquireinxmit() is only an acquire operation, so on weakly ordered architectures both sides can miss each other's write and the transmit path then runs concurrently with rdssendpathreset() rewriting cpxmit state - which is exactly what the comment above rdssendpathreset() tells its callers to prevent.
Take the lock instead, hold it across the socket swap and rdssendpathreset(), and release it with a wake-up at the end. The lock-ordering constraint documented above the wait still holds: the lock is acquired before locksock(), so a sender inside tcpsendmsg() can never be waited on while we hold the socket lock.
Two details of the old code go away with the same change:
- tsock is now read only after the lock is acquired. The old code cached it before waiting; the teardown in rdsconnshutdown() releases that socket and clears tsock, so a pointer cached before the wait can be stale by the time the accept path resumes. Reading it under RDSINXMIT is what makes the exclusion complete once the teardown owns the same lock, which the next patch arranges; until then the teardown still only samples the bit, and the two paths remain as exposed to each other as they are today.
- The old !osock early path called rdssendpathreset() with no serialization at all. It now runs under the lock like the normal path. The conditional RDSCONNRESETTING transition of the previous patch happens before the socket check either way: a path found without a socket is either still connecting (its reconnect worker blocked on tconnpathlock) and legitimately goes RESETTING -> UP on the new socket, or it has been torn down meanwhile and is dropped.
The in-function comment describing the old wait-based quiesce is rewritten to describe the lock-based one, and the stale block comment above the function (which still described a return value and an incomplete list of tsock writers) is refreshed to name all four writers - the connect, accept, teardown and swap paths - and what serializes each of them.
In the Linux kernel, the following vulnerability has been resolved:
net/rds: acquire the fastpath locks in rdsconnshutdown()
rdsconnshutdown() quiesces the transmit and receive-refill paths by waiting for RDSINXMIT and RDSRECVREFILL to be sampled clear, and then runs the transport shutdown and rdsconnpathreset(). Sampling the bits clear is not the same as owning them: the moment after the waitevent() returns, rdssendxmit() can re-acquire RDSINXMIT (or rdsibrecvrefill() can re-acquire RDSRECVREFILL) and run concurrently with the teardown.
The sender does recheck the connection state after taking the lock, but that recheck is a classic store-buffering pattern: teardown writes the state and reads the bit while the sender writes the bit and reads the state. acquireinxmit() is only an acquire operation, so on weakly ordered architectures both sides can miss each other's write, and the transmit path then runs while the transport zeroes its rings (e.g. rdsibringinit()) and rdssendpathreset() rewrites the transmit state under it.
Oracle UEK fixed the same class of crashes - a 14-year tail of BUGON()s in rdsibsubsignaled(), unexpected op-codes and NULL dereferences in rdsibsendcqehandler() during failover testing - by making the teardown path acquire the fastpath bit locks instead of testing them ("rds: Make sure transmit path and connection tear-down does not run concurrently"). Ownership of a single word is decided by RMW atomicity, so no cross-variable ordering is needed.
Do the same here: take both locks before calling the transport shutdown, hold them across rdsconnpathreset(), and release them explicitly with a wake-up afterwards. Both are released with clearbitunlock(), so that the ring re-initialization done by the transport shutdown and the transmit state rewritten by rdssendpathreset() are ordered before either bit is seen clear by the next acquireinxmit() or acquirerefill().
The fastpath users of these bits - rdssendxmit() and rdsibrecvrefill() - are trylock style and back off while teardown owns the locks, so no new lock dependency is introduced for them. rdstcpresetcallbacks() is different: since the previous patch it acquires RDSINXMIT as well, and it blocks doing so, so its wait now spans the teardown instead of at most one send batch. That waiter runs from rdstcpacceptone() on the single-threaded krdsd workqueue and holds rdstcpacceptlock and tconnpathlock while it waits, so a duelling SYN accepted while its path is being torn down parks accept processing for the duration of the teardown - for TCP bounded by the (up to 5 s) drain loop in rdstcpconnpathshutdown(). An IB path's drain in rdsibconnpathshutdown() has no round cap, but no blocking waiter either: rdstcpresetcallbacks() is the only blocking acquirer of these bits and waits only on its own TCP path, and the fastpaths are trylock-and-back-off on both transports, so a long IB drain lengthens only that path's own quiesce. The window is narrow: the accept-side state check has to pass before the teardown moves the path to RDSCONNDISCONNECTING.
Because krdsd is a single global workqueue, everything else queued there - accept processing for other connections and network namespaces, and the flushworkqueue(rdswq) in rdstcplistenstop() during namespace teardown - waits behind the parked accept worker for that time. It cannot deadlock, although the waits do point at each other: the teardown blocks until the bit's holder releases it, and the holder may be that krdsd accept worker. The holder finishes without needing anything the teardown owns: the sync cancels rdstcpresetcallbacks() issues target cpsendw and cprecvw on the path's ordered cpwq, whose only execution slot is occupied by the blocked cpdownw itself, so they are pending at most and cancel without flushing - a reliance on cpwq being ordered that is now noted next to those cancels (on ---truncated---
In the Linux kernel, the following vulnerability has been resolved:
net/rds: don't let rdsconnshutdown() consume a concurrent drop
rdsconnshutdown() finishes by moving the path from RDSCONNDISCONNECTING to RDSCONNDOWN, and also accepts RDSCONNERROR as the starting state of that final transition, so that a FIN processed in softirq context during the teardown does not derail the shutdown into a noisy error path.
But consuming that RDSCONNERROR also consumes the shutdown pass that came with it: rdsconnpathdrop() sets RDSCONNERROR and then queues cpdownw, and a pass that starts on a path already in RDSCONNDOWN is a no-op. For the FIN case that is harmless - the socket the FIN arrived on is the very socket the teardown just released. It is not harmless for a dropper that attached something to the path first.
rdstcpacceptone() is such a dropper. Its path claim in rdstcpacceptonepath() transitions RDSCONNDOWN -> RDSCONNCONNECTING, and a concurrent drop - a FIN on a previous socket in softirq context, an administrative reset - can put the path into RDSCONNERROR between that claim and the state check that follows, which accepts RDSCONNERROR. The accept then installs the freshly accepted socket with rdstcpsetcallbacks() while the queued teardown - which sampled tc->tsock before this socket existed - is still running. rdsconnectpathcomplete() fails its transition to RDSCONNUP and drops the path again, queueing the pass that should reap the socket it just installed. If the in-flight shutdown's final transition consumes that drop's RDSCONNERROR, the queued pass finds the path in RDSCONNDOWN and does nothing. The installed socket is never torn down: it sits established with its callbacks armed and its rdstcpconnection on rdstcptclist, the peer sees a connection that nothing ever reads, and the path is wedged in RDSCONNDOWN until some later event drops it again. Reproduced with widened race windows as an ever-growing receive queue on a socket owned by a path stuck in RDSCONNDOWN, with the peer's send path wedged behind it.
Make the final transition only DISCONNECTING -> DOWN. If it fails because the path is in RDSCONNERROR, a drop raced the teardown: cancel the reconnect timer and clear RDSRECONNECTPENDING - the one piece of the skipped tail that must not be left behind - and return, letting the pass the drop queued finish the job: it tears down whatever attached to the path in the meantime, completes the transition to RDSCONNDOWN, and re-arms the reconnect from its own tail.
The timer quiesce in that branch matters because the racing drop does not always queue that pass: rdsconnpathdrop() returns without queueing when a destroy is pending - exactly the situation during a netns teardown or module unload, when a FIN on the dying socket is processed while rdsconnpathdestroy() flushes cpdownw. If the flushed pass is the one that takes this return, no later pass exists, and rdsconnpathdestroy() would find cpconnw still armed (WARNON) and then free a path whose reconnect timer can still fire. With the cancel in the branch, every exit of a shutdown pass leaves the timer quiesced no matter which pass completes the transition.
The FIN case keeps making progress, one pass later and still without noisy logging. Any other state keeps today's rdsconnpatherror() handling; no current cpstate writer can leave a DISCONNECTING path in anything but RDSCONNERROR (every other writer is a cmpxchg from a non-DISCONNECTING state), so that branch is defensive.
On kernels without the preceding patches the same hazard exists with the sample-based quiesce; the fix applies there equally.
In the Linux kernel, the following vulnerability has been resolved:
nvme: remove stale namespaces by NSID range during scan
nvmescannslist() drops the stale namespaces in each gap in the reported NSID list one NSID at a time. Every iteration calls nvmefindgetns() to look the namespace up and removes it if it is present. The loop runs once per NSID in the gap rather than once per namespace actually present.
NSIDs are 32-bit, so a target with a sparse NSID space can make a single gap spin the loop billions of times with nothing to remove.
watchdog: BUG: soft lockup - CPU#4 stuck for 26s! Workqueue: nvme-wq nvmescanwork [nvmecore] RIP: 0010:srcureadunlock+0xb/0x20 Call Trace: nvmefindgetns+0x7d/0xb0 [nvmecore] nvmescannslist+0xe8/0x280 [nvmecore] nvmescanwork+0x18a/0x280 [nvmecore] processonework+0x197/0x380 workerthread+0x2fe/0x410 kthread+0xe0/0x100
Rename nvmeremoveinvalidnamespaces() to nvmeremovensidrange() and give it an open (start, end) NSID range. ctrl->namespaces is sorted by NSID, so the whole gap is dropped in a single walk that stops once end is reached. This bounds the work by the namespaces that are present instead of by the size of the gap.
In the Linux kernel, the following vulnerability has been resolved:
net: bcmasp: clear txcb->last before writing each descriptor
bcmaspxmit() only wrote txcb->last = true for the final fragment of an SKB; non-final fragments left the field untouched. If a descriptor slot was reused while it still held a stale true from a previous SKB (possible when txspbringfull() underreported fullness), bcmasptxreclaim() would see last == true mid-SKB and call devconsumeskbany() prematurely, freeing the skbuff while its remaining fragments were still in flight.
Unconditionally clear txcb->last before the conditional set so every descriptor slot starts from a known false state regardless of what a prior transmission left behind.
In the Linux kernel, the following vulnerability has been resolved:
net: bcmasp: fix txspbringfull() checking same slot cnt times
The loop initialised nextindex from intf->txspbindex on every iteration, so incrring() always produced the same result and only one slot was ever tested. Move the initialisation before the loop so each iteration advances nextindex and the function correctly checks that cnt consecutive descriptor slots are available before allowing a new transmission.
In the Linux kernel, the following vulnerability has been resolved:
wifi: mac80211: fix filsdiscovery double free on alloc failure
ieee80211setfilsdiscovery() calls kfreercu() on the old template before allocating the replacement. If the kzalloc() then fails, it returns -ENOMEM while link->u.ap.filsdiscovery still points at the object already queued for freeing. A later update or AP teardown (ieee80211stopap()) re-queues that same rcuhead; the second free is caught by KASAN when the RCU sheaf is processed in softirq:
BUG: KASAN: double-free in rcufreesheaf (mm/slub.c:5850) Free of addr ffff88800c065280 by task swapper/0/0 ... rcufreesheafprepare (mm/slub.c:2634 mm/slub.c:2940) rcufreesheaf (mm/slub.c:5850) rcucore (kernel/rcu/tree.c:2617 kernel/rcu/tree.c:2869) handlesoftirqs (kernel/softirq.c:622) The buggy address belongs to the cache kmalloc-96 of size 96
Queue the old object for kfreercu() only after the new one is published, matching ieee80211setproberesp() and ieee80211sets1gshortbeacon().
In the Linux kernel, the following vulnerability has been resolved:
wifi: mac80211: fix unsolbcastproberesp double free on alloc failure
ieee80211setunsolbcastproberesp() calls kfreercu() on the old template before allocating the replacement. If the kzalloc() then fails, it returns -ENOMEM while link->u.ap.unsolbcastproberesp still points at the object already queued for freeing. A later update or AP teardown re-queues that same rcuhead; the second free is caught by KASAN when the RCU sheaf is processed in softirq:
BUG: KASAN: double-free in rcufreesheaf (mm/slub.c:5850) Free of addr ffff88800d06f300 by task exploit/145 ... rcufreesheafprepare (mm/slub.c:2634 mm/slub.c:2940) rcufreesheaf (mm/slub.c:5850) rcucore (kernel/rcu/tree.c:2617 kernel/rcu/tree.c:2869) handlesoftirqs (kernel/softirq.c:622) The buggy address belongs to the cache kmalloc-128 of size 128
Queue the old object for kfreercu() only after the new one is published, matching ieee80211setproberesp() and ieee80211sets1gshortbeacon().
btrfs: reject free space cache with more entries than pages
In the Linux kernel, the following vulnerability has been resolved:
KVM: x86: Check for invalid/obsolete root after making MMU pages available
Check for a "stale" page fault, i.e. for an invalid and/or obsolete root, after making MMU pages available for the shadow MMU. If reclaiming shadow pages zaps an in-use root, i.e. marks it invalid, then KVM will attempt to map memory into an invalid root. On its own, populating an invalid root is "fine", but because child shadow pages inherit their parent's role, any children created during the map/fetch will be created as invalid pages, thus violating KVM's invariant that invalid pages are never on the list of active MMU pages.
Note, the underlying flaw has existed since KVM first started tracking invalid roots in 2008 (commit 2e53d63acba7, "KVM: MMU: ignore zapped root pagetables"), but the true badness only came along in 2020 (Linux 5.9) with the invariant that invalid shadow pages can't be on the list of active pages.
Note #2, inheriting role.invalid when creating child shadow pages is also far from ideal; that flaw will be addressed separately.
In the Linux kernel, the following vulnerability has been resolved:
KVM: nVMX: Hide shadow VMCS right after VMCLEAR
freenested() frees the shadow VMCS while vmcs01 still points to it. But because it is asynchronous with respect to loadedvmcsclear(), the vCPU might migrate before the pointer is cleared and loadedvmcsclear() may then execute VMCLEAR.
The VMCS needs to stay attached until its explicit VMCLEAR completes, but then it can be hidden and the page safely freed.
In multiple locations, there is a possible use-after-free due to a race condition. This could lead to local escalation of privilege with no additional execution privileges needed. User interaction is not needed for exploitation.
Bluetooth: L2CAP: Fix use-after-free in l2capsocknewconnectioncb()
In the Linux kernel, the following vulnerability has been resolved:
perf/core: Detach event groups during removeonexec
perfeventremoveonexec() removes events by calling perfeventexitevent(). For top-level events, this removes the event from the context with DETACHEXIT only.
This can leave inconsistent group state when a removed event is a group leader and the group contains siblings without removeonexec. If the group was active, the surviving siblings can remain active and attached to the removed leader's sibling list, but are no longer represented by a valid group leader on the PMU context active lists.
A later close of the removed leader uses DETACHGROUP and can promote the still-active siblings from this stale group state. The next schedule-in can then add an already-linked activelist entry again, corrupting the PMU context active list.
With DEBUGLIST enabled, this is caught as a listadd double-add in mergeschedin().
Fix this by detaching group relationships when removeonexec removes an event. This preserves the existing task-exit and revoke behavior, while ensuring surviving siblings are ungrouped before the removed event leaves the context.
In the Linux kernel, the following vulnerability has been resolved:
netfilter: bridge: fix stale prevhdr pointer in brip6fragment()
brip6fragment() gets prevhdr, a pointer into the skb head, from ip6find1stfragopt(), then calls skbchecksumhelp(). For a cloned skb skbchecksumhelp() reallocates the head via pskbexpandhead(), leaving prevhdr dangling. It is later dereferenced in ip6fragnext(), causing a use-after-free write.
Save prevhdr's offset before skbchecksumhelp() and recompute it after, like commit ef0efcd3bd3f ("ipv6: Fix dangling pointer when ipv6 fragment").
BUG: KASAN: slab-use-after-free in ip6fragnext (net/ipv6/ip6output.c:857) Write of size 1 at addr ffff888013ff5016 by task exploit/141 Call Trace: ... kasanreport (mm/kasan/report.c:595) ip6fragnext (net/ipv6/ip6output.c:857) brip6fragment (net/ipv6/netfilter.c:212) nfctbridgepost (net/bridge/netfilter/nfconntrackbridge.c:407) nfhookslow (net/netfilter/core.c:619) brforwardfinish (net/bridge/brforward.c:66) brforward (net/bridge/brforward.c:115) maybedeliver (net/bridge/brforward.c:191) brflood (net/bridge/brforward.c:245) brhandleframefinish (net/bridge/brinput.c:229) brhandleframe (net/bridge/brinput.c:442) ... packetsendmsg (net/packet/afpacket.c:3114) ... dosyscall64 (arch/x86/entry/syscall64.c:94) entrySYSCALL64afterhwframe (arch/x86/entry/entry64.S:121) Kernel panic - not syncing: Fatal exception in interrupt