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.
{ "vanir_signatures": [ { "signature_type": "Function", "deprecated": false, "signature_version": "v1", "target": { "file": "mm/slub.c", "function": "kmem_cache_init_late" }, "id": "CVE-2022-48658-00204e18", "digest": { "length": 28.0, "function_hash": "243241260315654151173211410925035820757" }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e45cc288724f0cfd497bb5920bcfa60caa335729" }, { "signature_type": "Line", "deprecated": false, "signature_version": "v1", "target": { "file": "mm/slub.c" }, "id": "CVE-2022-48658-039c0fa6", "digest": { "threshold": 0.9, "line_hashes": [ "250382171308800824080726518065099333706", "333763053365780776552483567709413511368", "170747052252694705551059237828894267341", "99499583704414981458827291034119215822", "178804029249720339835687356151012375199", "268326903485970762318815958582025440970", "146608216884342844463727609653006817472", "52454041172996786681917457486076416447", "71110407748499326351911455128710240440", "134121158576941512602948640909564362568", "184458165097729329433236209088862073825" ] }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@61703b248be993eb4997b00ae5d3318e6d8f3c5b" }, { "signature_type": "Function", "deprecated": false, "signature_version": "v1", "target": { "file": "mm/slub.c", "function": "kmem_cache_init_late" }, "id": "CVE-2022-48658-4b009df9", "digest": { "length": 28.0, "function_hash": "243241260315654151173211410925035820757" }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@61703b248be993eb4997b00ae5d3318e6d8f3c5b" }, { "signature_type": "Function", "deprecated": false, "signature_version": "v1", "target": { "file": "mm/slub.c", "function": "flush_all_cpus_locked" }, "id": "CVE-2022-48658-5a991f57", "digest": { "length": 548.0, "function_hash": "19966484360713691985485587976390776385" }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e45cc288724f0cfd497bb5920bcfa60caa335729" }, { "signature_type": "Line", "deprecated": false, "signature_version": "v1", "target": { "file": "mm/slub.c" }, "id": "CVE-2022-48658-7454325e", "digest": { "threshold": 0.9, "line_hashes": [ "250382171308800824080726518065099333706", "333763053365780776552483567709413511368", "170747052252694705551059237828894267341", "99499583704414981458827291034119215822", "178804029249720339835687356151012375199", "268326903485970762318815958582025440970", "146608216884342844463727609653006817472", "52454041172996786681917457486076416447", "71110407748499326351911455128710240440", "134121158576941512602948640909564362568", "184458165097729329433236209088862073825" ] }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@df6cb39335cf5a1b918e8dbd8ba7cd9f1d00e45a" }, { "signature_type": "Line", "deprecated": false, "signature_version": "v1", "target": { "file": "mm/slub.c" }, "id": "CVE-2022-48658-b5cb4765", "digest": { "threshold": 0.9, "line_hashes": [ "250382171308800824080726518065099333706", "333763053365780776552483567709413511368", "170747052252694705551059237828894267341", "99499583704414981458827291034119215822", "178804029249720339835687356151012375199", "268326903485970762318815958582025440970", "146608216884342844463727609653006817472", "52454041172996786681917457486076416447", "71110407748499326351911455128710240440", "134121158576941512602948640909564362568", "184458165097729329433236209088862073825" ] }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e45cc288724f0cfd497bb5920bcfa60caa335729" }, { "signature_type": "Function", "deprecated": false, "signature_version": "v1", "target": { "file": "mm/slub.c", "function": "kmem_cache_init_late" }, "id": "CVE-2022-48658-bc27f1ca", "digest": { "length": 28.0, "function_hash": "243241260315654151173211410925035820757" }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@df6cb39335cf5a1b918e8dbd8ba7cd9f1d00e45a" }, { "signature_type": "Function", "deprecated": false, "signature_version": "v1", "target": { "file": "mm/slub.c", "function": "flush_all_cpus_locked" }, "id": "CVE-2022-48658-bfbbe262", "digest": { "length": 548.0, "function_hash": "19966484360713691985485587976390776385" }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@61703b248be993eb4997b00ae5d3318e6d8f3c5b" }, { "signature_type": "Function", "deprecated": false, "signature_version": "v1", "target": { "file": "mm/slub.c", "function": "flush_all_cpus_locked" }, "id": "CVE-2022-48658-f33854d5", "digest": { "length": 548.0, "function_hash": "19966484360713691985485587976390776385" }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@df6cb39335cf5a1b918e8dbd8ba7cd9f1d00e45a" } ] }