In the Linux kernel, the following vulnerability has been resolved:
rcu: Avoid stack overflow due to _rcuirqentercheck_tick() being kprobe-ed
Registering a kprobe on _rcuirqenterchecktick() can cause kernel stack overflow as shown below. This issue can be reproduced by enabling CONFIGNOHZFULL and booting the kernel with argument "nohz_full=", and then giving the following commands at the shell prompt:
# cd /sys/kernel/tracing/ # echo 'p:mp1 _rcuirqenterchecktick' >> kprobeevents # echo 1 > events/kprobes/enable
This commit therefore adds _rcuirqenterchecktick() to the kprobes blacklist using NOKPROBESYMBOL().
Insufficient stack space to handle exception! ESR: 0x00000000f2000004 -- BRK (AArch64) FAR: 0x0000ffffccf3e510 Task stack: [0xffff80000ad30000..0xffff80000ad38000] IRQ stack: [0xffff800008050000..0xffff800008058000] Overflow stack: [0xffff089c36f9f310..0xffff089c36fa0310] CPU: 5 PID: 190 Comm: bash Not tainted 6.2.0-rc2-00320-g1f5abbd77e2c #19 Hardware name: linux,dummy-virt (DT) pstate: 400003c5 (nZcv DAIF -PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : _rcuirqenterchecktick+0x0/0x1b8 lr : ctnmienter+0x11c/0x138 sp : ffff80000ad30080 x29: ffff80000ad30080 x28: ffff089c82e20000 x27: 0000000000000000 x26: 0000000000000000 x25: ffff089c02a8d100 x24: 0000000000000000 x23: 00000000400003c5 x22: 0000ffffccf3e510 x21: ffff089c36fae148 x20: ffff80000ad30120 x19: ffffa8da8fcce148 x18: 0000000000000000 x17: 0000000000000000 x16: 0000000000000000 x15: ffffa8da8e44ea6c x14: ffffa8da8e44e968 x13: ffffa8da8e03136c x12: 1fffe113804d6809 x11: ffff6113804d6809 x10: 0000000000000a60 x9 : dfff800000000000 x8 : ffff089c026b404f x7 : 00009eec7fb297f7 x6 : 0000000000000001 x5 : ffff80000ad30120 x4 : dfff800000000000 x3 : ffffa8da8e3016f4 x2 : 0000000000000003 x1 : 0000000000000000 x0 : 0000000000000000 Kernel panic - not syncing: kernel stack overflow CPU: 5 PID: 190 Comm: bash Not tainted 6.2.0-rc2-00320-g1f5abbd77e2c #19 Hardware name: linux,dummy-virt (DT) Call trace: dumpbacktrace+0xf8/0x108 showstack+0x20/0x30 dumpstacklvl+0x68/0x84 dumpstack+0x1c/0x38 panic+0x214/0x404 addtaint+0x0/0xf8 panicbadstack+0x144/0x160 handlebadstack+0x38/0x58 _badstack+0x78/0x7c _rcuirqenterchecktick+0x0/0x1b8 arm64enterel1dbg.isra.0+0x14/0x20 el1dbg+0x2c/0x90 el1h64synchandler+0xcc/0xe8 el1h64sync+0x64/0x68 _rcuirqenterchecktick+0x0/0x1b8 arm64enterel1dbg.isra.0+0x14/0x20 el1dbg+0x2c/0x90 el1h64synchandler+0xcc/0xe8 el1h64sync+0x64/0x68 _rcuirqenterchecktick+0x0/0x1b8 arm64enterel1dbg.isra.0+0x14/0x20 el1dbg+0x2c/0x90 el1h64synchandler+0xcc/0xe8 el1h64sync+0x64/0x68 _rcuirqenterchecktick+0x0/0x1b8 [...] el1dbg+0x2c/0x90 el1h64synchandler+0xcc/0xe8 el1h64sync+0x64/0x68 _rcuirqenterchecktick+0x0/0x1b8 arm64enterel1dbg.isra.0+0x14/0x20 el1dbg+0x2c/0x90 el1h64synchandler+0xcc/0xe8 el1h64sync+0x64/0x68 _rcuirqenterchecktick+0x0/0x1b8 arm64enterel1dbg.isra.0+0x14/0x20 el1dbg+0x2c/0x90 el1h64synchandler+0xcc/0xe8 el1h64sync+0x64/0x68 _rcuirqenterchecktick+0x0/0x1b8 el1interrupt+0x28/0x60 el1h64irqhandler+0x18/0x28 el1h64irq+0x64/0x68 _ftracesetclreventnolock+0x98/0x198 _ftracesetclrevent+0x58/0x80 systemenablewrite+0x144/0x178 vfswrite+0x174/0x738 ksyswrite+0xd0/0x188 _arm64syswrite+0x4c/0x60 invokesyscall+0x64/0x180 el0svccommon.constprop.0+0x84/0x160 doel0svc+0x48/0xe8 el0svc+0x34/0xd0 el0t64synchandler+0xb8/0xc0 el0t64sync+0x190/0x194 SMP: stopping secondary CPUs Kernel Offset: 0x28da86000000 from 0xffff800008000000 PHYS_OFFSET: 0xfffff76600000000 CPU features: 0x00000,01a00100,0000421b Memory Limit: none
{
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/53xxx/CVE-2023-53655.json"
}[
{
"digest": {
"threshold": 0.9,
"line_hashes": [
"262162828855325775418455477568411101266",
"331145889073621947746872864888475954034",
"215737021769033434732841897746541427225",
"141699162649690708237880811771135225928"
]
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4c3d1a6720aefb02403ddfebe85db521d3af2c3b",
"deprecated": false,
"id": "CVE-2023-53655-7c786574",
"signature_type": "Line",
"target": {
"file": "kernel/rcu/tree.c"
},
"signature_version": "v1"
},
{
"digest": {
"threshold": 0.9,
"line_hashes": [
"262162828855325775418455477568411101266",
"331145889073621947746872864888475954034",
"18735356149127583359191844784156146074",
"151657174368180865758158742926087099298"
]
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@93b6295f677d96b73cfcb703532f6c7369a60d96",
"deprecated": false,
"id": "CVE-2023-53655-a9db7f29",
"signature_type": "Line",
"target": {
"file": "kernel/rcu/tree.c"
},
"signature_version": "v1"
},
{
"digest": {
"threshold": 0.9,
"line_hashes": [
"262162828855325775418455477568411101266",
"331145889073621947746872864888475954034",
"18735356149127583359191844784156146074",
"151657174368180865758158742926087099298"
]
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c8a3341b339285495cf7c8d061d659465f2311e0",
"deprecated": false,
"id": "CVE-2023-53655-b90e2b0a",
"signature_type": "Line",
"target": {
"file": "kernel/rcu/tree.c"
},
"signature_version": "v1"
},
{
"digest": {
"threshold": 0.9,
"line_hashes": [
"262162828855325775418455477568411101266",
"331145889073621947746872864888475954034",
"18735356149127583359191844784156146074",
"151657174368180865758158742926087099298"
]
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@7a29fb4a4771124bc61de397dbfc1554dbbcc19c",
"deprecated": false,
"id": "CVE-2023-53655-c6eaa8d8",
"signature_type": "Line",
"target": {
"file": "kernel/rcu/tree.c"
},
"signature_version": "v1"
},
{
"digest": {
"threshold": 0.9,
"line_hashes": [
"262162828855325775418455477568411101266",
"331145889073621947746872864888475954034",
"18735356149127583359191844784156146074",
"151657174368180865758158742926087099298"
]
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@7b5a97333e920b69356e097f185bdc51d61e66ee",
"deprecated": false,
"id": "CVE-2023-53655-ea968f82",
"signature_type": "Line",
"target": {
"file": "kernel/rcu/tree.c"
},
"signature_version": "v1"
},
{
"digest": {
"threshold": 0.9,
"line_hashes": [
"262162828855325775418455477568411101266",
"331145889073621947746872864888475954034",
"215737021769033434732841897746541427225",
"141699162649690708237880811771135225928"
]
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@eb18bc5a8678f431c500e6da1b8b5f34478d5bc1",
"deprecated": false,
"id": "CVE-2023-53655-f55f1913",
"signature_type": "Line",
"target": {
"file": "kernel/rcu/tree.c"
},
"signature_version": "v1"
}
]
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-53655.json"