CVE-2023-52489
publishedmm/sparsemem: fix race in accessing memory_section->usage
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Linux | — | Linuxf46edbd1b1516da1fb34c917775168d5df576f78 to < 90ad17575d26874287271127d43ef3c2af876cea · f46edbd1b1516da1fb34c917775168d5df576f78 to < b448de2459b6d62a53892487ab18b7d823ff0529 · f46edbd1b1516da1fb34c917775168d5df576f78 to < 68ed9e33324021e9d6b798e9db00ca3093d2012a · f46edbd1b1516da1fb34c917775168d5df576f78 to < 70064241f2229f7ba7b9599a98f68d9142e81a97 · f46edbd1b1516da1fb34c917775168d5df576f78 to < 3a01daace71b521563c38bbbf874e14c3e58adb7 · f46edbd1b1516da1fb34c917775168d5df576f78 to < 5ec8e8ea8b7783fab150cf86404fc38cb4db8800 · Other versions: unaffected | Affected | Not stated | Linux |
| Linux | — | Linux5.3 (affected) · 0 to < 5.3 (unaffected · semver) · 5.10.210 through 5.10.* (unaffected · semver) · 5.15.149 through 5.15.* (unaffected · semver) · 6.1.76 through 6.1.* (unaffected · semver) · 6.6.15 through 6.6.* (unaffected · semver) · 6.7.3 through 6.7.* (unaffected · semver) · 6.8 and later (unaffected · original_commit_for_fix) · Other versions: affected | Version-specific | Not stated | Linux |
| Amazon Linux | AL2 | Release evaluation | Not Affected; No Fix Planned | Not stated | Amazon Linux assessment |
| Amazon Linux | AL2 | Release evaluationALAS2KERNEL-5.10-2024-053 | Fixed | Not stated | Amazon Linux assessment |
| Amazon Linux | AL2 | Release evaluationALAS2KERNEL-5.15-2024-039 | Fixed | Not stated | Amazon Linux assessment |
| Amazon Linux | AL2023 | Release evaluationALAS2023-2024-517 | Fixed | Not stated | Amazon Linux assessment |
| AlmaLinux | 8 | bpftool | Advisory build | 4.18.0-553.el8_10 | ALSA-2024:3138 |
| Debian | bullseye | linux | Advisory build | 5.10.216-1 | DSA-5681-1 |
Show 98 more entries
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| AlmaLinux | 8 | kernel | Advisory build | 4.18.0-553.el8_10 | ALSA-2024:3138 |
| AlmaLinux | 8 | kernel-abi-stablelists | Advisory build | 4.18.0-553.el8_10 | ALSA-2024:3138 |
| AlmaLinux | 8 | kernel-core | Advisory build | 4.18.0-553.el8_10 | ALSA-2024:3138 |
| AlmaLinux | 8 | kernel-cross-headers | Advisory build | 4.18.0-553.el8_10 | ALSA-2024:3138 |
| AlmaLinux | 8 | kernel-debug | Advisory build | 4.18.0-553.el8_10 | ALSA-2024:3138 |
| AlmaLinux | 8 | kernel-debug-core | Advisory build | 4.18.0-553.el8_10 | ALSA-2024:3138 |
| AlmaLinux | 8 | kernel-debug-devel | Advisory build | 4.18.0-553.el8_10 | ALSA-2024:3138 |
| AlmaLinux | 8 | kernel-debug-modules | Advisory build | 4.18.0-553.el8_10 | ALSA-2024:3138 |
| AlmaLinux | 8 | kernel-debug-modules-extra | Advisory build | 4.18.0-553.el8_10 | ALSA-2024:3138 |
| AlmaLinux | 8 | kernel-devel | Advisory build | 4.18.0-553.el8_10 | ALSA-2024:3138 |
| AlmaLinux | 8 | kernel-doc | Advisory build | 4.18.0-553.el8_10 | ALSA-2024:3138 |
| AlmaLinux | 8 | kernel-headers | Advisory build | 4.18.0-553.el8_10 | ALSA-2024:3138 |
| AlmaLinux | 8 | kernel-modules | Advisory build | 4.18.0-553.el8_10 | ALSA-2024:3138 |
| AlmaLinux | 8 | kernel-modules-extra | Advisory build | 4.18.0-553.el8_10 | ALSA-2024:3138 |
| AlmaLinux | 8 | kernel-rt | Advisory build | 4.18.0-553.rt7.342.el8_10 | ALSA-2024:2950 |
| AlmaLinux | 8 | kernel-rt-core | Advisory build | 4.18.0-553.rt7.342.el8_10 | ALSA-2024:2950 |
| AlmaLinux | 8 | kernel-rt-debug | Advisory build | 4.18.0-553.rt7.342.el8_10 | ALSA-2024:2950 |
| AlmaLinux | 8 | kernel-rt-debug-core | Advisory build | 4.18.0-553.rt7.342.el8_10 | ALSA-2024:2950 |
| AlmaLinux | 8 | kernel-rt-debug-devel | Advisory build | 4.18.0-553.rt7.342.el8_10 | ALSA-2024:2950 |
| AlmaLinux | 8 | kernel-rt-debug-kvm | Advisory build | 4.18.0-553.rt7.342.el8_10 | ALSA-2024:2950 |
| AlmaLinux | 8 | kernel-rt-debug-modules | Advisory build | 4.18.0-553.rt7.342.el8_10 | ALSA-2024:2950 |
| AlmaLinux | 8 | kernel-rt-debug-modules-extra | Advisory build | 4.18.0-553.rt7.342.el8_10 | ALSA-2024:2950 |
| AlmaLinux | 8 | kernel-rt-devel | Advisory build | 4.18.0-553.rt7.342.el8_10 | ALSA-2024:2950 |
| AlmaLinux | 8 | kernel-rt-kvm | Advisory build | 4.18.0-553.rt7.342.el8_10 | ALSA-2024:2950 |
| AlmaLinux | 8 | kernel-rt-modules | Advisory build | 4.18.0-553.rt7.342.el8_10 | ALSA-2024:2950 |
| AlmaLinux | 8 | kernel-rt-modules-extra | Advisory build | 4.18.0-553.rt7.342.el8_10 | ALSA-2024:2950 |
| AlmaLinux | 8 | kernel-tools | Advisory build | 4.18.0-553.el8_10 | ALSA-2024:3138 |
| AlmaLinux | 8 | kernel-tools-libs | Advisory build | 4.18.0-553.el8_10 | ALSA-2024:3138 |
| AlmaLinux | 8 | kernel-tools-libs-devel | Advisory build | 4.18.0-553.el8_10 | ALSA-2024:3138 |
| AlmaLinux | 8 | kernel-zfcpdump | Advisory build | 4.18.0-553.el8_10 | ALSA-2024:3138 |
| AlmaLinux | 8 | kernel-zfcpdump-core | Advisory build | 4.18.0-553.el8_10 | ALSA-2024:3138 |
| AlmaLinux | 8 | kernel-zfcpdump-devel | Advisory build | 4.18.0-553.el8_10 | ALSA-2024:3138 |
| AlmaLinux | 8 | kernel-zfcpdump-modules | Advisory build | 4.18.0-553.el8_10 | ALSA-2024:3138 |
| AlmaLinux | 8 | kernel-zfcpdump-modules-extra | Advisory build | 4.18.0-553.el8_10 | ALSA-2024:3138 |
| AlmaLinux | 8 | perf | Advisory build | 4.18.0-553.el8_10 | ALSA-2024:3138 |
| AlmaLinux | 8 | python3-perf | Advisory build | 4.18.0-553.el8_10 | ALSA-2024:3138 |
| AlmaLinux | 9 | bpftool | Advisory build | 7.3.0-427.13.1.el9_4 | ALSA-2024:2394 |
| AlmaLinux | 9 | kernel | Advisory build | 5.14.0-427.13.1.el9_4 | ALSA-2024:2394 |
| AlmaLinux | 9 | kernel-64k | Advisory build | 5.14.0-427.13.1.el9_4 | ALSA-2024:2394 |
| AlmaLinux | 9 | kernel-64k-core | Advisory build | 5.14.0-427.13.1.el9_4 | ALSA-2024:2394 |
| AlmaLinux | 9 | kernel-64k-debug | Advisory build | 5.14.0-427.13.1.el9_4 | ALSA-2024:2394 |
| AlmaLinux | 9 | kernel-64k-debug-core | Advisory build | 5.14.0-427.13.1.el9_4 | ALSA-2024:2394 |
| AlmaLinux | 9 | kernel-64k-debug-devel | Advisory build | 5.14.0-427.13.1.el9_4 | ALSA-2024:2394 |
| AlmaLinux | 9 | kernel-64k-debug-devel-matched | Advisory build | 5.14.0-427.13.1.el9_4 | ALSA-2024:2394 |
| AlmaLinux | 9 | kernel-64k-debug-modules | Advisory build | 5.14.0-427.13.1.el9_4 | ALSA-2024:2394 |
| AlmaLinux | 9 | kernel-64k-debug-modules-core | Advisory build | 5.14.0-427.13.1.el9_4 | ALSA-2024:2394 |
| AlmaLinux | 9 | kernel-64k-debug-modules-extra | Advisory build | 5.14.0-427.13.1.el9_4 | ALSA-2024:2394 |
| AlmaLinux | 9 | kernel-64k-devel | Advisory build | 5.14.0-427.13.1.el9_4 | ALSA-2024:2394 |
| AlmaLinux | 9 | kernel-64k-devel-matched | Advisory build | 5.14.0-427.13.1.el9_4 | ALSA-2024:2394 |
| AlmaLinux | 9 | kernel-64k-modules | Advisory build | 5.14.0-427.13.1.el9_4 | ALSA-2024:2394 |
| AlmaLinux | 9 | kernel-64k-modules-core | Advisory build | 5.14.0-427.13.1.el9_4 | ALSA-2024:2394 |
| AlmaLinux | 9 | kernel-64k-modules-extra | Advisory build | 5.14.0-427.13.1.el9_4 | ALSA-2024:2394 |
| AlmaLinux | 9 | kernel-abi-stablelists | Advisory build | 5.14.0-427.13.1.el9_4 | ALSA-2024:2394 |
| AlmaLinux | 9 | kernel-core | Advisory build | 5.14.0-427.13.1.el9_4 | ALSA-2024:2394 |
| AlmaLinux | 9 | kernel-cross-headers | Advisory build | 5.14.0-427.13.1.el9_4 | ALSA-2024:2394 |
| AlmaLinux | 9 | kernel-debug | Advisory build | 5.14.0-427.13.1.el9_4 | ALSA-2024:2394 |
| AlmaLinux | 9 | kernel-debug-core | Advisory build | 5.14.0-427.13.1.el9_4 | ALSA-2024:2394 |
| AlmaLinux | 9 | kernel-debug-devel | Advisory build | 5.14.0-427.13.1.el9_4 | ALSA-2024:2394 |
| AlmaLinux | 9 | kernel-debug-devel-matched | Advisory build | 5.14.0-427.13.1.el9_4 | ALSA-2024:2394 |
| AlmaLinux | 9 | kernel-debug-modules | Advisory build | 5.14.0-427.13.1.el9_4 | ALSA-2024:2394 |
| AlmaLinux | 9 | kernel-debug-modules-core | Advisory build | 5.14.0-427.13.1.el9_4 | ALSA-2024:2394 |
| AlmaLinux | 9 | kernel-debug-modules-extra | Advisory build | 5.14.0-427.13.1.el9_4 | ALSA-2024:2394 |
| AlmaLinux | 9 | kernel-debug-uki-virt | Advisory build | 5.14.0-427.13.1.el9_4 | ALSA-2024:2394 |
| AlmaLinux | 9 | kernel-devel | Advisory build | 5.14.0-427.13.1.el9_4 | ALSA-2024:2394 |
| AlmaLinux | 9 | kernel-devel-matched | Advisory build | 5.14.0-427.13.1.el9_4 | ALSA-2024:2394 |
| AlmaLinux | 9 | kernel-doc | Advisory build | 5.14.0-427.13.1.el9_4 | ALSA-2024:2394 |
| AlmaLinux | 9 | kernel-headers | Advisory build | 5.14.0-427.13.1.el9_4 | ALSA-2024:2394 |
| AlmaLinux | 9 | kernel-modules | Advisory build | 5.14.0-427.13.1.el9_4 | ALSA-2024:2394 |
| AlmaLinux | 9 | kernel-modules-core | Advisory build | 5.14.0-427.13.1.el9_4 | ALSA-2024:2394 |
| AlmaLinux | 9 | kernel-modules-extra | Advisory build | 5.14.0-427.13.1.el9_4 | ALSA-2024:2394 |
| AlmaLinux | 9 | kernel-rt | Advisory build | 5.14.0-427.13.1.el9_4 | ALSA-2024:2394 |
| AlmaLinux | 9 | kernel-rt-core | Advisory build | 5.14.0-427.13.1.el9_4 | ALSA-2024:2394 |
| AlmaLinux | 9 | kernel-rt-debug | Advisory build | 5.14.0-427.13.1.el9_4 | ALSA-2024:2394 |
| AlmaLinux | 9 | kernel-rt-debug-core | Advisory build | 5.14.0-427.13.1.el9_4 | ALSA-2024:2394 |
| AlmaLinux | 9 | kernel-rt-debug-devel | Advisory build | 5.14.0-427.13.1.el9_4 | ALSA-2024:2394 |
| AlmaLinux | 9 | kernel-rt-debug-modules | Advisory build | 5.14.0-427.13.1.el9_4 | ALSA-2024:2394 |
| AlmaLinux | 9 | kernel-rt-debug-modules-core | Advisory build | 5.14.0-427.13.1.el9_4 | ALSA-2024:2394 |
| AlmaLinux | 9 | kernel-rt-debug-modules-extra | Advisory build | 5.14.0-427.13.1.el9_4 | ALSA-2024:2394 |
| AlmaLinux | 9 | kernel-rt-devel | Advisory build | 5.14.0-427.13.1.el9_4 | ALSA-2024:2394 |
| AlmaLinux | 9 | kernel-rt-modules | Advisory build | 5.14.0-427.13.1.el9_4 | ALSA-2024:2394 |
| AlmaLinux | 9 | kernel-rt-modules-core | Advisory build | 5.14.0-427.13.1.el9_4 | ALSA-2024:2394 |
| AlmaLinux | 9 | kernel-rt-modules-extra | Advisory build | 5.14.0-427.13.1.el9_4 | ALSA-2024:2394 |
| AlmaLinux | 9 | kernel-tools | Advisory build | 5.14.0-427.13.1.el9_4 | ALSA-2024:2394 |
| AlmaLinux | 9 | kernel-tools-libs | Advisory build | 5.14.0-427.13.1.el9_4 | ALSA-2024:2394 |
| AlmaLinux | 9 | kernel-tools-libs-devel | Advisory build | 5.14.0-427.13.1.el9_4 | ALSA-2024:2394 |
| AlmaLinux | 9 | kernel-uki-virt | Advisory build | 5.14.0-427.13.1.el9_4 | ALSA-2024:2394 |
| AlmaLinux | 9 | kernel-zfcpdump | Advisory build | 5.14.0-427.13.1.el9_4 | ALSA-2024:2394 |
| AlmaLinux | 9 | kernel-zfcpdump-core | Advisory build | 5.14.0-427.13.1.el9_4 | ALSA-2024:2394 |
| AlmaLinux | 9 | kernel-zfcpdump-devel | Advisory build | 5.14.0-427.13.1.el9_4 | ALSA-2024:2394 |
| AlmaLinux | 9 | kernel-zfcpdump-devel-matched | Advisory build | 5.14.0-427.13.1.el9_4 | ALSA-2024:2394 |
| AlmaLinux | 9 | kernel-zfcpdump-modules | Advisory build | 5.14.0-427.13.1.el9_4 | ALSA-2024:2394 |
| AlmaLinux | 9 | kernel-zfcpdump-modules-core | Advisory build | 5.14.0-427.13.1.el9_4 | ALSA-2024:2394 |
| AlmaLinux | 9 | kernel-zfcpdump-modules-extra | Advisory build | 5.14.0-427.13.1.el9_4 | ALSA-2024:2394 |
| AlmaLinux | 9 | libperf | Advisory build | 5.14.0-427.13.1.el9_4 | ALSA-2024:2394 |
| AlmaLinux | 9 | perf | Advisory build | 5.14.0-427.13.1.el9_4 | ALSA-2024:2394 |
| AlmaLinux | 9 | python3-perf | Advisory build | 5.14.0-427.13.1.el9_4 | ALSA-2024:2394 |
| AlmaLinux | 9 | rtla | Advisory build | 5.14.0-427.13.1.el9_4 | ALSA-2024:2394 |
| AlmaLinux | 9 | rv | Advisory build | 5.14.0-427.13.1.el9_4 | ALSA-2024:2394 |
Package entries are limited to the first 100 builds and 100 linked advisories.
Description
In the Linux kernel, the following vulnerability has been resolved: mm/sparsemem: fix race in accessing memory_section->usage The below race is observed on a PFN which falls into the device memory region with the system memory configuration where PFN's are such that [ZONE_NORMAL ZONE_DEVICE ZONE_NORMAL]. Since normal zone start and end pfn contains the device memory PFN's as well, the compaction triggered will try on the device memory PFN's too though they end up in NOP(because pfn_to_online_page() returns NULL for ZONE_DEVICE memory sections). When from other core, the section mappings are being removed for the ZONE_DEVICE region, that the PFN in question belongs to, on which compaction is currently being operated is resulting into the kernel crash with CONFIG_SPASEMEM_VMEMAP enabled. The crash logs can be seen at [1]. compact_zone() memunmap_pages ------------- --------------- __pageblock_pfn_to_page ...... (a)pfn_valid(): valid_section()//return true (b)__remove_pages()-> sparse_remove_section()-> section_deactivate(): [Free the array ms->usage and set ms->usage = NULL] pfn_section_valid() [Access ms->usage which is NULL] NOTE: From the above it can be said that the race is reduced to between the pfn_valid()/pfn_section_valid() and the section deactivate with SPASEMEM_VMEMAP enabled. The commit b943f045a9af("mm/sparse: fix kernel crash with pfn_section_valid check") tried to address the same problem by clearing the SECTION_HAS_MEM_MAP with the expectation of valid_section() returns false thus ms->usage is not accessed. Fix this issue by the below steps: a) Clear SECTION_HAS_MEM_MAP before freeing the ->usage. b) RCU protected read side critical section will either return NULL when SECTION_HAS_MEM_MAP is cleared or can successfully access ->usage. c) Free the ->usage with kfree_rcu() and set ms->usage = NULL. No attempt will be made to access ->usage after this as the SECTION_HAS_MEM_MAP is cleared thus valid_section() return false. Thanks to David/Pavan for their inputs on this patch. [1] https://lore.kernel.org/linux-mm/[email protected]/ On Snapdragon SoC, with the mentioned memory configuration of PFN's as [ZONE_NORMAL ZONE_DEVICE ZONE_NORMAL], we are able to see bunch of issues daily while testing on a device farm. For this particular issue below is the log. Though the below log is not directly pointing to the pfn_section_valid(){ ms->usage;}, when we loaded this dump on T32 lauterbach tool, it is pointing. [ 540.578056] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000 [ 540.578068] Mem abort info: [ 540.578070] ESR = 0x0000000096000005 [ 540.578073] EC = 0x25: DABT (current EL), IL = 32 bits [ 540.578077] SET = 0, FnV = 0 [ 540.578080] EA = 0, S1PTW = 0 [ 540.578082] FSC = 0x05: level 1 translation fault [ 540.578085] Data abort info: [ 540.578086] ISV = 0, ISS = 0x00000005 [ 540.578088] CM = 0, WnR = 0 [ 540.579431] pstate: 82400005 (Nzcv daif +PAN -UAO +TCO -DIT -SSBSBTYPE=--) [ 540.579436] pc : __pageblock_pfn_to_page+0x6c/0x14c [ 540.579454] lr : compact_zone+0x994/0x1058 [ 540.579460] sp : ffffffc03579b510 [ 540.579463] x29: ffffffc03579b510 x28: 0000000000235800 x27:000000000000000c [ 540.579470] x26: 0000000000235c00 x25: 0000000000000068 x24:ffffffc03579b640 [ 540.579477] x23: 0000000000000001 x22: ffffffc03579b660 x21:0000000000000000 [ 540.579483] x20: 0000000000235bff x19: ffffffdebf7e3940 x18:ffffffdebf66d140 [ 540.579489] x17: 00000000739ba063 x16: 00000000739ba063 x15:00000000009f4bff [ 540.579495] x14: 0000008000000000 x13: 0000000000000000 x12:0000000000000001 [ 540.579501] x11: 0000000000000000 x10: 0000000000000000 x9 :ffffff897d2cd440 [ 540.579507] x8 : 0000000000000000 x7 : 0000000000000000 x6 :ffffffc03579b5b4 [ 540.579512] x5 : 0000000000027f25 x4 : ffffffc03579b5b8 x3 :0000000000000 ---truncated---
Related advisories
Vendor advisories explicitly linked to this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
No normalized assessments.
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| Linux | Linux | f46edbd1b1516da1fb34c917775168d5df576f78 to < 90ad17575d26874287271127d43ef3c2af876cea (affected · git)f46edbd1b1516da1fb34c917775168d5df576f78 to < b448de2459b6d62a53892487ab18b7d823ff0529 (affected · git)f46edbd1b1516da1fb34c917775168d5df576f78 to < 68ed9e33324021e9d6b798e9db00ca3093d2012a (affected · git)f46edbd1b1516da1fb34c917775168d5df576f78 to < 70064241f2229f7ba7b9599a98f68d9142e81a97 (affected · git)f46edbd1b1516da1fb34c917775168d5df576f78 to < 3a01daace71b521563c38bbbf874e14c3e58adb7 (affected · git)f46edbd1b1516da1fb34c917775168d5df576f78 to < 5ec8e8ea8b7783fab150cf86404fc38cb4db8800 (affected · git)Default: unaffected | Linux · cna |
| Linux | Linux | 5.3 (affected)0 to < 5.3 (unaffected · semver)5.10.210 through 5.10.* (unaffected · semver)5.15.149 through 5.15.* (unaffected · semver)6.1.76 through 6.1.* (unaffected · semver)6.6.15 through 6.6.* (unaffected · semver)6.7.3 through 6.7.* (unaffected · semver)6.8 and later (unaffected · original_commit_for_fix)Default: affected | Linux · cna |
Weaknesses
0No weakness assertions.
References
7- https://git.kernel.org/stable/c/3a01daace71b521563c38bbbf874e14c3e58adb7
- https://git.kernel.org/stable/c/5ec8e8ea8b7783fab150cf86404fc38cb4db8800
- https://git.kernel.org/stable/c/68ed9e33324021e9d6b798e9db00ca3093d2012a
- https://git.kernel.org/stable/c/70064241f2229f7ba7b9599a98f68d9142e81a97
- https://git.kernel.org/stable/c/90ad17575d26874287271127d43ef3c2af876cea
- https://git.kernel.org/stable/c/b448de2459b6d62a53892487ab18b7d823ff0529
- https://lists.debian.org/debian-lts-announce/2024/06/msg00017.html
Provider assertions
3Linux · cna
mm/sparsemem: fix race in accessing memory_section->usage
CISA-ADP · adp
CISA ADP Vulnrichment
CVE · adp
CVE Program Container
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- c599afdfe1b815e4e1dc6204361cf28963c0c50386ea430a04c90ebaf062bb6a
- Ingested
- 23 Sep 2026, 08:14:33 UTC
- Source record
- Official CVE record