Where
AND
AND
-Infinity
0
Severity
8.1
Buffer Overflow, Integer Overflow
AV:A/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H

A buffer overflow flaw was found in the u8 overflow in cfg80211updatenotlistednontrans() in net/wireless/scan.c in the Linux kernel’s wifi subcomponent. This flaw allows an attacker to crash the system or leak internal kernel information.

1 / 5
First published (updated )
Severity
7.8
Use After Free
AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

In the Linux kernel, the following vulnerability has been resolved:

spi: spi-zynqmp-gqspi: fix use-after-free in zynqmpqspiexecop

When handling op->addr, it is using the buffer "tmpbuf" which has been freed. This will trigger a use-after-free KASAN warning. Let's use temporary variables to store op->addr.val and op->cmd.opcode to fix this issue.

1 / 2
Source: NVD
First published (updated )
Severity
7.1
AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

In the Linux kernel, the following vulnerability has been resolved:

KVM: Stop looking for coalesced MMIO zones if the bus is destroyed

Abort the walk of coalesced MMIO zones if kvmiobusunregisterdev() fails to allocate memory for the new instance of the bus. If it can't instantiate a new bus, unregisterdev() destroys all devices except the target device. But, it doesn't tell the caller that it obliterated the bus and invoked the destructor for all devices that were on the bus. In the coalesced MMIO case, this can result in a deleted list entry dereference due to attempting to continue iterating on coalescedzones after future entries (in the walk) have been deleted.

Opportunistically add curly braces to the for-loop, which encompasses many lines but sneaks by without braces due to the guts being a single if statement.

1 / 2
Source: NVD
First published (updated )
Severity
7.1
AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H

In the Linux kernel, the following vulnerability has been resolved:

asyncxor: increase srcoffs when dropping destination page

Now we support sharing one page if PAGESIZE is not equal stripe size. To support this, it needs to support calculating xor value with different offsets for each r5dev. One offset array is used to record those offsets.

In RMW mode, parity page is used as a source page. It sets ASYNCTXXORDROPDST before calculating xor value in opsrunprexor5. So it needs to add srclist and srcoffs at the same time. Now it only needs srclist. So the xor value which is calculated is wrong. It can cause data corruption problem.

I can reproduce this problem 100% on a POWER8 machine. The steps are:

mdadm -CR /dev/md0 -l5 -n3 /dev/sdb1 /dev/sdc1 /dev/sdd1 --size=3G mkfs.xfs /dev/md0 mount /dev/md0 /mnt/test mount: /mnt/test: mount(2) system call failed: Structure needs cleaning.

1 / 2
Source: NVD
First published (updated )
Severity
7.8
AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

In the Linux kernel, the following vulnerability has been resolved:

ipc/mqueue, msg, sem: avoid relying on a stack reference past its expiry

domqtimedreceive calls wqsleep with a stack local address. The sender (domqtimedsend) uses this address to later call pipelinedsend.

This leads to a very hard to trigger race where a domqtimedreceive call might return and leave domqtimedsend to rely on an invalid address, causing the following crash:

RIP: 0010:wakeqaddsafe+0x13/0x60 Call Trace: x64sysmqtimedsend+0x2a9/0x490 dosyscall64+0x80/0x680 entrySYSCALL64afterhwframe+0x44/0xa9 RIP: 0033:0x7f5928e40343

The race occurs as:

1. domqtimedreceive calls wqsleep with the address of struct extwaitqueue on function stack (aliased as ewqaddr here) - it holds a valid struct extwaitqueue as long as the stack has not been overwritten.

2. ewqaddr gets added to info->ewaitq[RECV].list in wqadd, and domqtimedsend receives it via wqgetfirstwaiter(info, RECV) to call pipelinedop.

3. Sender calls pipelinedop::smpstorerelease(&this->state, STATEREADY). Here is where the race window begins. (this is ewqaddr.)

4. If the receiver wakes up now in domqtimedreceive::wqsleep, it will see state == STATEREADY and break.

5. domqtimedreceive returns, and ewqaddr is no longer guaranteed to be a struct extwaitqueue since it was on domqtimedreceive's stack. (Although the address may not get overwritten until another function happens to touch it, which means it can persist around for an indefinite time.)

6. domqtimedsend::pipelinedop() still believes ewqaddr is a struct extwaitqueue , and uses it to find a taskstruct to pass to the wakeqaddsafe call. In the lucky case where nothing has overwritten ewqaddr yet, ewqaddr->task is the right taskstruct. In the unlucky case, pipelinedop::wakeqaddsafe gets handed a bogus address as the receiver's taskstruct causing the crash.

domqtimedsend::pipelinedop() should not dereference this after setting STATEREADY, as the receiver counterpart is now free to return. Change pipelinedop to call wakeqaddsafe on the receiver's taskstruct returned by gettaskstruct, instead of dereferencing this which sits on the receiver's stack.

As Manfred pointed out, the race potentially also exists in ipc/msg.c::expungeall and ipc/sem.c::wakeupsemqueueprepare. Fix those in the same way.

1 / 3
Source: IBM
First published (updated )
Severity
7.1
AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H

In the Linux kernel, the following vulnerability has been resolved:

Input: elantech - fix stack out of bound access in elantechchangereportid()

The array param[] in elantechchangereportid() must be at least 3 bytes, because elantechreadregparams() is calling ps2command() with PSMOUSECMDGETINFO, that is going to access 3 bytes from param[], but it's defined in the stack as an array of 2 bytes, therefore we have a potential stack out-of-bounds access here, also confirmed by KASAN:

[ 6.512374] BUG: KASAN: stack-out-of-bounds in ps2command+0x372/0x7e0 [ 6.512397] Read of size 1 at addr ffff8881024d77c2 by task kworker/2:1/118

[ 6.512416] CPU: 2 PID: 118 Comm: kworker/2:1 Not tainted 5.13.0-22-generic #22+arighi20211110 [ 6.512428] Hardware name: LENOVO 20T8000QGE/20T8000QGE, BIOS R1AET32W (1.08 ) 08/14/2020 [ 6.512436] Workqueue: eventslong seriohandleevent [ 6.512453] Call Trace: [ 6.512462] showstack+0x52/0x58 [ 6.512474] dumpstack+0xa1/0xd3 [ 6.512487] printaddressdescription.constprop.0+0x1d/0x140 [ 6.512502] ? ps2command+0x372/0x7e0 [ 6.512516] kasanreport.cold+0x7d/0x112 [ 6.512527] ? rawwritelockirq+0x20/0xd0 [ 6.512539] ? ps2command+0x372/0x7e0 [ 6.512552] kasanreport+0x3c/0x50 [ 6.512564] asanload1+0x6a/0x70 [ 6.512575] ps2command+0x372/0x7e0 [ 6.512589] ? ps2drain+0x240/0x240 [ 6.512601] ? devprintkemit+0xa2/0xd3 [ 6.512612] ? devvprintkemit+0xc5/0xc5 [ 6.512621] ? kasancheckwrite+0x14/0x20 [ 6.512634] ? mutexlock+0x8f/0xe0 [ 6.512643] ? mutexlockslowpath+0x20/0x20 [ 6.512655] ps2command+0x52/0x90 [ 6.512670] elantechps2command+0x4f/0xc0 [psmouse] [ 6.512734] elantechchangereportid+0x1e6/0x256 [psmouse] [ 6.512799] ? elantechreporttrackpoint.constprop.0.cold+0xd/0xd [psmouse] [ 6.512863] ? ps2command+0x7f/0x90 [ 6.512877] elantechqueryinfo.cold+0x6bd/0x9ed [psmouse] [ 6.512943] ? elantechsetupps2+0x460/0x460 [psmouse] [ 6.513005] ? psmousereset+0x69/0xb0 [psmouse] [ 6.513064] ? psmouseattrsethelper+0x2a0/0x2a0 [psmouse] [ 6.513122] ? physpmdinit+0x30e/0x521 [ 6.513137] elantechinit+0x8a/0x200 [psmouse] [ 6.513200] ? elantechinitps2+0xf0/0xf0 [psmouse] [ 6.513249] ? elantechqueryinfo+0x440/0x440 [psmouse] [ 6.513296] ? synapticssendcmd+0x60/0x60 [psmouse] [ 6.513342] ? elantechqueryinfo+0x440/0x440 [psmouse] [ 6.513388] ? psmousetryprotocol+0x11e/0x170 [psmouse] [ 6.513432] psmouseextensions+0x65d/0x6e0 [psmouse] [ 6.513476] ? psmousetryprotocol+0x170/0x170 [psmouse] [ 6.513519] ? mutexunlock+0x22/0x40 [ 6.513526] ? ps2command+0x7f/0x90 [ 6.513536] ? psmouseprobe+0xa3/0xf0 [psmouse] [ 6.513580] psmouseswitchprotocol+0x27d/0x2e0 [psmouse] [ 6.513624] psmouseconnect+0x272/0x530 [psmouse] [ 6.513669] seriodriverprobe+0x55/0x70 [ 6.513679] reallyprobe+0x190/0x720 [ 6.513689] driverprobedevice+0x160/0x1f0 [ 6.513697] devicedriverattach+0x119/0x130 [ 6.513705] ? devicedriverattach+0x130/0x130 [ 6.513713] driverattach+0xe7/0x1a0 [ 6.513720] ? devicedriverattach+0x130/0x130 [ 6.513728] busforeachdev+0xfb/0x150 [ 6.513738] ? subsysdeviterexit+0x10/0x10 [ 6.513748] ? rawwriteunlockbh+0x30/0x30 [ 6.513757] driverattach+0x2d/0x40 [ 6.513764] seriohandleevent+0x199/0x3d0 [ 6.513775] processonework+0x471/0x740 [ 6.513785] workerthread+0x2d2/0x790 [ 6.513794] ? processonework+0x740/0x740 [ 6.513802] kthread+0x1b4/0x1e0 [ 6.513809] ? setkthreadstruct+0x80/0x80 [ 6.513816] retfromfork+0x22/0x30

[ 6.513832] The buggy address belongs to the page: [ 6.513838] page:00000000bc35e189 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1024d7 [ 6.513847] flags: 0x17ffffc0000000(node=0|zone=2|lastcpupid=0x1fffff) [ 6.513860] raw: 0 ---truncated---

1 / 3
Source: NVD
First published (updated )
Severity
7.1
AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H

In the Linux kernel, the following vulnerability has been resolved:

pinctrl: mediatek: fix global-out-of-bounds issue

When eint virtual eint number is greater than gpio number, it maybe produce 'desc[eintn]' size globle-out-of-bounds issue.

1 / 2
Source: NVD
First published (updated )
Severity
7.8
AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

In the Linux kernel, the following vulnerability has been resolved:

x86/kvm: Teardown PV features on boot CPU as well

Various PV features (Async PF, PV EOI, steal time) work through memory shared with hypervisor and when we restore from hibernation we must properly teardown all these features to make sure hypervisor doesn't write to stale locations after we jump to the previously hibernated kernel (which can try to place anything there). For secondary CPUs the job is already done by kvmcpudownprepare(), register syscore ops to do the same for boot CPU.

1 / 2
Source: NVD
First published (updated )
Severity
7
Use After Free
AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H

In the Linux kernel, the following vulnerability has been resolved:

drm: Fix use-after-free read in drmgetunique()

There is a time-of-check-to-time-of-use error in drmgetunique() due to retrieving filepriv->master prior to locking the device's master mutex.

An example can be seen in the crash report of the use-after-free error found by Syzbot: https://syzkaller.appspot.com/bug?id=148d2f1dfac64af52ffd27b661981a540724f803

In the report, the master pointer was used after being freed. This is because another process had acquired the device's master mutex in drmsetmasterioctl(), then overwrote fpriv->master in drmnewsetmaster(). The old value of fpriv->master was subsequently freed before the mutex was unlocked.

To fix this, we lock the device's master mutex before retrieving the pointer from from fpriv->master. This patch passes the Syzbot reproducer test.

1 / 2
Source: NVD
First published (updated )
Severity
7.3
Use After Free
AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

In the Linux kernel, the following vulnerability has been resolved:

ALSA: seq: Fix race of sndseqtimeropen()

The timer instance per queue is exclusive, and sndseqtimeropen() should have managed the concurrent accesses. It looks as if it's checking the already existing timer instance at the beginning, but it's not right, because there is no protection, hence any later concurrent call of sndseqtimeropen() may override the timer instance easily. This may result in UAF, as the leftover timer instance can keep running while the queue itself gets closed, as spotted by syzkaller recently.

For avoiding the race, add a proper check at the assignment of tmr->timeri again, and return -EBUSY if it's been already registered.

1 / 2
Source: NVD
First published (updated )
Severity
7.1
AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H

In the Linux kernel, the following vulnerability has been resolved:

media: ngene: Fix out-of-bounds bug in ngenecommandconfigfreebuf()

Fix an 11-year old bug in ngenecommandconfigfreebuf() while addressing the following warnings caught with -Warray-bounds:

arch/alpha/include/asm/string.h:22:16: warning: 'builtinmemcpy' offset [12, 16] from the object at 'com' is out of the bounds of referenced subobject 'config' with type 'unsigned char' at offset 10 [-Warray-bounds] arch/x86/include/asm/string32.h:182:25: warning: 'builtinmemcpy' offset [12, 16] from the object at 'com' is out of the bounds of referenced subobject 'config' with type 'unsigned char' at offset 10 [-Warray-bounds]

The problem is that the original code is trying to copy 6 bytes of data into a one-byte size member config of the wrong structue FWCONFIGUREBUFFERS, in a single call to memcpy(). This causes a legitimate compiler warning because memcpy() overruns the length of &com.cmd.ConfigureBuffers.config. It seems that the right structure is FWCONFIGUREFREEBUFFERS, instead, because it contains 6 more members apart from the header hdr. Also, the name of the function ngenecommandconfigfreebuf() suggests that the actual intention is to ConfigureFreeBuffers, instead of ConfigureBuffers (which takes place in the function ngenecommandconfigbuf(), above).

Fix this by enclosing those 6 members of struct FWCONFIGUREFREEBUFFERS into new struct config, and use &com.cmd.ConfigureFreeBuffers.config as the destination address, instead of &com.cmd.ConfigureBuffers.config, when calling memcpy().

This also helps with the ongoing efforts to globally enable -Warray-bounds and get us closer to being able to tighten the FORTIFYSOURCE routines on memcpy().

1 / 2
Source: NVD
First published (updated )
Severity
7.1
AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H

In the Linux kernel, the following vulnerability has been resolved:

mac80211: validate extended element ID is present

Before attempting to parse an extended element, verify that the extended element ID is present.

1 / 2
Source: NVD
First published (updated )
Severity
7.8
AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Last updated 25 April 2025

1 / 2
Source: Ubuntu
First published (updated )
Severity
7.8
AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

An issue was discovered in the Linux kernel through 5.11.6. fastrpcinternalinvoke in drivers/misc/fastrpc.c does not prevent user applications from sending kernel RPC messages, aka CID-20c40794eb85. This is a related issue to CVE-2019-2308.

1 / 3
Source: MITRE
First published (updated )
Severity
7.8
Buffer Overflow
AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:H

In the Linux kernel, the following vulnerability has been resolved:

ocfs2: mount fails with buffer overflow in strlen

Starting with kernel 5.11 built with CONFIGFORTIFYSOURCE mouting an ocfs2 filesystem with either o2cb or pcmk cluster stack fails with the trace below. Problem seems to be that strings for cluster stack and cluster name are not guaranteed to be null terminated in the disk representation, while strlcpy assumes that the source string is always null terminated. This causes a read outside of the source string triggering the buffer overflow detection.

detected buffer overflow in strlen ------------[ cut here ]------------ kernel BUG at lib/string.c:1149! invalid opcode: 0000 [#1] SMP PTI CPU: 1 PID: 910 Comm: mount.ocfs2 Not tainted 5.14.0-1-amd64 #1 Debian 5.14.6-2 RIP: 0010:fortifypanic+0xf/0x11 ... Call Trace: ocfs2initializesuper.isra.0.cold+0xc/0x18 [ocfs2] ocfs2fillsuper+0x359/0x19b0 [ocfs2] mountbdev+0x185/0x1b0 legacygettree+0x27/0x40 vfsgettree+0x25/0xb0 pathmount+0x454/0xa20 x64sysmount+0x103/0x140 dosyscall64+0x3b/0xc0 entrySYSCALL64afterhwframe+0x44/0xae

1 / 2
Source: NVD
First published (updated )
Severity
7.8
Use After Free
AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

In the Linux kernel, the following vulnerability has been resolved:

satafsl: fix UAF in satafslportstop when rmmod satafsl

When the rmmod satafsl.ko command is executed in the PPC64 GNU/Linux, a bug is reported: ================================================================== BUG: Unable to handle kernel data access on read at 0x80000800805b502c Oops: Kernel access of bad area, sig: 11 [#1] NIP [c0000000000388a4] .ioread32+0x4/0x20 LR [80000000000c6034] .satafslportstop+0x44/0xe0 [satafsl] Call Trace: .freeirq+0x1c/0x4e0 (unreliable) .atahoststop+0x74/0xd0 [libata] .releasenodes+0x330/0x3f0 .devicereleasedriverinternal+0x178/0x2c0 .driverdetach+0x64/0xd0 .busremovedriver+0x70/0xf0 .driverunregister+0x38/0x80 .platformdriverunregister+0x14/0x30 .fslsatadriverexit+0x18/0xa20 [satafsl] .sesysdeletemodule+0x1ec/0x2d0 .systemcallexception+0xfc/0x1f0 systemcallcommon+0xf8/0x200 ==================================================================

The triggering of the BUG is shown in the following stack:

driverdetach devicereleasedriverinternal devicereleasedriver drv->remove(dev) --> platformdrvremove/platformremove drv->remove(dev) --> satafslremove iounmap(hostpriv->hcrbase); <---- unmap kfree(hostpriv); <---- free devresreleaseall releasenodes dr->node.release(dev, dr->data) --> atahoststop ap->ops->portstop(ap) --> satafslportstop ioread32(hcrbase + HCONTROL) <---- UAF host->ops->hoststop(host)

The iounmap(hostpriv->hcrbase) and kfree(hostpriv) functions should not be executed in drv->remove. These functions should be executed in hoststop after portstop. Therefore, we move these functions to the new function satafslhoststop and bind the new function to hoststop.

1 / 2
Source: NVD
First published (updated )
Severity
7.8
AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

In the Linux kernel, the following vulnerability has been resolved:

drm/amd/amdkfd: Fix kernel panic when reset failed and been triggered again

In SRIOV configuration, the reset may failed to bring asic back to normal but stop cpsch already been called, the startcpsch will not be called since there is no resume in this case. When reset been triggered again, driver should avoid to do uninitialization again.

1 / 2
Source: NVD
First published (updated )
Severity
7.3
Use After Free
AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

In the Linux kernel, the following vulnerability has been resolved:

schcake: do not call cakedestroy() from cakeinit()

qdiscs are not supposed to call their own destroy() method from init(), because core stack already does that.

syzbot was able to trigger use after free:

DEBUGLOCKSWARNON(lock->magic != lock) WARNING: CPU: 0 PID: 21902 at kernel/locking/mutex.c:586 mutexlockcommon kernel/locking/mutex.c:586 [inline] WARNING: CPU: 0 PID: 21902 at kernel/locking/mutex.c:586 mutexlock+0x9ec/0x12f0 kernel/locking/mutex.c:740 Modules linked in: CPU: 0 PID: 21902 Comm: syz-executor189 Not tainted 5.16.0-rc4-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:mutexlockcommon kernel/locking/mutex.c:586 [inline] RIP: 0010:mutexlock+0x9ec/0x12f0 kernel/locking/mutex.c:740 Code: 08 84 d2 0f 85 19 08 00 00 8b 05 97 38 4b 04 85 c0 0f 85 27 f7 ff ff 48 c7 c6 20 00 ac 89 48 c7 c7 a0 fe ab 89 e8 bf 76 ba ff <0f> 0b e9 0d f7 ff ff 48 8b 44 24 40 48 8d b8 c8 08 00 00 48 89 f8 RSP: 0018:ffffc9000627f290 EFLAGS: 00010282 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 RDX: ffff88802315d700 RSI: ffffffff815f1db8 RDI: fffff52000c4fe44 RBP: ffff88818f28e000 R08: 0000000000000000 R09: 0000000000000000 R10: ffffffff815ebb5e R11: 0000000000000000 R12: 0000000000000000 R13: dffffc0000000000 R14: ffffc9000627f458 R15: 0000000093c30000 FS: 0000555556abc400(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fda689c3303 CR3: 000000001cfbb000 CR4: 0000000000350ef0 Call Trace: <TASK> tcfchain0headchangecbdel+0x2e/0x3d0 net/sched/clsapi.c:810 tcfblockputext net/sched/clsapi.c:1381 [inline] tcfblockputext net/sched/clsapi.c:1376 [inline] tcfblockput+0xbc/0x130 net/sched/clsapi.c:1394 cakedestroy+0x3f/0x80 net/sched/schcake.c:2695 qdisccreate.constprop.0+0x9da/0x10f0 net/sched/schapi.c:1293 tcmodifyqdisc+0x4c5/0x1980 net/sched/schapi.c:1660 rtnetlinkrcvmsg+0x413/0xb80 net/core/rtnetlink.c:5571 netlinkrcvskb+0x153/0x420 net/netlink/afnetlink.c:2496 netlinkunicastkernel net/netlink/afnetlink.c:1319 [inline] netlinkunicast+0x533/0x7d0 net/netlink/afnetlink.c:1345 netlinksendmsg+0x904/0xdf0 net/netlink/afnetlink.c:1921 socksendmsgnosec net/socket.c:704 [inline] socksendmsg+0xcf/0x120 net/socket.c:724 syssendmsg+0x6e8/0x810 net/socket.c:2409 syssendmsg+0xf3/0x170 net/socket.c:2463 syssendmsg+0xe5/0x1b0 net/socket.c:2492 dosyscallx64 arch/x86/entry/common.c:50 [inline] dosyscall64+0x35/0xb0 arch/x86/entry/common.c:80 entrySYSCALL64afterhwframe+0x44/0xae RIP: 0033:0x7f1bb06badb9 Code: Unable to access opcode bytes at RIP 0x7f1bb06bad8f. RSP: 002b:00007fff3012a658 EFLAGS: 00000246 ORIGRAX: 000000000000002e RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007f1bb06badb9 RDX: 0000000000000000 RSI: 00000000200007c0 RDI: 0000000000000003 RBP: 0000000000000000 R08: 0000000000000003 R09: 0000000000000003 R10: 0000000000000003 R11: 0000000000000246 R12: 00007fff3012a688 R13: 00007fff3012a6a0 R14: 00007fff3012a6e0 R15: 00000000000013c2 </TASK>

1 / 2
Source: NVD
First published (updated )
Severity
7.8
AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

In the Linux kernel, the following vulnerability has been resolved:

IB/mlx5: Fix initializing CQ fragments buffer

The function initcqfragbuf() can be called to initialize the current CQ fragments buffer cq->buf, or the temporary cq->resizebuf that is filled during CQ resize operation.

However, the offending commit started to use function getcqe() for getting the CQEs, the issue with this change is that getcqe() always returns CQEs from cq->buf, which leads us to initialize the wrong buffer, and in case of enlarging the CQ we try to access elements beyond the size of the current cq->buf and eventually hit a kernel panic.

[exception RIP: initcqfragbuf+103] [ffff9f799ddcbcd8] mlx5ibresizecq at ffffffffc0835d60 [mlx5ib] [ffff9f799ddcbdb0] ibresizecq at ffffffffc05270df [ibcore] [ffff9f799ddcbdc0] lltrdmasetupqp at ffffffffc0a6a712 [llt] [ffff9f799ddcbe10] lltrdmacceventaction at ffffffffc0a6b411 [llt] [ffff9f799ddcbe98] lltrdmaclientconnthread at ffffffffc0a6bb75 [llt] [ffff9f799ddcbec8] kthread at ffffffffa66c5da1 [ffff9f799ddcbf50] retfromforknospecbegin at ffffffffa6d95ddd

Fix it by getting the needed CQE by calling mlx5fragbufgetwqe() that takes the correct source buffer as a parameter.

1 / 2
Source: NVD
First published (updated )
Severity
7.8
Use After Free
AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

In the Linux kernel, the following vulnerability has been resolved:

net: ethernet: fix potential use-after-free in ecbhfremove

static void ecbhfremove(struct pcidev dev) { ... struct ecbhfpriv priv = netdevpriv(netdev);

unregisternetdev(netdev); freenetdev(netdev);

pciiounmap(dev, priv->dmaio); pciiounmap(dev, priv->io); ... }

priv is netdev private data, but it is used after freenetdev(). It can cause use-after-free when accessing priv pointer. So, fix it by moving freenetdev() after pciiounmap() calls.

1 / 5
Source: NVD
First published (updated )
Severity
7.8
Use After Free
AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

In the Linux kernel, the following vulnerability has been resolved:

NFS: Fix use-after-free in nfs4initclient()

KASAN reports a use-after-free when attempting to mount two different exports through two different NICs that belong to the same server.

Olga was able to hit this with kernels starting somewhere between 5.7 and 5.10, but I traced the patch that introduced the clearbit() call to 4.13. So something must have changed in the refcounting of the clp pointer to make this call to nfsputclient() the very last one.

1 / 2
Source: NVD
First published (updated )
Severity
8.4
AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

In the Linux kernel, the following vulnerability has been resolved:

KVM: PPC: Fix kvmarchvcpuioctl vcpuload leak

vcpuput is not called if the user copy fails. This can result in preempt notifier corruption and crashes, among other issues.

1 / 2
Source: NVD
First published (updated )
Severity
7.8
Use After Free
AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

In the Linux kernel, the following vulnerability has been resolved:

net: ti: fix UAF in tlanremoveone

priv is netdev private data and it cannot be used after freenetdev() call. Using priv after freenetdev() can cause UAF bug. Fix it by moving freenetdev() at the end of the function.

1 / 3
Source: NVD
First published (updated )
Severity
7.8
Use After Free
AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

In the Linux kernel, the following vulnerability has been resolved:

bpf: Fix tailcallreachable rejection for interpreter when jit failed

During testing of f263a81451c1 ("bpf: Track subprog poke descriptors correctly and fix use-after-free") under various failure conditions, for example, when jitsubprogs() fails and tries to clean up the program to be run under the interpreter, we ran into the following freeze:

[...] #127/8 tailcallbpf2bpf3:FAIL [...] [ 92.041251] BUG: KASAN: slab-out-of-bounds in bpfprogrun+0x1b9d/0x2e20 [ 92.042408] Read of size 8 at addr ffff88800da67f68 by task testprogs/682 [ 92.043707] [ 92.044030] CPU: 1 PID: 682 Comm: testprogs Tainted: G O 5.13.0-53301-ge6c08cb33a30-dirty #87 [ 92.045542] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-1ubuntu1 04/01/2014 [ 92.046785] Call Trace: [ 92.047171] ? bpfprogrunargs64+0xc0/0xc0 [ 92.047773] ? bpfprogrunargs32+0x8b/0xb0 [ 92.048389] ? bpfprogrunargs64+0xc0/0xc0 [ 92.049019] ? ktimeget+0x117/0x130 [...] // few hundred [similar] lines more [ 92.659025] ? ktimeget+0x117/0x130 [ 92.659845] ? bpfprogrunargs64+0xc0/0xc0 [ 92.660738] ? bpfprogrunargs32+0x8b/0xb0 [ 92.661528] ? bpfprogrunargs64+0xc0/0xc0 [ 92.662378] ? printusagebug+0x50/0x50 [ 92.663221] ? printusagebug+0x50/0x50 [ 92.664077] ? bpfksymfind+0x9c/0xe0 [ 92.664887] ? ktimeget+0x117/0x130 [ 92.665624] ? kerneltextaddress+0xf5/0x100 [ 92.666529] ? kerneltextaddress+0xe/0x30 [ 92.667725] ? unwindgetreturnaddress+0x2f/0x50 [ 92.668854] ? bpfprogrun+0x15d4/0x2e20 [ 92.670185] ? ktimeget+0x117/0x130 [ 92.671130] ? bpfprogrunargs64+0xc0/0xc0 [ 92.672020] ? bpfprogrunargs32+0x8b/0xb0 [ 92.672860] ? bpfprogrunargs64+0xc0/0xc0 [ 92.675159] ? ktimeget+0x117/0x130 [ 92.677074] ? lockisheldtype+0xd5/0x130 [ 92.678662] ? bpfprogrun+0x15d4/0x2e20 [ 92.680046] ? ktimeget+0x117/0x130 [ 92.681285] ? bpfprogrun32+0x6b/0x90 [ 92.682601] ? bpfprogrun64+0x90/0x90 [ 92.683636] ? lockdowngrade+0x370/0x370 [ 92.684647] ? markheldlocks+0x44/0x90 [ 92.685652] ? ktimeget+0x117/0x130 [ 92.686752] ? lockdephardirqson+0x79/0x100 [ 92.688004] ? ktimeget+0x117/0x130 [ 92.688573] ? cantmigrate+0x2b/0x80 [ 92.689192] ? bpftestrun+0x2f4/0x510 [ 92.689869] ? bpftesttimercontinue+0x1c0/0x1c0 [ 92.690856] ? rcureadlockbhheld+0x90/0x90 [ 92.691506] ? kasanslaballoc+0x61/0x80 [ 92.692128] ? ethtypetrans+0x128/0x240 [ 92.692737] ? buildskb+0x46/0x50 [ 92.693252] ? bpfprogtestrunskb+0x65e/0xc50 [ 92.693954] ? bpfprogtestrunrawtp+0x2d0/0x2d0 [ 92.694639] ? fgetlight+0xa1/0x100 [ 92.695162] ? bpfproginc+0x23/0x30 [ 92.695685] ? sysbpf+0xb40/0x2c80 [ 92.696324] ? bpflinkgetfromfd+0x90/0x90 [ 92.697150] ? markheldlocks+0x24/0x90 [ 92.698007] ? lockdephardirqsonprepare+0x124/0x220 [ 92.699045] ? finishtaskswitch+0xe6/0x370 [ 92.700072] ? lockdephardirqson+0x79/0x100 [ 92.701233] ? finishtaskswitch+0x11d/0x370 [ 92.702264] ? switchto+0x2c0/0x740 [ 92.703148] ? markheldlocks+0x24/0x90 [ 92.704155] ? x64sysbpf+0x45/0x50 [ 92.705146] ? dosyscall64+0x35/0x80 [ 92.706953] ? entrySYSCALL64afterhwframe+0x44/0xae [...]

Turns out that the program rejection from e411901c0b77 ("bpf: allow for tailcalls in BPF subprograms for x64 JIT") is buggy since env->prog->aux->tailcallreachable is never true. Commit ebf7d1f508a7 ("bpf, x64: rework pro/epilogue and tailcall handling in JIT") added a tracker into checkmaxstackdepth() which propagates the tailcallreachable condition throughout the subprograms. This info is then assigned to the subprogram's ---truncated---

1 / 2
Source: NVD
First published (updated )
Severity
7.8
Use After Free, Double Free
AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

In the Linux kernel, the following vulnerability has been resolved:

bpf: Track subprog poke descriptors correctly and fix use-after-free

Subprograms are calling mappoketrack(), but on program release there is no hook to call mappokeuntrack(). However, on program release, the aux memory (and poke descriptor table) is freed even though we still have a reference to it in the element list of the map aux data. When we run mappokerun(), we then end up accessing free'd memory, triggering KASAN in progarraymappokerun():

[...] [ 402.824689] BUG: KASAN: use-after-free in progarraymappokerun+0xc2/0x34e [ 402.824698] Read of size 4 at addr ffff8881905a7940 by task hubble-fgs/4337 [ 402.824705] CPU: 1 PID: 4337 Comm: hubble-fgs Tainted: G I 5.12.0+ #399 [ 402.824715] Call Trace: [ 402.824719] dumpstack+0x93/0xc2 [ 402.824727] printaddressdescription.constprop.0+0x1a/0x140 [ 402.824736] ? progarraymappokerun+0xc2/0x34e [ 402.824740] ? progarraymappokerun+0xc2/0x34e [ 402.824744] kasanreport.cold+0x7c/0xd8 [ 402.824752] ? progarraymappokerun+0xc2/0x34e [ 402.824757] progarraymappokerun+0xc2/0x34e [ 402.824765] bpffdarraymapupdateelem+0x124/0x1a0 [...]

The elements concerned are walked as follows:

for (i = 0; i < elem->aux->sizepoketab; i++) { poke = &elem->aux->poketab[i]; [...]

The access to sizepoketab is a 4 byte read, verified by checking offsets in the KASAN dump:

[ 402.825004] The buggy address belongs to the object at ffff8881905a7800 which belongs to the cache kmalloc-1k of size 1024 [ 402.825008] The buggy address is located 320 bytes inside of 1024-byte region [ffff8881905a7800, ffff8881905a7c00)

The pahole output of bpfprogaux:

struct bpfprogaux { [...] / --- cacheline 5 boundary (320 bytes) --- / u32 sizepoketab; / 320 4 / [...]

In general, subprograms do not necessarily manage their own data structures. For example, BTF funcinfo and linfo are just pointers to the main program structure. This allows reference counting and cleanup to be done on the latter which simplifies their management a bit. The aux->poketab struct, however, did not follow this logic. The initial proposed fix for this use-after-free bug further embedded poke data tracking into the subprogram with proper reference counting. However, Daniel and Alexei questioned why we were treating these objects special; I agree, its unnecessary. The fix here removes the per subprogram poke table allocation and map tracking and instead simply points the aux->poketab pointer at the main programs poke table. This way, map tracking is simplified to the main program and we do not need to manage them per subprogram.

This also means, bpfprogfreedeferred(), which unwinds the program reference counting and kfrees objects, needs to ensure that we don't try to double free the poketab when free'ing the subprog structures. This is easily solved by NULL'ing the poketab pointer. The second detail is to ensure that per subprogram JIT logic only does fixups on poketab[] entries it owns. To do this, we add a pointer in the poke structure to point at the subprogram value so JITs can easily check while walking the poketab structure if the current entry belongs to the current program. The aux pointer is stable and therefore suitable for such comparison. On the jitsubprogs() error path, we omit cleaning up the poke->aux field because these are only ever referenced from the JIT side, but on error we will never make it to the JIT, so its fine to leave them dangling. Removing these pointers would complicate the error path for no reason. However, we do need to untrack all poke descriptors from the main program as otherwise they could race with the freeing of JIT memory from the subprograms. Lastly, a748c6975dea3 ("bpf: propagate poke des ---truncated---

1 / 2
Source: NVD
First published (updated )
Severity
7.8
AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

In the Linux kernel, the following vulnerability has been resolved:

drm/msm/a4xx: fix error handling in a4xxgpuinit()

This code returns 1 on error instead of a negative error. It leads to an Oops in the caller. A second problem is that the check for "if (ret != -ENODATA)" cannot be true because "ret" is set to 1.

1 / 2
Source: NVD
First published (updated )
Severity
7.8
AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

In the Linux kernel, the following vulnerability has been resolved:

netfilter: xtIDLETIMER: fix panic that occurs when timertype has garbage value

Currently, when the rule related to IDLETIMER is added, idletimertg timer structure is initialized by kmalloc on executing idletimertgcreate function. However, in this process timer->timertype is not defined to a specific value. Thus, timer->timertype has garbage value and it occurs kernel panic. So, this commit fixes the panic by initializing timer->timertype using kzalloc instead of kmalloc.

Test commands: # iptables -A OUTPUT -j IDLETIMER --timeout 1 --label test $ cat /sys/class/xtidletimer/timers/test Killed

Splat looks like: BUG: KASAN: user-memory-access in alarmexpiresremaining+0x49/0x70 Read of size 8 at addr 0000002e8c7bc4c8 by task cat/917 CPU: 12 PID: 917 Comm: cat Not tainted 5.14.0+ #3 79940a339f71eb14fc81aee1757a20d5bf13eb0e Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-1ubuntu1.1 04/01/2014 Call Trace: dumpstacklvl+0x6e/0x9c kasanreport.cold+0x112/0x117 ? alarmexpiresremaining+0x49/0x70 asanload8+0x86/0xb0 alarmexpiresremaining+0x49/0x70 idletimertgshow+0xe5/0x19b [xtIDLETIMER 11219304af9316a21bee5ba9d58f76a6b9bccc6d] devattrshow+0x3c/0x60 sysfskfseqshow+0x11d/0x1f0 ? deviceremovebinfile+0x20/0x20 kernfsseqshow+0xa4/0xb0 seqreaditer+0x29c/0x750 kernfsfopreaditer+0x25a/0x2c0 ? fsnotifyparent+0x3d1/0x570 ? ioviterinit+0x70/0x90 newsyncread+0x2a7/0x3d0 ? x64sysllseek+0x230/0x230 ? rwverifyarea+0x81/0x150 vfsread+0x17b/0x240 ksysread+0xd9/0x180 ? vfswrite+0x460/0x460 ? dosyscall64+0x16/0xc0 ? lockdephardirqson+0x79/0x120 x64sysread+0x43/0x50 dosyscall64+0x3b/0xc0 entrySYSCALL64afterhwframe+0x44/0xae RIP: 0033:0x7f0cdc819142 Code: c0 e9 c2 fe ff ff 50 48 8d 3d 3a ca 0a 00 e8 f5 19 02 00 0f 1f 44 00 00 f3 0f 1e fa 64 8b 04 25 18 00 00 00 85 c0 75 10 0f 05 <48> 3d 00 f0 ff ff 77 56 c3 0f 1f 44 00 00 48 83 ec 28 48 89 54 24 RSP: 002b:00007fff28eee5b8 EFLAGS: 00000246 ORIGRAX: 0000000000000000 RAX: ffffffffffffffda RBX: 0000000000020000 RCX: 00007f0cdc819142 RDX: 0000000000020000 RSI: 00007f0cdc032000 RDI: 0000000000000003 RBP: 00007f0cdc032000 R08: 00007f0cdc031010 R09: 0000000000000000 R10: 0000000000000022 R11: 0000000000000246 R12: 00005607e9ee31f0 R13: 0000000000000003 R14: 0000000000020000 R15: 0000000000020000

1 / 2
Source: NVD
First published (updated )
Severity
7.8
AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

In the Linux kernel, the following vulnerability has been resolved:

drm/msm/a3xx: fix error handling in a3xxgpuinit()

These error paths returned 1 on failure, instead of a negative error code. This would lead to an Oops in the caller. A second problem is that the check for "if (ret != -ENODATA)" did not work because "ret" was set to 1.

1 / 2
Source: NVD
First published (updated )
Severity
7.8
AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

In the Linux kernel, the following vulnerability has been resolved:

ASoC: codecs: wcd934x: handle channel mappping list correctly

Currently each channel is added as list to dai channel list, however there is danger of adding same channel to multiple dai channel list which endups corrupting the other list where its already added.

This patch ensures that the channel is actually free before adding to the dai channel list and also ensures that the channel is on the list before deleting it.

This check was missing previously, and we did not hit this issue as we were testing very simple usecases with sequence of amixer commands.

1 / 2
Source: NVD
First published (updated )
Severity
7.8
AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

In the Linux kernel, the following vulnerability has been resolved:

drm/msm/a6xx: Allocate enough space for GMU registers

In commit 142639a52a01 ("drm/msm/a6xx: fix crashstate capture for A650") we changed a6xxgetgmuregisters() to read 3 sets of registers. Unfortunately, we didn't change the memory allocation for the array. That leads to a KASAN warning (this was on the chromeos-5.4 kernel, which has the problematic commit backported to it):

BUG: KASAN: slab-out-of-bounds in a6xxgetgmuregisters+0x144/0x430 Write of size 8 at addr ffffff80c89432b0 by task A618-worker/209 CPU: 5 PID: 209 Comm: A618-worker Tainted: G W 5.4.156-lockdep #22 Hardware name: Google Lazor Limozeen without Touchscreen (rev5 - rev8) (DT) Call trace: dumpbacktrace+0x0/0x248 showstack+0x20/0x2c dumpstack+0x128/0x1ec printaddressdescription+0x88/0x4a0 kasanreport+0xfc/0x120 kasanreport+0x10/0x18 asanreportstore8noabort+0x1c/0x24 a6xxgetgmuregisters+0x144/0x430 a6xxgpustateget+0x330/0x25d4 msmgpucrashstatecapture+0xa0/0x84c recoverworker+0x328/0x838 kthreadworkerfn+0x32c/0x574 kthread+0x2dc/0x39c retfromfork+0x10/0x18

Allocated by task 209: kasankmalloc+0xfc/0x1c4 kasankmalloc+0xc/0x14 kmemcachealloctrace+0x1f0/0x2a0 a6xxgpustateget+0x164/0x25d4 msmgpucrashstatecapture+0xa0/0x84c recoverworker+0x328/0x838 kthreadworkerfn+0x32c/0x574 kthread+0x2dc/0x39c retfromfork+0x10/0x18

1 / 2
Source: NVD
First published (updated )

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203