CVE-2023-52562 json
mm/slab_common: fix slab_caches list corruption after kmem_cache_destroy()
published 2y ago modified 5mo ago also EUVD-2023-57186
- cvss
- 5.5
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.2%
- EPSS 0.2% chance of exploitation in 30 days, percentile 13%
- public exploits
- 0
- none known
Summary
In the Linux kernel, the following vulnerability has been resolved:
mm/slab_common: fix slab_caches list corruption after kmem_cache_destroy()
After the commit in Fixes:, if a module that created a slab cache does not release all of its allocated objects before destroying the cache (at rmmod time), we might end up releasing the kmem_cache object without removing it from the slab_caches list thus corrupting the list as kmem_cache_destroy() ignores the return value from shutdown_cache(), which in turn never removes the kmem_cache object from slabs_list in case __kmem_cache_shutdown() fails to release all of the cache's slabs.
This is easily observable on a kernel built with CONFIG_DEBUG_LIST=y as after that ill release the system will immediately trip on list_add, or list_del, assertions similar to the one shown below as soon as another kmem_cache gets created, or destroyed:
[ 1041.213632] list_del corruption. next->prev should be ffff89f596fb5768, but was 52f1e5016aeee75d. (next=ffff89f595a1b268) [ 1041.219165] ------------[ cut here ]------------ [ 1041.221517] kernel BUG at lib/list_debug.c:62! [ 1041.223452] invalid opcode: 0000 [#1] PREEMPT SMP PTI [ 1041.225408] CPU: 2 PID: 1852 Comm: rmmod Kdump: loaded Tainted: G B W OE 6.5.0 #15 [ 1041.228244] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS edk2-20230524-3.fc37 05/24/2023 [ 1041.231212] RIP: 0010:__list_del_entry_valid+0xae/0xb0
Another quick way to trigger this issue, in a kernel with CONFIG_SLUB=y, is to set slub_debug to poison the released objects and then just run cat /proc/slabinfo after removing the module that leaks slab objects, in which case the kernel will panic:
[ 50.954843] general protection fault, probably for non-canonical address 0xa56b6b6b6b6b6b8b: 0000 [#1] PREEMPT SMP PTI [ 50.961545] CPU: 2 PID: 1495 Comm: cat Kdump: loaded Tainted: G B W OE 6.5.0 #15 [ 50.966808] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS edk2-20230524-3.fc37 05/24/2023 [ 50.972663] RIP: 0010:get_slabinfo+0x42/0xf0
This patch fixes this issue by properly checking shutdown_cache()'s return value before taking the kmem_cache_release() branch.
Patch / fix
- Linux Linux 5.20, 6.1.56, 6.5.6, 6.6
- linux Debian 12 6.1.64-1
- linux Debian 14, Debian 13 6.5.6-1
debian advisories DEBIAN-CVE-2023-52562
- linux-raspi Ubuntu 24.04 LTS 6.7.0-1001.1
- linux-gcp-6.5 Ubuntu 22.04 LTS 6.5.0-1013.13~22.04.1
- linux-hwe-6.5 Ubuntu 22.04 LTS 6.5.0-17.17~22.04.1
- linux-oem-6.5 Ubuntu 22.04 LTS 6.5.0-1014.15
- linux-nvidia-6.5 Ubuntu 22.04 LTS 6.5.0-1014.14
- linux-oracle-6.5 Ubuntu 22.04 LTS 6.5.0-1015.15~22.04.1
- linux-lowlatency-hwe-6.5 Ubuntu 22.04 LTS 6.5.0-17.17.1.1.1~22.04.1
ubuntu advisories UBUNTU-CVE-2023-52562
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- kernel RHEL 8 4.18.0-513.9.1.el8_9
- perf RHEL 8 4.18.0-513.9.1.el8_9
- bpftool RHEL 8 4.18.0-513.9.1.el8_9
- kernel-core RHEL 8 4.18.0-513.9.1.el8_9
- kernel-tools RHEL 8 4.18.0-513.9.1.el8_9
- python3-perf RHEL 8 4.18.0-513.9.1.el8_9
- kernel-modules RHEL 8 4.18.0-513.9.1.el8_9
- kernel-zfcpdump RHEL 8 4.18.0-513.9.1.el8_9
red hat advisories RHSA-2024:0448RHSA-2023:7539RHSA-2023:7549
Is CVE-2023-52562 in your stack? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerVendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2023-52562 updated cvss 5.5
kernel: mm/slab_common: slab_caches list corruption after kmem_cache_destroy()
-
Red Hat Enterprise Linux 7 perf, kernel, bpftool, kernel-rt, python-perf, kernel-kdump, +8 moreaffected: no fix planned “Out of support scope”
-
Red Hat Enterprise Linux 8 kernel-rt, kernel-rt-kvm, kernel-rt-core, kernel-rt-modules, kernel-rt-debug-kvm, kernel-rt-debug-core, +6 more Red Hat Enterprise Linux 9 rv, perf, rtla, kernel, bpftool, libperf, +82 moreaffected: no fix available
-
Red Hat CodeReady Linux Builder (v. 8) kernel-debuginfo-common-x86_64 4.18.0-513.9.1.el8_9, kernel-debuginfo-common-aarch64 4.18.0-513.9.1.el8_9, kernel-debuginfo-common-ppc64le 4.18.0-513.9.1.el8_9fixed: vendor fix RHSA-2023:7549
-
Red Hat CodeReady Linux Builder EUS (v.8.8) kernel-debuginfo-common-x86_64 4.18.0-477.36.1.el8_8, kernel-debuginfo-common-aarch64 4.18.0-477.36.1.el8_8, kernel-debuginfo-common-ppc64le 4.18.0-477.36.1.el8_8fixed: vendor fix RHSA-2023:7539
-
Red Hat CodeReady Linux Builder EUS (v.9.2) kernel-debuginfo-common-s390x 5.14.0-284.48.1.el9_2, kernel-debuginfo-common-x86_64 5.14.0-284.48.1.el9_2, kernel-debuginfo-common-aarch64 5.14.0-284.48.1.el9_2, kernel-debuginfo-common-ppc64le 5.14.0-284.48.1.el9_2fixed: vendor fix RHSA-2024:0448
-
Red Hat Enterprise Linux AppStream (v. 9) rhel9/flatpak-sdk el9-9030020230825103938.1706180712, rhel9/flatpak-runtime el9-9030020230825103938.1706180714fixed: vendor fix RHBA-2024:0611
-
Red Hat Enterprise Linux AppStream EUS (v.9.2) perf 5.14.0-284.48.1.el9_2, rtla 5.14.0-284.48.1.el9_2, kernel-devel-matched 5.14.0-284.48.1.el9_2, kernel-64k-devel-matched 5.14.0-284.48.1.el9_2, kernel-debug-devel-matched 5.14.0-284.48.1.el9_2, kernel-debuginfo-common-s390x 5.14.0-284.48.1.el9_2, +5 morefixed: vendor fix RHSA-2024:0448
-
Red Hat Enterprise Linux BaseOS (v. 8) perf 4.18.0-513.9.1.el8_9, kernel 4.18.0-513.9.1.el8_9, bpftool 4.18.0-513.9.1.el8_9, kernel-core 4.18.0-513.9.1.el8_9, kernel-tools 4.18.0-513.9.1.el8_9, python3-perf 4.18.0-513.9.1.el8_9, +15 morefixed: vendor fix RHSA-2023:7549
show 3 moreshow fewer
-
Red Hat Enterprise Linux BaseOS EUS (v.8.8) perf 4.18.0-477.36.1.el8_8, kernel 4.18.0-477.36.1.el8_8, bpftool 4.18.0-477.36.1.el8_8, kernel-core 4.18.0-477.36.1.el8_8, kernel-tools 4.18.0-477.36.1.el8_8, python3-perf 4.18.0-477.36.1.el8_8, +15 morefixed: vendor fix RHSA-2023:7539
-
Red Hat Enterprise Linux BaseOS EUS (v.9.2) bpftool 7.0.0-284.48.1.el9_2, kernel 5.14.0-284.48.1.el9_2, kernel-64k 5.14.0-284.48.1.el9_2, kernel-core 5.14.0-284.48.1.el9_2, kernel-tools 5.14.0-284.48.1.el9_2, python3-perf 5.14.0-284.48.1.el9_2, +28 morefixed: vendor fix RHSA-2024:0448
-
Red Hat Enterprise Linux 6 perf, kernel, python-perf, kernel-kdump, kernel-firmware, kernel-bootwrapper, +1 morenot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- partial
- Assessed
- 2y ago
Exploit prediction
0.22% chance of exploitation in the next 30 days, higher than 13% of all scored CVEs (FIRST EPSS, 2026-11-20).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 3.1 | 5.5 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
Affected products
- Linux Linux
Classification
- Technology feeds
References
Sources
- CVE List CVE-2023-52562
- NVD CVE-2023-52562
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.