Cloudanix VulnDB

CVE-2023-52490

None

CVSS

—

EPSS

0.3%

Published

Mar 11, 2024

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

A bug in the Linux kernel can cause the whole system to crash when certain memory management operations happen at the same time.

Exploitation
Local Privilege
Attacker needs
Local User
Complexity
Moderate
Impact
Denial Of Service
Component
OS kernel
Class
Race Condition
Remediation
Patch
Effort
Medium
Patch risk
Low

What it actually does

Race condition in Linux kernel page migration allows temporary reuse of page->mapping to store anon_vma without PAGE_MAPPING_ANON flag; concurrent memory hotplug can trigger dump_page() and page_mapping() on the locked target page, resulting in NULL pointer dereference and kernel panic.

Why it matters to the business

Unpatched Linux systems performing memory migration under load combined with memory hotplug or offline operations can experience sudden kernel crashes and reboots, causing service interruptions and potential data loss in memory-intensive workloads.

How an attack unfolds

An attacker with local access runs concurrent workloads that trigger page migration while simultaneously forcing memory block offline operations; the race leaves page->mapping in an inconsistent state that causes dump_page() during isolation checks to dereference invalid memory and crash the kernel.

How to fix it

Upgrade the Linux kernel to a fixed version such as 5.10.178-1 or later on Debian 11; rebuild and reboot into the patched kernel. Where hotplug is not required, disable memory offline operations as a temporary mitigation.

How to confirm the fix worked

Confirm the running kernel version reports the fix (e.g., 5.10.178-1 or newer); attempt to reproduce the original stress-ng plus memory offline scenario and verify no crash occurs; inspect kernel source for the private-field anon_vma storage change.

Typical attack path

  1. Trigger page migration via memory pressure or explicit move_pages calls
  2. Concurrently initiate memory hotplug offline on the same physical range
  3. Hit the window where target page refcount==1 but mapping holds anon_vma without flag
  4. Invoke dump_page() path that calls page_mapping() without lock, dereferencing NULL

How to detect it

Search kernel logs and vmcore dumps for the call trace containing dentry_name, __dump_page, set_migratetype_isolate, start_isolate_page_range, and offline_pages; correlate with preceding memory migration or compaction activity.

What your security team should do

  • Prioritize kernel upgrades on systems that perform memory hotplug or run memory-intensive workloads
  • Monitor for availability of backported fixes in distribution kernels
  • Test patched kernels in staging environments before production rollout
  • Review and limit unprivileged use of move_pages and memory offline sysfs interfaces where feasible

The record

In the Linux kernel, the following vulnerability has been resolved: mm: migrate: fix getting incorrect page mapping during page migration When running stress-ng testing, we found below kernel crash after a few hours: Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000 pc : dentry_name+0xd8/0x224 lr : pointer+0x22c/0x370 sp : ffff800025f134c0 ...... Call trace: dentry_name+0xd8/0x224 pointer+0x22c/0x370 vsnprintf+0x1ec/0x730 vscnprintf+0x2c/0x60 vprintk_store+0x70/0x234 vprintk_emit+0xe0/0x24c vprintk_default+0x3c/0x44 vprintk_func+0x84/0x2d0 printk+0x64/0x88 __dump_page+0x52c/0x530 dump_page+0x14/0x20 set_migratetype_isolate+0x110/0x224 start_isolate_page_range+0xc4/0x20c offline_pages+0x124/0x474 memory_block_offline+0x44/0xf4 memory_subsys_offline+0x3c/0x70 device_offline+0xf0/0x120 ...... After analyzing the vmcore, I found this issue is caused by page migration. The scenario is that, one thread is doing page migration, and we will use the target page's ->mapping field to save 'anon_vma' pointer between page unmap and page move, and now the target page is locked and refcount is 1. Currently, there is another stress-ng thread performing memory hotplug, attempting to offline the target page that is being migrated. It discovers that the refcount of this target page is 1, preventing the offline operation, thus proceeding to dump the page. However, page_mapping() of the target page may return an incorrect file mapping to crash the system in dump_mapping(), since the target page->mapping only saves 'anon_vma' pointer without setting PAGE_MAPPING_ANON flag. There are seveval ways to fix this issue: (1) Setting the PAGE_MAPPING_ANON flag for target page's ->mapping when saving 'anon_vma', but this can confuse PageAnon() for PFN walkers, since the target page has not built mappings yet. (2) Getting the page lock to call page_mapping() in __dump_page() to avoid crashing the system, however, there are still some PFN walkers that call page_mapping() without holding the page lock, such as compaction. (3) Using target page->private field to save the 'anon_vma' pointer and 2 bits page state, just as page->mapping records an anonymous page, which can remove the page_mapping() impact for PFN walkers and also seems a simple way. So I choose option 3 to fix this issue, and this can also fix other potential issues for PFN walkers, such as compaction.

Affected packages

Ecosystem Package Introduced Fixed
AlmaLinux:9 bpftool 0 7.4.0-503.26.1.el9_5
AlmaLinux:9 kernel 0 5.14.0-503.26.1.el9_5
AlmaLinux:9 kernel-64k 0 5.14.0-503.26.1.el9_5
AlmaLinux:9 kernel-64k-core 0 5.14.0-503.26.1.el9_5
AlmaLinux:9 kernel-64k-debug 0 5.14.0-503.26.1.el9_5
AlmaLinux:9 kernel-64k-debug-core 0 5.14.0-503.26.1.el9_5
AlmaLinux:9 kernel-64k-debug-devel 0 5.14.0-503.26.1.el9_5
AlmaLinux:9 kernel-64k-debug-devel-matched 0 5.14.0-503.26.1.el9_5
AlmaLinux:9 kernel-64k-debug-modules 0 5.14.0-503.26.1.el9_5
AlmaLinux:9 kernel-64k-debug-modules-core 0 5.14.0-503.26.1.el9_5
AlmaLinux:9 kernel-64k-debug-modules-extra 0 5.14.0-503.26.1.el9_5
AlmaLinux:9 kernel-64k-devel 0 5.14.0-503.26.1.el9_5
AlmaLinux:9 kernel-64k-devel-matched 0 5.14.0-503.26.1.el9_5
AlmaLinux:9 kernel-64k-modules 0 5.14.0-503.26.1.el9_5
AlmaLinux:9 kernel-64k-modules-core 0 5.14.0-503.26.1.el9_5
AlmaLinux:9 kernel-64k-modules-extra 0 5.14.0-503.26.1.el9_5
AlmaLinux:9 kernel-abi-stablelists 0 5.14.0-503.26.1.el9_5
AlmaLinux:9 kernel-core 0 5.14.0-503.26.1.el9_5
AlmaLinux:9 kernel-cross-headers 0 5.14.0-503.26.1.el9_5
AlmaLinux:9 kernel-debug 0 5.14.0-503.26.1.el9_5
AlmaLinux:9 kernel-debug-core 0 5.14.0-503.26.1.el9_5
AlmaLinux:9 kernel-debug-devel 0 5.14.0-503.26.1.el9_5
AlmaLinux:9 kernel-debug-devel-matched 0 5.14.0-503.26.1.el9_5
AlmaLinux:9 kernel-debug-modules 0 5.14.0-503.26.1.el9_5
AlmaLinux:9 kernel-debug-modules-core 0 5.14.0-503.26.1.el9_5
AlmaLinux:9 kernel-debug-modules-extra 0 5.14.0-503.26.1.el9_5
AlmaLinux:9 kernel-debug-uki-virt 0 5.14.0-503.26.1.el9_5
AlmaLinux:9 kernel-devel 0 5.14.0-503.26.1.el9_5
AlmaLinux:9 kernel-devel-matched 0 5.14.0-503.26.1.el9_5
AlmaLinux:9 kernel-doc 0 5.14.0-503.26.1.el9_5
AlmaLinux:9 kernel-headers 0 5.14.0-503.26.1.el9_5
AlmaLinux:9 kernel-modules 0 5.14.0-503.26.1.el9_5
AlmaLinux:9 kernel-modules-core 0 5.14.0-503.26.1.el9_5
AlmaLinux:9 kernel-modules-extra 0 5.14.0-503.26.1.el9_5
AlmaLinux:9 kernel-rt 0 5.14.0-503.26.1.el9_5
AlmaLinux:9 kernel-rt-core 0 5.14.0-503.26.1.el9_5
AlmaLinux:9 kernel-rt-debug 0 5.14.0-503.26.1.el9_5
AlmaLinux:9 kernel-rt-debug-core 0 5.14.0-503.26.1.el9_5
AlmaLinux:9 kernel-rt-debug-devel 0 5.14.0-503.26.1.el9_5
AlmaLinux:9 kernel-rt-debug-modules 0 5.14.0-503.26.1.el9_5
AlmaLinux:9 kernel-rt-debug-modules-core 0 5.14.0-503.26.1.el9_5
AlmaLinux:9 kernel-rt-debug-modules-extra 0 5.14.0-503.26.1.el9_5
AlmaLinux:9 kernel-rt-devel 0 5.14.0-503.26.1.el9_5
AlmaLinux:9 kernel-rt-modules 0 5.14.0-503.26.1.el9_5
AlmaLinux:9 kernel-rt-modules-core 0 5.14.0-503.26.1.el9_5
AlmaLinux:9 kernel-rt-modules-extra 0 5.14.0-503.26.1.el9_5
AlmaLinux:9 kernel-tools 0 5.14.0-503.26.1.el9_5
AlmaLinux:9 kernel-tools-libs 0 5.14.0-503.26.1.el9_5
AlmaLinux:9 kernel-tools-libs-devel 0 5.14.0-503.26.1.el9_5
AlmaLinux:9 kernel-uki-virt 0 5.14.0-503.26.1.el9_5
AlmaLinux:9 kernel-uki-virt-addons 0 5.14.0-503.26.1.el9_5
AlmaLinux:9 kernel-zfcpdump 0 5.14.0-503.26.1.el9_5
AlmaLinux:9 kernel-zfcpdump-core 0 5.14.0-503.26.1.el9_5
AlmaLinux:9 kernel-zfcpdump-devel 0 5.14.0-503.26.1.el9_5
AlmaLinux:9 kernel-zfcpdump-devel-matched 0 5.14.0-503.26.1.el9_5
AlmaLinux:9 kernel-zfcpdump-modules 0 5.14.0-503.26.1.el9_5
AlmaLinux:9 kernel-zfcpdump-modules-core 0 5.14.0-503.26.1.el9_5
AlmaLinux:9 kernel-zfcpdump-modules-extra 0 5.14.0-503.26.1.el9_5
AlmaLinux:9 libperf 0 5.14.0-503.26.1.el9_5
AlmaLinux:9 perf 0 5.14.0-503.26.1.el9_5
AlmaLinux:9 python3-perf 0 5.14.0-503.26.1.el9_5
AlmaLinux:9 rtla 0 5.14.0-503.26.1.el9_5
AlmaLinux:9 rv 0 5.14.0-503.26.1.el9_5
Debian:13 linux 0 6.6.15-1
Linux Kernel 6.3.0 6.6.15
Ubuntu:14.04:LTS linux 0 3.11.0-12.19
Ubuntu:14.04:LTS linux-aws 0 4.4.0-1002.2
Ubuntu:14.04:LTS linux-azure 0 4.15.0-1023.24~14.04.1
Ubuntu:14.04:LTS linux-lts-xenial 0 4.4.0-13.29~14.04.1
Ubuntu:16.04:LTS linux 0 4.4.0-2.16
Ubuntu:16.04:LTS linux-aws 0 4.4.0-1001.10
Ubuntu:16.04:LTS linux-aws-hwe 0 4.15.0-1030.31~16.04.1
Ubuntu:16.04:LTS linux-azure 0 4.11.0-1009.9
Ubuntu:16.04:LTS linux-gcp 0 4.10.0-1004.4
Ubuntu:16.04:LTS linux-hwe 0 4.8.0-39.42~16.04.1
Ubuntu:16.04:LTS linux-hwe-edge 0 No fix
Ubuntu:16.04:LTS linux-kvm 0 4.4.0-1004.9
Ubuntu:16.04:LTS linux-oracle 0 4.15.0-1007.9~16.04.1
Ubuntu:18.04:LTS linux 0 4.13.0-16.19
Ubuntu:18.04:LTS linux-aws 0 4.15.0-1001.1
Ubuntu:18.04:LTS linux-aws-5.0 0 No fix
Ubuntu:18.04:LTS linux-aws-5.3 0 No fix
Ubuntu:18.04:LTS linux-aws-5.4 0 5.4.0-1018.18~18.04.1
Ubuntu:18.04:LTS linux-azure 0 No fix
Ubuntu:18.04:LTS linux-azure-4.15 0 4.15.0-1082.92
Ubuntu:18.04:LTS linux-azure-5.3 0 No fix
Ubuntu:18.04:LTS linux-azure-5.4 0 5.4.0-1020.20~18.04.1
Ubuntu:18.04:LTS linux-azure-edge 0 No fix
Ubuntu:18.04:LTS linux-gcp 0 No fix
Ubuntu:18.04:LTS linux-gcp-4.15 0 4.15.0-1071.81
Ubuntu:18.04:LTS linux-gcp-5.3 0 No fix
Ubuntu:18.04:LTS linux-gcp-5.4 0 5.4.0-1019.19~18.04.2
Ubuntu:18.04:LTS linux-gke-4.15 0 No fix
Ubuntu:18.04:LTS linux-gke-5.4 0 No fix
Ubuntu:18.04:LTS linux-gkeop-5.4 0 No fix
Ubuntu:18.04:LTS linux-hwe 0 No fix
Ubuntu:18.04:LTS linux-hwe-5.4 0 5.4.0-37.41~18.04.1
Ubuntu:18.04:LTS linux-hwe-edge 0 5.0.0-15.16~18.04.1
Ubuntu:18.04:LTS linux-ibm-5.4 0 5.4.0-1010.11~18.04.2
Ubuntu:18.04:LTS linux-kvm 0 4.15.0-1002.2
Ubuntu:18.04:LTS linux-oem 0 No fix
Ubuntu:18.04:LTS linux-oracle 0 4.15.0-1007.9
Ubuntu:18.04:LTS linux-oracle-5.0 0 No fix
Ubuntu:18.04:LTS linux-oracle-5.3 0 No fix
Ubuntu:18.04:LTS linux-oracle-5.4 0 5.4.0-1019.19~18.04.1
Ubuntu:18.04:LTS linux-raspi-5.4 0 5.4.0-1013.13~18.04.1
Ubuntu:20.04:LTS linux 0 5.4.0-9.12
Ubuntu:20.04:LTS linux-aws 0 5.4.0-1005.5
Ubuntu:20.04:LTS linux-aws-5.11 0 No fix
Ubuntu:20.04:LTS linux-aws-5.13 0 No fix
Ubuntu:20.04:LTS linux-aws-5.15 0 5.15.0-1014.18~20.04.1
Ubuntu:20.04:LTS linux-aws-5.8 0 No fix
Ubuntu:20.04:LTS linux-azure 0 5.4.0-1006.6
Ubuntu:20.04:LTS linux-azure-5.11 0 No fix
Ubuntu:20.04:LTS linux-azure-5.13 0 No fix
Ubuntu:20.04:LTS linux-azure-5.15 0 5.15.0-1007.8~20.04.1
Ubuntu:20.04:LTS linux-azure-5.8 0 No fix
Ubuntu:20.04:LTS linux-azure-fde 0 No fix
Ubuntu:20.04:LTS linux-azure-fde-5.15 0 5.15.0-1019.24~20.04.1.1
Ubuntu:20.04:LTS linux-bluefield 0 5.4.0-1007.10
Ubuntu:20.04:LTS linux-gcp 0 5.4.0-1005.5
Ubuntu:20.04:LTS linux-gcp-5.11 0 No fix
Ubuntu:20.04:LTS linux-gcp-5.13 0 No fix
Ubuntu:20.04:LTS linux-gcp-5.15 0 5.15.0-1006.9~20.04.1
Ubuntu:20.04:LTS linux-gcp-5.8 0 No fix
Ubuntu:20.04:LTS linux-gke 0 No fix
Ubuntu:20.04:LTS linux-gke-5.15 0 No fix
Ubuntu:20.04:LTS linux-gkeop 0 5.4.0-1008.9
Ubuntu:20.04:LTS linux-gkeop-5.15 0 5.15.0-1003.5~20.04.2
Ubuntu:20.04:LTS linux-hwe-5.11 0 No fix
Ubuntu:20.04:LTS linux-hwe-5.13 0 No fix
Ubuntu:20.04:LTS linux-hwe-5.15 0 5.15.0-33.34~20.04.1
Ubuntu:20.04:LTS linux-hwe-5.8 0 No fix
Ubuntu:20.04:LTS linux-ibm 0 5.4.0-1003.4
Ubuntu:20.04:LTS linux-ibm-5.15 0 5.15.0-1033.36~20.04.1
Ubuntu:20.04:LTS linux-intel-5.13 0 No fix
Ubuntu:20.04:LTS linux-intel-iotg-5.15 0 5.15.0-1003.5~20.04.1
Ubuntu:20.04:LTS linux-iot 0 5.4.0-1001.3
Ubuntu:20.04:LTS linux-kvm 0 5.4.0-1004.4
Ubuntu:20.04:LTS linux-lowlatency-hwe-5.15 0 5.15.0-33.34~20.04.1
Ubuntu:20.04:LTS linux-oem-5.10 0 No fix
Ubuntu:20.04:LTS linux-oem-5.13 0 No fix
Ubuntu:20.04:LTS linux-oem-5.14 0 No fix
Ubuntu:20.04:LTS linux-oem-5.6 0 No fix
Ubuntu:20.04:LTS linux-oracle 0 5.4.0-1005.5
Ubuntu:20.04:LTS linux-oracle-5.11 0 No fix
Ubuntu:20.04:LTS linux-oracle-5.13 0 No fix
Ubuntu:20.04:LTS linux-oracle-5.15 0 5.15.0-1007.9~20.04.1
Ubuntu:20.04:LTS linux-oracle-5.8 0 No fix
Ubuntu:20.04:LTS linux-raspi 0 5.4.0-1007.7
Ubuntu:20.04:LTS linux-raspi2 0 No fix
Ubuntu:20.04:LTS linux-riscv 0 No fix
Ubuntu:20.04:LTS linux-riscv-5.11 0 No fix
Ubuntu:20.04:LTS linux-riscv-5.15 0 5.15.0-1015.17~20.04.1
Ubuntu:20.04:LTS linux-riscv-5.8 0 No fix
Ubuntu:20.04:LTS linux-xilinx-zynqmp 0 5.4.0-1020.24
Ubuntu:22.04:LTS linux 0 5.13.0-19.19
Ubuntu:22.04:LTS linux-allwinner-5.19 0 No fix
Ubuntu:22.04:LTS linux-aws 0 5.13.0-1005.6
Ubuntu:22.04:LTS linux-aws-5.19 0 No fix
Ubuntu:22.04:LTS linux-aws-6.2 0 No fix
Ubuntu:22.04:LTS linux-aws-6.5 0 No fix
Ubuntu:22.04:LTS linux-aws-6.8 0 6.8.0-1009.9~22.04.2
Ubuntu:22.04:LTS linux-azure 0 5.13.0-1006.7
Ubuntu:22.04:LTS linux-azure-5.19 0 No fix
Ubuntu:22.04:LTS linux-azure-6.2 0 No fix
Ubuntu:22.04:LTS linux-azure-6.5 0 6.5.0-1022.23~22.04.1
Ubuntu:22.04:LTS linux-azure-6.8 0 6.8.0-1008.8~22.04.1
Ubuntu:22.04:LTS linux-azure-fde 0 5.15.0-1019.24.1
Ubuntu:22.04:LTS linux-azure-fde-5.19 0 No fix
Ubuntu:22.04:LTS linux-azure-fde-6.2 0 No fix
Ubuntu:22.04:LTS linux-gcp 0 5.13.0-1005.6
Ubuntu:22.04:LTS linux-gcp-5.19 0 No fix
Ubuntu:22.04:LTS linux-gcp-6.2 0 No fix
Ubuntu:22.04:LTS linux-gcp-6.5 0 6.5.0-1022.24~22.04.1
Ubuntu:22.04:LTS linux-gcp-6.8 0 6.8.0-1010.11~22.04.1
Ubuntu:22.04:LTS linux-gke 0 5.15.0-1002.2
Ubuntu:22.04:LTS linux-gkeop 0 5.15.0-1001.2
Ubuntu:22.04:LTS linux-hwe-5.19 0 No fix
Ubuntu:22.04:LTS linux-hwe-6.2 0 No fix
Ubuntu:22.04:LTS linux-hwe-6.5 0 6.5.0-41.41~22.04.2
Ubuntu:22.04:LTS linux-hwe-6.8 0 6.8.0-38.38~22.04.1
Ubuntu:22.04:LTS linux-ibm 0 5.15.0-1002.2
Ubuntu:22.04:LTS linux-intel-iot-realtime 0 No fix
Ubuntu:22.04:LTS linux-intel-iot-realtime 0 5.15.0-1021.26
Ubuntu:22.04:LTS linux-intel-iotg 0 5.15.0-1004.6
Ubuntu:22.04:LTS linux-kvm 0 5.13.0-1004.4
Ubuntu:22.04:LTS linux-lowlatency 0 5.15.0-22.22
Ubuntu:22.04:LTS linux-lowlatency-hwe-5.19 0 No fix
Ubuntu:22.04:LTS linux-lowlatency-hwe-6.2 0 No fix
Ubuntu:22.04:LTS linux-lowlatency-hwe-6.5 0 6.5.0-41.41.1~22.04.1
Ubuntu:22.04:LTS linux-lowlatency-hwe-6.8 0 6.8.0-38.38.1~22.04.2
Ubuntu:22.04:LTS linux-nvidia 0 5.15.0-1005.5
Ubuntu:22.04:LTS linux-nvidia-6.2 0 No fix
Ubuntu:22.04:LTS linux-nvidia-6.5 0 6.5.0-1021.22
Ubuntu:22.04:LTS linux-nvidia-6.8 0 6.8.0-1008.8~22.04.1
Ubuntu:22.04:LTS linux-oem-5.17 0 No fix
Ubuntu:22.04:LTS linux-oem-6.0 0 No fix
Ubuntu:22.04:LTS linux-oem-6.1 0 No fix
Ubuntu:22.04:LTS linux-oem-6.5 0 6.5.0-1024.25

Related vulnerabilities