CVE-2023-53029

Source
https://cve.org/CVERecord?id=CVE-2023-53029
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2023-53029.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2023-53029
Downstream
Related
Published
2025-03-27T16:43:58.234Z
Modified
2026-03-20T12:32:55.358893Z
Summary
octeontx2-pf: Fix the use of GFP_KERNEL in atomic context on rt
Details

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

octeontx2-pf: Fix the use of GFP_KERNEL in atomic context on rt

The commit 4af1b64f80fb ("octeontx2-pf: Fix lmtst ID used in aura free") uses the get/putcpu() to protect the usage of percpu pointer in ->aurafreeptr() callback, but it also unnecessarily disable the preemption for the blockable memory allocation. The commit 87b93b678e95 ("octeontx2-pf: Avoid use of GFPKERNEL in atomic context") tried to fix these sleep inside atomic warnings. But it only fix the one for the non-rt kernel. For the rt kernel, we still get the similar warnings like below. BUG: sleeping function called from invalid context at kernel/locking/spinlockrt.c:46 inatomic(): 1, irqsdisabled(): 0, nonblock: 0, pid: 1, name: swapper/0 preemptcount: 1, expected: 0 RCU nest depth: 0, expected: 0 3 locks held by swapper/0/1: #0: ffff800009fc5fe8 (rtnlmutex){+.+.}-{3:3}, at: rtnllock+0x24/0x30 #1: ffff000100c276c0 (&mbox->lock){+.+.}-{3:3}, at: otx2inithwresources+0x8c/0x3a4 #2: ffffffbfef6537e0 (&cpurcache->lock){+.+.}-{2:2}, at: allociovafast+0x1ac/0x2ac Preemption disabled at: [<ffff800008b1908c>] otx2rqaurapoolinit+0x14c/0x284 CPU: 20 PID: 1 Comm: swapper/0 Tainted: G W 6.2.0-rc3-rt1-yocto-preempt-rt #1 Hardware name: Marvell OcteonTX CN96XX board (DT) Call trace: dumpbacktrace.part.0+0xe8/0xf4 showstack+0x20/0x30 dumpstacklvl+0x9c/0xd8 dump_stack+0x18/0x34 __mightresched+0x188/0x224 rtspinlock+0x64/0x110 allociovafast+0x1ac/0x2ac iommudmaallociova+0xd4/0x110 __iommudmamap+0x80/0x144 iommudmamappage+0xe8/0x260 dmamappageattrs+0xb4/0xc0 __otx2allocrbuf+0x90/0x150 otx2rqaurapoolinit+0x1c8/0x284 otx2inithwresources+0xe4/0x3a4 otx2open+0xf0/0x610 __dev_open+0x104/0x224 _devchangeflags+0x1e4/0x274 devchangeflags+0x2c/0x7c icopendevs+0x124/0x2f8 ipautoconfig+0x180/0x42c dooneinitcall+0x90/0x4dc dobasicsetup+0x10c/0x14c kernelinitfreeable+0x10c/0x13c kernelinit+0x2c/0x140 retfromfork+0x10/0x20

Of course, we can shuffle the get/putcpu() to only wrap the invocation of ->aurafreeptr() as what commit 87b93b678e95 does. But there are only two ->aurafreeptr() callbacks, otx2aurafreeptr() and cn10kaurafreeptr(). There is no usage of perpcu variable in the otx2aurafreeptr() at all, so the get/putcpu() seems redundant to it. We can move the get/putcpu() into the corresponding callback which really has the percpu variable usage and avoid the sprinkling of get/putcpu() in several places.

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/53xxx/CVE-2023-53029.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
6ea5273c71dd2d07c0a2459594eb34bc087939f7
Fixed
29e9c67bf3271067735c188e95cf3631ecd64d58
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
667ce030bdfb62a86266444b2c3fd6ab98b9df9b
Fixed
659518e013d6bd562bb0f1d2d9f99d0ac54720e2
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
4af1b64f80fbe1275fb02c5f1c0cef099a4a231f
Fixed
55ba18dc62deff5910c0fa64486dea1ff20832ff
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Last affected
b754dc7c933dd9464223f64b10d33d68ab086cc6

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2023-53029.json"