In the Linux kernel, the following vulnerability has been resolved:
rcu/rcuscale: Stop kfreescalethread thread(s) after unloading rcuscale
Running the 'kfreercutest' test case [1] results in a splat [2]. The root cause is the kfreescalethread thread(s) continue running after unloading the rcuscale module. This commit fixes that isue by invoking kfreescalecleanup() from rcuscalecleanup() when removing the rcuscale module.
[1] modprobe rcuscale kfreercutest=1 // After some time rmmod rcuscale rmmod torture
[2] BUG: unable to handle page fault for address: ffffffffc0601a87 #PF: supervisor instruction fetch in kernel mode #PF: errorcode(0x0010) - not-present page PGD 11de4f067 P4D 11de4f067 PUD 11de51067 PMD 112f4d067 PTE 0 Oops: 0010 [#1] PREEMPT SMP NOPTI CPU: 1 PID: 1798 Comm: kfreescalethr Not tainted 6.3.0-rc1-rcu+ #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 0.0.0 02/06/2015 RIP: 0010:0xffffffffc0601a87 Code: Unable to access opcode bytes at 0xffffffffc0601a5d. RSP: 0018:ffffb25bc2e57e18 EFLAGS: 00010297 RAX: 0000000000000000 RBX: ffffffffc061f0b6 RCX: 0000000000000000 RDX: 0000000000000000 RSI: ffffffff962fd0de RDI: ffffffff962fd0de RBP: ffffb25bc2e57ea8 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000001 R11: 0000000000000001 R12: 0000000000000000 R13: 0000000000000000 R14: 000000000000000a R15: 00000000001c1dbe FS: 0000000000000000(0000) GS:ffff921fa2200000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffffffc0601a5d CR3: 000000011de4c006 CR4: 0000000000370ee0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: <TASK> ? kvfreecallrcu+0xf0/0x3a0 ? kthread+0xf3/0x120 ? kthreadcompleteandexit+0x20/0x20 ? retfromfork+0x1f/0x30 </TASK> Modules linked in: rfkill sunrpc ... [last unloaded: torture] CR2: ffffffffc0601a87 ---[ end trace 0000000000000000 ]---
{
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/53xxx/CVE-2023-53291.json"
}"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2023-53291.json"
[
{
"id": "CVE-2023-53291-026d027e",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@1dd7547c7610723b2b6afe1a3c4ddb2bde63387c",
"signature_version": "v1",
"deprecated": false,
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"149088632644074552613562403157876110254",
"20584124005383163914462673166500980067",
"280941951268142427880580407006770735628"
]
},
"target": {
"file": "kernel/rcu/rcuscale.c"
}
},
{
"id": "CVE-2023-53291-0bed60c5",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@604d6a5ff718874904b0fe614878a42b42c0d699",
"signature_version": "v1",
"deprecated": false,
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"149088632644074552613562403157876110254",
"20584124005383163914462673166500980067",
"280941951268142427880580407006770735628"
]
},
"target": {
"file": "kernel/rcu/rcuscale.c"
}
},
{
"id": "CVE-2023-53291-0e7c8ec8",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@29b1da4f90fc42c91beb4e400d926194925ad31b",
"signature_version": "v1",
"deprecated": false,
"signature_type": "Function",
"digest": {
"function_hash": "338731300557816998206316345443886584185",
"length": 1846.0
},
"target": {
"function": "rcu_scale_cleanup",
"file": "kernel/rcu/rcuscale.c"
}
},
{
"id": "CVE-2023-53291-22c3081d",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f766d45ab294871a3d588ee76c666852f151cad9",
"signature_version": "v1",
"deprecated": false,
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"149088632644074552613562403157876110254",
"20584124005383163914462673166500980067",
"280941951268142427880580407006770735628"
]
},
"target": {
"file": "kernel/rcu/rcuscale.c"
}
},
{
"id": "CVE-2023-53291-4c098996",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f766d45ab294871a3d588ee76c666852f151cad9",
"signature_version": "v1",
"deprecated": false,
"signature_type": "Function",
"digest": {
"function_hash": "338731300557816998206316345443886584185",
"length": 1846.0
},
"target": {
"function": "rcu_scale_cleanup",
"file": "kernel/rcu/rcuscale.c"
}
},
{
"id": "CVE-2023-53291-860b6bc6",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@604d6a5ff718874904b0fe614878a42b42c0d699",
"signature_version": "v1",
"deprecated": false,
"signature_type": "Function",
"digest": {
"function_hash": "338731300557816998206316345443886584185",
"length": 1846.0
},
"target": {
"function": "rcu_scale_cleanup",
"file": "kernel/rcu/rcuscale.c"
}
},
{
"id": "CVE-2023-53291-9b3525bd",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@23fc8df26dead16687ae6eb47b0561a4a832e2f6",
"signature_version": "v1",
"deprecated": false,
"signature_type": "Function",
"digest": {
"function_hash": "338731300557816998206316345443886584185",
"length": 1846.0
},
"target": {
"function": "rcu_scale_cleanup",
"file": "kernel/rcu/rcuscale.c"
}
},
{
"id": "CVE-2023-53291-9c863bc4",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b8a6ba524d41f4da102e65f90498d9a910839621",
"signature_version": "v1",
"deprecated": false,
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"149088632644074552613562403157876110254",
"20584124005383163914462673166500980067",
"280941951268142427880580407006770735628"
]
},
"target": {
"file": "kernel/rcu/rcuscale.c"
}
},
{
"id": "CVE-2023-53291-9d5b3409",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b8a6ba524d41f4da102e65f90498d9a910839621",
"signature_version": "v1",
"deprecated": false,
"signature_type": "Function",
"digest": {
"function_hash": "338731300557816998206316345443886584185",
"length": 1846.0
},
"target": {
"function": "rcu_scale_cleanup",
"file": "kernel/rcu/rcuscale.c"
}
},
{
"id": "CVE-2023-53291-cd298c1e",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@29b1da4f90fc42c91beb4e400d926194925ad31b",
"signature_version": "v1",
"deprecated": false,
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"149088632644074552613562403157876110254",
"20584124005383163914462673166500980067",
"280941951268142427880580407006770735628"
]
},
"target": {
"file": "kernel/rcu/rcuscale.c"
}
},
{
"id": "CVE-2023-53291-e89b2de0",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@23fc8df26dead16687ae6eb47b0561a4a832e2f6",
"signature_version": "v1",
"deprecated": false,
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"149088632644074552613562403157876110254",
"20584124005383163914462673166500980067",
"280941951268142427880580407006770735628"
]
},
"target": {
"file": "kernel/rcu/rcuscale.c"
}
},
{
"id": "CVE-2023-53291-fd6f4367",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@1dd7547c7610723b2b6afe1a3c4ddb2bde63387c",
"signature_version": "v1",
"deprecated": false,
"signature_type": "Function",
"digest": {
"function_hash": "338731300557816998206316345443886584185",
"length": 1846.0
},
"target": {
"function": "rcu_scale_cleanup",
"file": "kernel/rcu/rcuscale.c"
}
}
]