In the Linux kernel, the following vulnerability has been resolved:
staging: rtl8723bs: fix mismatched free of HalData in rtwsdioif1init()
padapter->HalData is allocated via vzalloc(), but incorrectly freed using kfree() in the rtwsdioif1init() error path. Using kfree() to release this vmalloc-backed buffer can lead to memory corruption.
Use rtwhaldatadeinit() to pair the free correctly and free HalData with vfree().
The bug was first flagged by an experimental static analysis tool we are developing for kernel memory-management bugs. Manual inspection confirms that the issue is still present in current mainline.
An x8664 allyesconfig build showed no new warnings. As we do not have suitable RTL8723BS SDIO hardware to test with, no runtime testing was able to be performed.
In the Linux kernel, the following vulnerability has been resolved:
usb: typec: ucsi: unregister debugfs entries on teardown
ucsiregister() creates per-instance debugfs entries, but ucsiunregister() keeps them around until ucsidestroy().
Drivers like ucsiglink that unregister/register the same UCSI instance across remoteproc restart then try to create an already existing debugfs directory and log:
debugfs: 'pmicglink.ucsi.0' already exists in 'ucsi'
Unregister debugfs entries as part of ucsiunregister(), and clear ucsi->debugfs after freeing it so repeated unregister paths remain safe.
In the Linux kernel, the following vulnerability has been resolved:
net: hsr: free learned nodes on device setup failure
hsrdevfinalize() can fail after a lower-device RX handler has already been registered (slave A is added before the failable slave B and interlink adds). RX handlers run in softirq regardless of the master's state, so frames received in that window can learn dynamic nodes into nodedb, and the error unwind never releases them.
Free both owned dynamic databases in the unwind, mirroring hsrdellink(). proxynodedb is provably empty on every current error exit (only interlink RX feeds it, and the interlink add is the last failable step) and is freed for symmetry. The order is safe: hsrdelport() unregisters each RX handler with synchronizenet() before hsrdelnodes() runs, which removes remaining entries with listdelrcu() and defers their release with callrcu() for readers already under RCU.
EDAC/devicesysfs: Use kstrtouint() for pollmsec to prevent truncation
In the Linux kernel, the following vulnerability has been resolved:
printk: Don't WARN on kthreadrun failure.
Since kthreadcreateonnode() returns -EINTR upon SIGKILL, we should not use WARNON() in order to catch kthreadrun() failure.
drm/cirrus-qemu: Validate BAR0 size during probe
In the Linux kernel, the following vulnerability has been resolved:
scsi: mpi3mr: Fix target device refcount leak in mpi3mrsasportadd()
mpi3mrgettgtdevbyaddr() increments the target device kref when it returns a device. If a subsequent error triggers a goto outfail after the tgtdev reference is acquired, the reference is never released because the outfail path does not call mpi3mrtgtdevput(). This prevents the target device structure from ever being freed.
Add a tgtdev put in the outfail path, guarded by a NULL check since tgtdev is only acquired for SASENDDEVICE types and the same cleanup path is shared by earlier error cases where tgtdev is still NULL.
In the Linux kernel, the following vulnerability has been resolved:
scsi: mpi3mr: Fix NULL pointer dereference in mpi3mrsasportadd()
sasportallocnum() can return NULL on memory allocation failure. The return value is passed directly to sasportadd() without a NULL check, which causes a NULL pointer dereference.
Additionally, if sasportadd() fails, the allocated port is not freed before jumping to outfail, leaking the sasport structure. Call sasportfree() to properly release it.
In the Linux kernel, the following vulnerability has been resolved:
smb/client: validate new EOF for insert range
smb3insertrange() does not check if the new file size (isize + len) is valid. This allows FALLOCFLINSERTRANGE to bypass RLIMITFSIZE, exceed smaxbytes, or produce a size outside the lofft range.
Use checkaddoverflow() to calculate the new EOF. Validate it with inodenewsizeok() before modifying the file.
Reproducer, using a file on a CIFS mount:
bash -c ' FILE=/mnt/cifs/repro
trap "" SIGXFSZ ulimit -f 3072 # RLIMITFSIZE = 3 MiB
# A regular write is stopped at 3 MiB. dd if=/dev/zero of="$FILE" bs=1M count=4 status=none stat -c "size after write: %s" "$FILE"
# Insert 2 MiB into a 2 MiB file. truncate -s 2M "$FILE" fallocate -i -o 0 -l 2M "$FILE" stat -c "size after insert: %s" "$FILE" '
Before this change, the regular write stops at the 3 MiB limit, but insert range grows the file to 4 MiB:
dd: error writing '/mnt/cifs/repro': File too large size after write: 3145728 size after insert: 4194304
After this change, insert range also fails at the limit and leaves the 2 MiB file unchanged:
dd: error writing '/mnt/cifs/repro': File too large size after write: 3145728 fallocate: fallocate failed: File too large size after insert: 2097152
In the Linux kernel, the following vulnerability has been resolved:
smb/client: validate new EOF for zero range
When FALLOCFLZERORANGE is used without FALLOCFLKEEPSIZE, smb3zerorange() may extend EOF without checking RLIMITFSIZE, allowing the file to grow beyond the caller's file-size limit.
Fix this by calling inodenewsizeok() before sending the zero-range request when the operation would extend EOF.
Reproducer, using a file on a CIFS mount:
bash -c ' FILE=/mnt/cifs/repro
trap "" SIGXFSZ ulimit -f 3072
truncate -s 2M "$FILE" fallocate --zero-range -o 0 -l 4M "$FILE" echo "fallocate rc=$?" stat -c "file size=%s" "$FILE" '
Before this change, the operation succeeds despite the 3 MiB limit:
fallocate rc=0 file size=4194304
After this change, fallocate fails and leaves the file at 2 MiB.
In the Linux kernel, the following vulnerability has been resolved:
watchdog: msc313e: Fix NULL pointer dereference in PM callbacks
msc313ewdtprobe() doesn't set the driver data for the platform device. As a result, devgetdrvdata() in msc313ewdtsuspend() and msc313ewdtresume() will return NULL, leading to a NULL pointer dereference afterward.
Set the platform device driver data in msc313ewdtprobe().
In the Linux kernel, the following vulnerability has been resolved:
ksmbd: propagate DACL parsing errors
parsedacl() silently accepts truncated ACEs and allocation failures, allowing setinfosec() to continue with an incomplete ACL conversion.
Return parsing and allocation errors to parsesecdesc() so malformed security descriptors are rejected before inode attributes or ACL xattrs are updated.
In the Linux kernel, the following vulnerability has been resolved:
ksmbd: rate limit unmapped SID errors
A client can include many structurally valid but unmapped SIDs in a DACL. Logging every mapping failure lets one request generate hundreds of kernel error messages.
Rate limit the message to prevent an authenticated client from flooding the kernel log.
In the Linux kernel, the following vulnerability has been resolved:
Bluetooth: btintel: bound firmware ID by TLV length
The firmware ID is treated as a NUL-terminated string even though the TLV length is its only boundary. If the value does not contain a NUL terminator, snprintf() can read beyond the received response.
Limit the conversion to the advertised TLV value length.
Bluetooth: btintel: validate version TLV value lengths
Bluetooth: hcicore: Fix race condition during device registration
In the Linux kernel, the following vulnerability has been resolved:
net: ethernet: oatc6: Improve the error recovery
When oversubscribed traffic causes lot of buffer overflow errors, probably due to loss of data chunks, driver fails to find a data chunk with endvalid bit set, before it runs out of sk buffer space. As a result, assert is seen during skbput.
Now, check is made if skb buffer has enough tailroom for the incoming data before accepting. If there is no room, current frame is abandoned and it will start looking for a data chunk with startvalid bit, that is a new frame.
SK buffer allocation error is considered as recoverable error.
rxbufoverflow flag is too specific and no longer the only condition this flag is used for. Therefore it is renamed as waituntilstartvalid. This is more appropriate as this flag is used to look for the next data chunk with SV bit set, after failures like buffer overflow, buffer allocation failure, skb pointer validity besides buffer overflow error.
Not writing to status0 if it reads 0.
igmp: convert struct ipsflist to RCU
In the Linux kernel, the following vulnerability has been resolved:
ipv6: mcast: use rcuassignpointer() for rcu list updates
Several places in net/ipv6/mcast.c update RCU-protected lists (np->ipv6mclist, idev->mclist, idev->mctomb) using direct pointer assignments instead of rcuassignpointer():
1. In ipv6devmcdec(), unlinking a group from idev->mclist did: map = ma->next; without rcuassignpointer() while concurrent readers traverse idev->mclist locklessly under rcureadlock(). 2. In ipv6sockmcdrop() and ipv6sockmcclose(), unlinking a group from np->ipv6mclist directly assigned lnk = mclst->next and np->ipv6mclist = mclst->next without rcuassignpointer(), racing with lockless readers in inet6mccheck(). 3. In ipv6sockmcjoin(), mclst->next was initialized to np->ipv6mclist via raw assignment before publishing mclst. 4. In mlddeldelrec() and ipv6devmcinc(), rcu source pointers passed into rcuassignpointer() lacked explicit dereference helpers.
Fix these by consistently using rcuassignpointer() along with mcdereference() / sockdereference().
In the Linux kernel, the following vulnerability has been resolved:
tipc: fix NULL deref in tipcnamednodeup() on empty publication list
User-space applications can bind a large number of service addresses to one or more sockets. Each binding of a local-scope service address inserts one entry (publication) into the TIPC name table. If the number of these publications exceeds TIPCMAXPUBL (65535), protocol service types (such as node state and link state) are no longer inserted into the name table. This causes two issues:
1. User-space applications subscribing to node or link up/down events stop receiving notifications.
2. A NULL pointer dereference can occur:
BUG: kernel NULL pointer dereference, address: 00000000000000d0 ... CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Not tainted 7.2.0-rc4-default+ #5 PREEMPT(full) ... RIP: 0010:tipcnamednodeup (./include/linux/skbuff.h:2251 net/tipc/namedistr.c:195 net/tipc/namedistr.c:221) ... Call Trace: <IRQ> tipcnodewriteunlock (net/tipc/node.c:428) tipcrcv (net/tipc/node.c:934 net/tipc/node.c:2189) tipcudprecv (net/tipc/udpmedia.c:389)
Thread 1 (tipcnetfinalize) | Thread 2 (nameddistribute) -----------------------------|----------------------------- | ... | listforeachentry(publ, pls, bindingnode) { | ... | skbqueuetail(list, skb); | ... | } | ... | hdr = bufmsg(skbpeektail(list)); ... | tipcnametblpublish(); |
If 'tipcnametblpublish()' (Thread 1) fails because the number of local publications reaches TIPCMAXPUBL, list (Thread 2) will be empty. As a result, NULL is passed to 'bufmsg()', leading to a NULL pointer dereference.
Fix these issues by allowing protocol service types (node state, link state, and topology server) to be inserted into the name table unconditionally. This ensures that users subscribing to these types always receive notifications. In addition, the maximum number of local user publications is reduced to (TIPCMAXPUBL - 1). This ensures that the maximum bulk size calculated in tipclinksetqueuelimits() remains valid.
In the Linux kernel, the following vulnerability has been resolved:
tipc: Dont send random pad bytes in RESET/ACTIVATE messages
The interface name is passed in a fixed length (TIPCMAXIFNAME) buffer. Replace the strcpy(data, l->ifname) with memcpy() so that the pad bytes are actually written (l->ifname[] is zero padded) rather than sending random bytes from the skb to the remote system.
Replace two other strcpy() with strscpy().
afpacket: Don't cast tpackethdr.tplen to int in tpacketparseheader().
In the Linux kernel, the following vulnerability has been resolved:
staging: fbtft: make dirtylock IRQ-safe
fbtftmkdirty() can be reached from the fbcon rendering path while processing printk() in hardirq context. Meanwhile, dirtylock is also taken by fbtftdeferredio() in workqueue context with local interrupts enabled.
Lockdep reports a possible IRQ lock inversion involving dirtylock and consoleowner. A hardirq can interrupt a CPU holding dirtylock and enter the console rendering path, which can attempt to acquire dirtylock again.
The following lockdep report was observed on an RK3566 system with CONFIGPROVELOCKING enabled:
WARNING: possible irq lock inversion dependency detected swapper/2/0 just changed the state of lock: (consoleowner){-...}-{0:0} but this lock took another, HARDIRQ-unsafe lock in the past: (&par->dirtylock){+.+.}-{2:2}
CPU0 CPU1 ---- ---- lock(&par->dirtylock); localirqdisable(); lock(consoleowner); lock(&par->dirtylock); <Interrupt> lock(consoleowner);
DEADLOCK
Use spinlockirqsave() for fbtftmkdirty() and spinlockirq() for fbtftdeferredio(). They only access the dirty line range, so the IRQ-off regions remain short.
ASoC: amd: yc: fix memory leak in acp6xpdmdmaclose()
btrfs: detach failed sprout device from transaction update list
btrfs: restore active device pointers after failed sprout
bonding: alb: fix uninitialized transport header access in albdeterminend()
ALSA: ump: do not touch legacyrmidi before it exists
btrfs: zoned: finish active block group cleanup if callzonefinish() fails
btrfs: do not force reloc root creation during qgroupaccountsnapshot()