In the Linux kernel, the following vulnerability has been resolved:
pktgen: Avoid out-of-bounds access in getimixentries
Passing a sufficient amount of imix entries leads to invalid access to the pktdev->imixentries array because of the incorrect boundary check.
UBSAN: array-index-out-of-bounds in net/core/pktgen.c:874:24 index 20 is out of range for type 'imixpkt [20]' CPU: 2 PID: 1210 Comm: bash Not tainted 6.10.0-rc1 #121 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996) Call Trace: <TASK> dumpstacklvl lib/dumpstack.c:117 ubsanhandleoutofbounds lib/ubsan.c:429 getimixentries net/core/pktgen.c:874 pktgenifwrite net/core/pktgen.c:1063 pdewrite fs/proc/inode.c:334 procregwrite fs/proc/inode.c:346 vfswrite fs/readwrite.c:593 ksyswrite fs/readwrite.c:644 dosyscall64 arch/x86/entry/common.c:83 entrySYSCALL64afterhwframe arch/x86/entry/entry64.S:130
Found by Linux Verification Center (linuxtesting.org) with SVACE.
[ fp: allow to fill the array completely; minor changelog cleanup ]
In the Linux kernel, the following vulnerability has been resolved:
ksmbd: fix the warning from kernelwriteiter
[ 2110.972290] ------------[ cut here ]------------ [ 2110.972301] WARNING: CPU: 3 PID: 735 at fs/readwrite.c:599 kernelwriteiter+0x21b/0x280
This patch doesn't allow writing to directory.
In the Linux kernel, the following vulnerability has been resolved:
ksmbd: fix global oob in ksmbdnlpolicy
Similar to a reported issue (check the commit b33fb5b801c6 ("net: qualcomm: rmnet: fix global oob in rmnetpolicy"), my local fuzzer finds another global out-of-bounds read for policy ksmbdnlpolicy. See bug trace below:
================================================================== BUG: KASAN: global-out-of-bounds in validatenla lib/nlattr.c:386 [inline] BUG: KASAN: global-out-of-bounds in nlavalidateparse+0x24af/0x2750 lib/nlattr.c:600 Read of size 1 at addr ffffffff8f24b100 by task syz-executor.1/62810
CPU: 0 PID: 62810 Comm: syz-executor.1 Tainted: G N 6.1.0 #3 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-1ubuntu1.1 04/01/2014 Call Trace: <TASK> dumpstack lib/dumpstack.c:88 [inline] dumpstacklvl+0x8b/0xb3 lib/dumpstack.c:106 printaddressdescription mm/kasan/report.c:284 [inline] printreport+0x172/0x475 mm/kasan/report.c:395 kasanreport+0xbb/0x1c0 mm/kasan/report.c:495 validatenla lib/nlattr.c:386 [inline] nlavalidateparse+0x24af/0x2750 lib/nlattr.c:600 nlaparse+0x3e/0x50 lib/nlattr.c:697 nlmsgparse include/net/netlink.h:748 [inline] genlfamilyrcvmsgattrsparse.constprop.0+0x1b0/0x290 net/netlink/genetlink.c:565 genlfamilyrcvmsgdoit+0xda/0x330 net/netlink/genetlink.c:734 genlfamilyrcvmsg net/netlink/genetlink.c:833 [inline] genlrcvmsg+0x441/0x780 net/netlink/genetlink.c:850 netlinkrcvskb+0x14f/0x410 net/netlink/afnetlink.c:2540 genlrcv+0x24/0x40 net/netlink/genetlink.c:861 netlinkunicastkernel net/netlink/afnetlink.c:1319 [inline] netlinkunicast+0x54e/0x800 net/netlink/afnetlink.c:1345 netlinksendmsg+0x930/0xe50 net/netlink/afnetlink.c:1921 socksendmsgnosec net/socket.c:714 [inline] socksendmsg+0x154/0x190 net/socket.c:734 syssendmsg+0x6df/0x840 net/socket.c:2482 syssendmsg+0x110/0x1b0 net/socket.c:2536 syssendmsg+0xf3/0x1c0 net/socket.c:2565 dosyscallx64 arch/x86/entry/common.c:50 [inline] dosyscall64+0x3b/0x90 arch/x86/entry/common.c:80 entrySYSCALL64afterhwframe+0x63/0xcd RIP: 0033:0x7fdd66a8f359 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fdd65e00168 EFLAGS: 00000246 ORIGRAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007fdd66bbcf80 RCX: 00007fdd66a8f359 RDX: 0000000000000000 RSI: 0000000020000500 RDI: 0000000000000003 RBP: 00007fdd66ada493 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffc84b81aff R14: 00007fdd65e00300 R15: 0000000000022000 </TASK>
The buggy address belongs to the variable: ksmbdnlpolicy+0x100/0xa80
The buggy address belongs to the physical page: page:0000000034f47940 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1ccc4b flags: 0x200000000001000(reserved|node=0|zone=2) raw: 0200000000001000 ffffea00073312c8 ffffea00073312c8 0000000000000000 raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected
Memory state around the buggy address: ffffffff8f24b000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffffff8f24b080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffffff8f24b100: f9 f9 f9 f9 00 00 f9 f9 f9 f9 f9 f9 00 00 07 f9 ^ ffffffff8f24b180: f9 f9 f9 f9 00 05 f9 f9 f9 f9 f9 f9 00 00 00 05 ffffffff8f24b200: f9 f9 f9 f9 00 00 03 f9 f9 f9 f9 f9 00 00 04 f9 ==================================================================
To fix it, add a placeholder named KSMBDEVENTMAX and let KSMBDEVENTMAX to be its original value - 1 according to what other netlink families do. Also change two sites that refer the KSMBDEVENTMAX to correct value.
A flaw was found in sctpmakestrresetreq in net/sctp/smmakechunk.c in SCTP network protocol in the Linux kernel. In this flaw, an attempt to use more buffer than was allocated triggers BUGON to cause a denial of service (DOS).
References: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a2d859e3fc97e79d907761550dbc03ff1b36479c
In the Linux kernel, the following vulnerability has been resolved:
gro: fix ownership transfer
If packets are GROed with fraglist they might be segmented later on and continue their journey in the stack. In skbsegmentlist those skbs can be reused as-is. This is an issue as their destructor was removed in skbgroreceivelist but not the reference to their socket, and then they can't be orphaned. Fix this by also removing the reference to the socket.
For example this could be observed,
kernel BUG at include/linux/skbuff.h:3131! (skborphan) RIP: 0010:ip6rcvcore+0x11bc/0x19a0 Call Trace: ipv6listrcv+0x250/0x3f0 netifreceiveskblistcore+0x49d/0x8f0 netifreceiveskblistinternal+0x634/0xd40 napicompletedone+0x1d2/0x7d0 grocellpoll+0x118/0x1f0
A similar construction is found in skbgroreceive, apply the same change there.
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.
In the Linux kernel, the following vulnerability has been resolved:
vduse: Fix NULL pointer dereference on sysfs access
The control device has no drvdata. So we will get a NULL pointer dereference when accessing control device's msgtimeout attribute via sysfs:
[ 132.841881][ T3644] BUG: kernel NULL pointer dereference, address: 00000000000000f8 [ 132.850619][ T3644] RIP: 0010:msgtimeoutshow (drivers/vdpa/vdpauser/vdusedev.c:1271) [ 132.869447][ T3644] devattrshow (drivers/base/core.c:2094) [ 132.870215][ T3644] sysfskfseqshow (fs/sysfs/file.c:59) [ 132.871164][ T3644] ? deviceremovebinfile (drivers/base/core.c:2088) [ 132.872082][ T3644] kernfsseqshow (fs/kernfs/file.c:164) [ 132.872838][ T3644] seqreaditer (fs/seqfile.c:230) [ 132.873578][ T3644] ? vmallocareanode (mm/vmalloc.c:3041) [ 132.874532][ T3644] kernfsfopreaditer (fs/kernfs/file.c:238) [ 132.875513][ T3644] kernelread (fs/readwrite.c:440 (discriminator 1)) [ 132.876319][ T3644] kernelread (fs/readwrite.c:459) [ 132.877129][ T3644] kernelreadfile (fs/kernelreadfile.c:94) [ 132.877978][ T3644] kernelreadfilefromfd (include/linux/file.h:45 fs/kernelreadfile.c:186) [ 132.879019][ T3644] dosysfinitmodule (kernel/module.c:4207) [ 132.879930][ T3644] ia32sysfinitmodule (kernel/module.c:4189) [ 132.880930][ T3644] doint80syscall32 (arch/x86/entry/common.c:112 arch/x86/entry/common.c:132) [ 132.881847][ T3644] entryINT80compat (arch/x86/entry/entry64compat.S:419)
To fix it, don't create the unneeded attribute for control device anymore.
In the Linux kernel, the following vulnerability has been resolved:
erofs/zmap.c: Fix incorrect offset calculation
Effective offset to add to length was being incorrectly calculated, which resulted in iomap->length being set to 0, triggering a WARNON in iomapiterdone().
Fix that, and describe it in comments.
This was reported as a crash by syzbot under an issue about a warning encountered in iomapiterdone(), but unrelated to erofs.
C reproducer: https://syzkaller.appspot.com/text?tag=ReproC&x=1037a6b2880000 Kernel config: https://syzkaller.appspot.com/text?tag=KernelConfig&x=e2021a61197ebe02 Dashboard link: https://syzkaller.appspot.com/bug?extid=a8e049cd3abd342936b6
In the Linux kernel, the following vulnerability has been resolved:
net: wwan: mhi: fix memory leak in mhimbimdellink
MHI driver registers network device without setting the needsfreenetdev flag, and does NOT call freenetdev() when unregisters network device, which causes a memory leak.
This patch sets needsfreenetdev to true when registers network device, which makes netdev subsystem call freenetdev() automatically after unregisternetdevice().
In the Linux kernel, the following vulnerability has been resolved:
afunix: fix struct pid leaks in OOB support
syzbot reported struct pid leak [1].
Issue is that queueoob() calls maybeaddcreds() which potentially holds a reference on a pid.
But skb->destructor is not set (either directly or by calling unixscmtoskb())
This means that subsequent kfreeskb() or consumeskb() would leak this reference.
In this fix, I chose to fully support scm even for the OOB message.
[1] BUG: memory leak unreferenced object 0xffff8881053e7f80 (size 128): comm "syz-executor242", pid 5066, jiffies 4294946079 (age 13.220s) hex dump (first 32 bytes): 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [<ffffffff812ae26a>] allocpid+0x6a/0x560 kernel/pid.c:180 [<ffffffff812718df>] copyprocess+0x169f/0x26c0 kernel/fork.c:2285 [<ffffffff81272b37>] kernelclone+0xf7/0x610 kernel/fork.c:2684 [<ffffffff812730cc>] dosysclone+0x7c/0xb0 kernel/fork.c:2825 [<ffffffff849ad699>] dosyscallx64 arch/x86/entry/common.c:50 [inline] [<ffffffff849ad699>] dosyscall64+0x39/0xb0 arch/x86/entry/common.c:80 [<ffffffff84a0008b>] entrySYSCALL64afterhwframe+0x63/0xcd
In the Linux kernel, the following vulnerability has been resolved:
openvswitch: fix memory leak at failed datapath creation
ovsdpcmdnew()->ovsdpchange()->ovsdpsetupcallportids() allocates array via kmalloc. If for some reason newvport() fails during ovsdpcmdnew() dp->upcallportids must be freed. Add missing kfree.
Kmemleak example: unreferenced object 0xffff88800c382500 (size 64): comm "dumpstate", pid 323, jiffies 4294955418 (age 104.347s) hex dump (first 32 bytes): 5e c2 79 e4 1f 7a 38 c7 09 21 38 0c 80 88 ff ff ^.y..z8..!8..... 03 00 00 00 0a 00 00 00 14 00 00 00 28 00 00 00 ............(... backtrace: [<0000000071bebc9f>] ovsdpsetupcallportids+0x38/0xa0 [<000000000187d8bd>] ovsdpchange+0x63/0xe0 [<000000002397e446>] ovsdpcmdnew+0x1f0/0x380 [<00000000aa06f36e>] genlfamilyrcvmsgdoit+0xea/0x150 [<000000008f583bc4>] genlrcvmsg+0xdc/0x1e0 [<00000000fa10e377>] netlinkrcvskb+0x50/0x100 [<000000004959cece>] genlrcv+0x24/0x40 [<000000004699ac7f>] netlinkunicast+0x23e/0x360 [<00000000c153573e>] netlinksendmsg+0x24e/0x4b0 [<000000006f4aa380>] socksendmsg+0x62/0x70 [<00000000d0068654>] syssendmsg+0x230/0x270 [<0000000012dacf7d>] syssendmsg+0x88/0xd0 [<0000000011776020>] syssendmsg+0x59/0xa0 [<000000002e8f2dc1>] dosyscall64+0x3b/0x90 [<000000003243e7cb>] entrySYSCALL64afterhwframe+0x63/0xcd
In the Linux kernel, the following vulnerability has been resolved:
xfrm: policy: fix metadata dst->dev xmit null pointer dereference
When we try to transmit an skb with metadatadst attached (i.e. dst->dev == NULL) through xfrm interface we can hit a null pointer dereference[1] in xfrmixmit2() -> xfrmlookupwithifid() due to the check for a loopback skb device when there's no policy which dereferences dst->dev unconditionally. Not having dst->dev can be interepreted as it not being a loopback device, so just add a check for a null dstorig->dev.
With this fix xfrm interface's Tx error counters go up as usual.
[1] net-next calltrace captured via netconsole: BUG: kernel NULL pointer dereference, address: 00000000000000c0 #PF: supervisor read access in kernel mode #PF: errorcode(0x0000) - not-present page PGD 0 P4D 0 Oops: 0000 [#1] PREEMPT SMP CPU: 1 PID: 7231 Comm: ping Kdump: loaded Not tainted 5.19.0+ #24 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.0-1.fc36 04/01/2014 RIP: 0010:xfrmlookupwithifid+0x5eb/0xa60 Code: 8d 74 24 38 e8 26 a4 37 00 48 89 c1 e9 12 fc ff ff 49 63 ed 41 83 fd be 0f 85 be 01 00 00 41 be ff ff ff ff 45 31 ed 48 8b 03 <f6> 80 c0 00 00 00 08 75 0f 41 80 bc 24 19 0d 00 00 01 0f 84 1e 02 RSP: 0018:ffffb0db82c679f0 EFLAGS: 00010246 RAX: 0000000000000000 RBX: ffffd0db7fcad430 RCX: ffffb0db82c67a10 RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffb0db82c67a80 RBP: ffffb0db82c67a80 R08: ffffb0db82c67a14 R09: 0000000000000000 R10: 0000000000000000 R11: ffff8fa449667dc8 R12: ffffffff966db880 R13: 0000000000000000 R14: 00000000ffffffff R15: 0000000000000000 FS: 00007ff35c83f000(0000) GS:ffff8fa478480000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000000000c0 CR3: 000000001ebb7000 CR4: 0000000000350ee0 Call Trace: <TASK> xfrmixmit+0xde/0x460 ? tcfbpfact+0x13d/0x2a0 devhardstartxmit+0x72/0x1e0 devqueuexmit+0x251/0xd30 ipfinishoutput2+0x140/0x550 ippushpendingframes+0x56/0x80 rawsendmsg+0x663/0x10a0 ? trychargememcg+0x3fd/0x7a0 ? modmemcglruvecstate+0x93/0x110 ? socksendmsg+0x30/0x40 socksendmsg+0x30/0x40 syssendto+0xeb/0x130 ? handlemmfault+0xae/0x280 ? douseraddrfault+0x1e7/0x680 ? kvmreadandresetapfflags+0x3b/0x50 x64syssendto+0x20/0x30 dosyscall64+0x34/0x80 entrySYSCALL64afterhwframe+0x46/0xb0 RIP: 0033:0x7ff35cac1366 Code: eb 0b 00 f7 d8 64 89 02 48 c7 c0 ff ff ff ff eb b8 0f 1f 00 41 89 ca 64 8b 04 25 18 00 00 00 85 c0 75 11 b8 2c 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 72 c3 90 55 48 83 ec 30 44 89 4c 24 2c 4c 89 RSP: 002b:00007fff738e4028 EFLAGS: 00000246 ORIGRAX: 000000000000002c RAX: ffffffffffffffda RBX: 00007fff738e57b0 RCX: 00007ff35cac1366 RDX: 0000000000000040 RSI: 0000557164e4b450 RDI: 0000000000000003 RBP: 0000557164e4b450 R08: 00007fff738e7a2c R09: 0000000000000010 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000040 R13: 00007fff738e5770 R14: 00007fff738e4030 R15: 0000001d00000001 </TASK> Modules linked in: netconsole veth brnetfilter bridge bonding virtionet [last unloaded: netconsole] CR2: 00000000000000c0
In the Linux kernel, the following vulnerability has been resolved:
fs/ntfs3: Fix NULL deref in ntfsupdatemftmirr
If ntfsfillsuper() wasn't called then sbi->sb will be equal to NULL. Code should check this ptr before dereferencing. Syzbot hit this issue via passing wrong mount param as can be seen from log below
Fail log: ntfs3: Unknown parameter 'iochvrset' general protection fault, probably for non-canonical address 0xdffffc0000000003: 0000 [#1] PREEMPT SMP KASAN KASAN: null-ptr-deref in range [0x0000000000000018-0x000000000000001f] CPU: 1 PID: 3589 Comm: syz-executor210 Not tainted 5.18.0-rc3-syzkaller-00016-gb253435746d9 #0 ... Call Trace: <TASK> putntfs+0x1ed/0x2a0 fs/ntfs3/super.c:463 ntfsfsfree+0x6a/0xe0 fs/ntfs3/super.c:1363 putfscontext+0x119/0x7a0 fs/fscontext.c:469 donewmount+0x2b4/0xad0 fs/namespace.c:3044 domount fs/namespace.c:3383 [inline] dosysmount fs/namespace.c:3591 [inline]
In the Linux kernel, the following vulnerability has been resolved:
ARC: mm: fix leakage of memory allocated for PTE
Since commit d9820ff ("ARC: mm: switch pgtablet back to struct page ") a memory leakage problem occurs. Memory allocated for page table entries not released during process termination. This issue can be reproduced by a small program that allocates a large amount of memory. After several runs, you'll see that the amount of free memory has reduced and will continue to reduce after each run. All ARC CPUs are effected by this issue. The issue was introduced since the kernel stable release v5.15-rc1.
As described in commit d9820ff after switch pgtablet back to struct page , a pointer to "struct page" and appropriate functions are used to allocate and free a memory page for PTEs, but the pmdpgtable macro hasn't changed and returns the direct virtual address from the PMD (PGD) entry. Than this address used as a parameter in the ptefree() and as a result this function couldn't release memory page allocated for PTEs.
Fix this issue by changing the pmdpgtable macro and returning pointer to struct page.
In the Linux kernel, the following vulnerability has been resolved:
net: ethernet: xscale: Check for PTP support properly
In ixp4xxgettsinfo() ixp46xptpfind() is called unconditionally despite this feature only existing on ixp46x, leading to the following splat from tcpdump:
root@OpenWrt:~# tcpdump -vv -X -i eth0 (...) Unable to handle kernel NULL pointer dereference at virtual address 00000238 when read (...) Call trace: ptpclockindex from ixp46xptpfind+0x1c/0x38 ixp46xptpfind from ixp4xxgettsinfo+0x4c/0x64 ixp4xxgettsinfo from ethtoolgettsinfo+0x90/0x108 ethtoolgettsinfo from devethtool+0xa00/0x2648 devethtool from devethtool+0x160/0x234 devethtool from devioctl+0x2cc/0x460 devioctl from sockioctl+0x1ec/0x524 sockioctl from sysioctl+0x51c/0xa94 sysioctl from retfastsyscall+0x0/0x44 (...) Segmentation fault
Check for ixp46x in ixp46xptpfind() before trying to set up PTP to avoid this.
To avoid altering the returned error code from ixp4xxhwtstampset() which before this patch was -EOPNOTSUPP, we return -EOPNOTSUPP from ixp4xxhwtstampset() if ixp46xptpfind() fails no matter the error code. The helper function ixp46xptpfind() helper returns -ENODEV.
In the Linux kernel, the following vulnerability has been resolved:
net, bpf: fix null-ptr-deref in xdpmasterredirect() for down master
syzkaller reported a kernel panic in bondrrgenslaveid() reached via xdpmasterredirect(). Full decoded trace:
https://syzkaller.appspot.com/bug?extid=80e046b8da2820b6ba73
bondrrgenslaveid() dereferences bond->rrtxcounter, a per-CPU counter that bonding only allocates in bondopen() when the mode is round-robin. If the bond device was never brought up, rrtxcounter stays NULL.
The XDP redirect path can still reach that code on a bond that was never opened: bpfmasterredirectenabledkey is a global static key, so as soon as any bond device has native XDP attached, the XDPTX -> xdpmasterredirect() interception is enabled for every slave system-wide. The path xdpmasterredirect() -> bondxdpgetxmitslave() -> bondxdpxmitroundrobinslaveget() -> bondrrgenslaveid() then runs against a bond that has no rrtxcounter and crashes.
Fix this in the generic xdpmasterredirect() by refusing to call into the master's ->ndoxdpgetxmitslave() when the master device is not up. IFFUP is only set after ->ndoopen() has successfully returned, so this reliably excludes masters whose XDP state has not been fully initialized. Drop the frame with XDPABORTED so the exception is visible via tracexdpexception() rather than silently falling through. This is not specific to bonding: any current or future master that defers XDP state allocation to ->ndoopen() is protected.
In the Linux kernel, the following vulnerability has been resolved:
net: mctp: take ownership of skb in mctplocaloutput
Currently, mctplocaloutput only takes ownership of skb on success, and we may leak an skb if mctplocaloutput fails in specific states; the skb ownership isn't transferred until the actual output routing occurs.
Instead, make mctplocaloutput free the skb on all error paths up to the route action, so it always consumes the passed skb.
bpf: Allow delete from sockmap/sockhash only if update is allowed
In the Linux kernel, the following vulnerability has been resolved:
bpf: Set run context for rawtp testrun callback
syzbot reported crash when rawtp program executed through the testrun interface calls bpfgetattachcookie helper or any other helper that touches task->bpfctx pointer.
Setting the run context (task->bpfctx pointer) for testrun callback.
bpf: Add skisinet and ISICSK check in tlsswhasctxtx/rx
In the Linux kernel, the following vulnerability has been resolved:
iommu/amd/iommuv2: Fix pasidstate refcount dec hit 0 warning on pasid unbind
When unbinding pasid - a race condition exists vs outstanding page faults.
To prevent this, the pasidstate object contains a refcount. set to 1 on pasid bind incremented on each ppr notification start decremented on each ppr notification done decremented on pasid unbind
Since refcountdec assumes that refcount will never reach 0: the current implementation causes the following to be invoked on pasid unbind: REFCOUNTWARN("decrement hit 0; leaking memory")
Fix this issue by changing refcountdec to refcountdecandtest to explicitly handle refcount=1.
Last updated 25 April 2025
An issue was discovered in ksmbd in the Linux kernel 5.15 through 5.19 before 5.19.2. fs/ksmbd/smb2misc.c has an out-of-bounds read and OOPS for SMB2TREECONNECT.
In the Linux kernel, the following vulnerability has been resolved:
mptcp: fix data re-injection from stale subflow
The Linux kernel CVE team has assigned CVE-2024-26826 to this issue.
Upstream advisory: https://lore.kernel.org/linux-cve-announce/2024041703-CVE-2024-26826-b984@gregkh/T
In the Linux kernel, the following vulnerability has been resolved:
smb: server: make use of smbdirectsocket.sendio.bcredits
It turns out that our code will corrupt the stream of reassabled data transfer messages when we trigger an immendiate (empty) send.
In order to fix this we'll have a single 'batch' credit per connection. And code getting that credit is free to use as much messages until remaininglength reaches 0, then the batch credit it given back and the next logical send can happen.
In the Linux kernel, the following vulnerability has been resolved:
ksmbd: validate NTLMv2 response before updating session key
ksmbdauthntlmv2() derives the NTLMv2 session key into sess->sesskey before it verifies the NTLMv2 response. ksmbddecodentlmsspauthblob() then continues into KEYXCH even when ksmbdauthntlmv2() failed.
With SMB3 multichannel binding, the failed authentication operates on an existing session and the session setup error path does not expire binding sessions. A client can send a binding session setup with a bad NT proof and KEYXCH and still modify sess->sesskey before STATUSLOGONFAILURE is returned.
Relevant path:
smb2sesssetup() -> conn->binding = true -> ntlmauthenticate() -> sessionuser() -> ksmbddecodentlmsspauthblob() -> ksmbdauthntlmv2() -> calcntlmv2hash() -> hmacmd5usingrawkey(..., sess->sesskey) -> cryptomemneq() returns mismatch -> KEYXCH arc4crypt(..., sess->sesskey, ...) -> outerr without expiring the binding session
Derive the base session key into a local buffer and copy it to sess->sesskey only after the proof matches. Return immediately on authentication failure so KEYXCH is only processed after successful authentication.
A slab-use-after-free read flaw was found in btrfssearchslot in fs/btrfs/ctree.c
The quota assigned ioctl can currently run in parallel with a quota disable ioctl call. The assign ioctl uses the quota root, while the disable ioctl frees that root, and therefore we can have a use-after-free triggered in the assign ioctl.
Reference: https://lore.kernel.org/linux-btrfs/35b9a70650ea947387cf352914a8774b4f7e8a6f.1679481128.git.fdmanana@suse.com/
fsdax: Fix infinite loop in daxiomaprw()
fs/ntfs3: bound NTFSDE view.dataoff in UpdateRecordData{Root,Allocation}
In the Linux kernel, the following vulnerability has been resolved:
fs/ntfs3: Fix an NULL dereference bug
The issue here is when this is called from ntfsloadattrlist(). The "size" comes from le32tocpu(attr->res.datasize) so it can't overflow on a 64bit systems but on 32bit systems the "+ 1023" can overflow and the result is zero. This means that the kmalloc will succeed by returning the ZEROSIZEPTR and then the memcpy() will crash with an Oops on the next line.