In the Linux kernel, the following vulnerability has been resolved:
mm: slub: fix flushcpuslab()/_freeslab() invocations in task context.
Commit 5a836bf6b09f ("mm: slub: move flushcpuslab() invocations freeslab() invocations out of IRQ context") moved all flushcpuslab() invocations to the global workqueue to avoid a problem related with deactivateslab()/freeslab() being called from an IRQ context on PREEMPTRT kernels.
When the flushallcpulocked() function is called from a task context it may happen that a workqueue with WQMEM_RECLAIM bit set ends up flushing the global workqueue, this will cause a dependency issue.
workqueue: WQMEMRECLAIM nvme-delete-wq:nvmedeletectrlwork [nvmecore] is flushing !WQMEMRECLAIM events:flushcpuslab WARNING: CPU: 37 PID: 410 at kernel/workqueue.c:2637 checkflushdependency+0x10a/0x120 Workqueue: nvme-delete-wq nvmedeletectrlwork [nvmecore] RIP: 0010:checkflushdependency+0x10a/0x120[ 453.262125] Call Trace: _flushwork.isra.0+0xbf/0x220 ? _queuework+0x1dc/0x420 flushallcpuslocked+0xfb/0x120 _kmemcacheshutdown+0x2b/0x320 kmemcachedestroy+0x49/0x100 biosetexit+0x143/0x190 blkreleasequeue+0xb9/0x100 kobjectcleanup+0x37/0x130 nvmefcctrlfree+0xc6/0x150 [nvmefc] nvmefreectrl+0x1ac/0x2b0 [nvme_core]
Fix this bug by creating a workqueue for the flush operation with the WQMEMRECLAIM bit set.
{
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/48xxx/CVE-2022-48658.json",
"cna_assigner": "Linux"
}[
{
"digest": {
"threshold": 0.9,
"line_hashes": [
"250382171308800824080726518065099333706",
"333763053365780776552483567709413511368",
"170747052252694705551059237828894267341",
"99499583704414981458827291034119215822",
"178804029249720339835687356151012375199",
"268326903485970762318815958582025440970",
"146608216884342844463727609653006817472",
"52454041172996786681917457486076416447",
"71110407748499326351911455128710240440",
"134121158576941512602948640909564362568",
"184458165097729329433236209088862073825"
]
},
"id": "CVE-2022-48658-039c0fa6",
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@61703b248be993eb4997b00ae5d3318e6d8f3c5b",
"target": {
"file": "mm/slub.c"
},
"signature_version": "v1",
"deprecated": false
},
{
"digest": {
"length": 28.0,
"function_hash": "243241260315654151173211410925035820757"
},
"id": "CVE-2022-48658-4b009df9",
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@61703b248be993eb4997b00ae5d3318e6d8f3c5b",
"target": {
"function": "kmem_cache_init_late",
"file": "mm/slub.c"
},
"signature_version": "v1",
"deprecated": false
},
{
"digest": {
"threshold": 0.9,
"line_hashes": [
"250382171308800824080726518065099333706",
"333763053365780776552483567709413511368",
"170747052252694705551059237828894267341",
"99499583704414981458827291034119215822",
"178804029249720339835687356151012375199",
"268326903485970762318815958582025440970",
"146608216884342844463727609653006817472",
"52454041172996786681917457486076416447",
"71110407748499326351911455128710240440",
"134121158576941512602948640909564362568",
"184458165097729329433236209088862073825"
]
},
"id": "CVE-2022-48658-7454325e",
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@df6cb39335cf5a1b918e8dbd8ba7cd9f1d00e45a",
"target": {
"file": "mm/slub.c"
},
"signature_version": "v1",
"deprecated": false
},
{
"digest": {
"length": 28.0,
"function_hash": "243241260315654151173211410925035820757"
},
"id": "CVE-2022-48658-bc27f1ca",
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@df6cb39335cf5a1b918e8dbd8ba7cd9f1d00e45a",
"target": {
"function": "kmem_cache_init_late",
"file": "mm/slub.c"
},
"signature_version": "v1",
"deprecated": false
},
{
"digest": {
"length": 548.0,
"function_hash": "19966484360713691985485587976390776385"
},
"id": "CVE-2022-48658-bfbbe262",
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@61703b248be993eb4997b00ae5d3318e6d8f3c5b",
"target": {
"function": "flush_all_cpus_locked",
"file": "mm/slub.c"
},
"signature_version": "v1",
"deprecated": false
},
{
"digest": {
"length": 548.0,
"function_hash": "19966484360713691985485587976390776385"
},
"id": "CVE-2022-48658-f33854d5",
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@df6cb39335cf5a1b918e8dbd8ba7cd9f1d00e45a",
"target": {
"function": "flush_all_cpus_locked",
"file": "mm/slub.c"
},
"signature_version": "v1",
"deprecated": false
}
]
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-48658.json"