Vulnerability · Published Feb 29, 2024 · Assigned by Linux

CVE-2023-52490mm: migrate: fix getting incorrect page mapping during page migration

Medium 5.5

In plain English

A medium-severity null pointer dereference in Linux from Linux. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.3% (higher than 20% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)5.5Medium
Exploit odds (30 days)0.3%top 79.9% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official description

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 & fixed versions

EcosystemPackageFixed inAdvisory
AlmaLinux:9bpftool7.4.0-503.26.1.el9_5ALSA-2025:1659
AlmaLinux:9kernel5.14.0-503.26.1.el9_5ALSA-2025:1659
AlmaLinux:9kernel-64k5.14.0-503.26.1.el9_5ALSA-2025:1659
AlmaLinux:9kernel-64k-core5.14.0-503.26.1.el9_5ALSA-2025:1659
AlmaLinux:9kernel-64k-debug5.14.0-503.26.1.el9_5ALSA-2025:1659
AlmaLinux:9kernel-64k-debug-core5.14.0-503.26.1.el9_5ALSA-2025:1659
AlmaLinux:9kernel-64k-debug-devel5.14.0-503.26.1.el9_5ALSA-2025:1659
AlmaLinux:9kernel-64k-debug-devel-matched5.14.0-503.26.1.el9_5ALSA-2025:1659
AlmaLinux:9kernel-64k-debug-modules5.14.0-503.26.1.el9_5ALSA-2025:1659
AlmaLinux:9kernel-64k-debug-modules-core5.14.0-503.26.1.el9_5ALSA-2025:1659
AlmaLinux:9kernel-64k-debug-modules-extra5.14.0-503.26.1.el9_5ALSA-2025:1659
AlmaLinux:9kernel-64k-devel5.14.0-503.26.1.el9_5ALSA-2025:1659
AlmaLinux:9kernel-64k-devel-matched5.14.0-503.26.1.el9_5ALSA-2025:1659
AlmaLinux:9kernel-64k-modules5.14.0-503.26.1.el9_5ALSA-2025:1659
AlmaLinux:9kernel-64k-modules-core5.14.0-503.26.1.el9_5ALSA-2025:1659
AlmaLinux:9kernel-64k-modules-extra5.14.0-503.26.1.el9_5ALSA-2025:1659
AlmaLinux:9kernel-abi-stablelists5.14.0-503.26.1.el9_5ALSA-2025:1659
AlmaLinux:9kernel-core5.14.0-503.26.1.el9_5ALSA-2025:1659
AlmaLinux:9kernel-cross-headers5.14.0-503.26.1.el9_5ALSA-2025:1659
AlmaLinux:9kernel-debug5.14.0-503.26.1.el9_5ALSA-2025:1659
AlmaLinux:9kernel-debug-core5.14.0-503.26.1.el9_5ALSA-2025:1659
AlmaLinux:9kernel-debug-devel5.14.0-503.26.1.el9_5ALSA-2025:1659
AlmaLinux:9kernel-debug-devel-matched5.14.0-503.26.1.el9_5ALSA-2025:1659
AlmaLinux:9kernel-debug-modules5.14.0-503.26.1.el9_5ALSA-2025:1659
AlmaLinux:9kernel-debug-modules-core5.14.0-503.26.1.el9_5ALSA-2025:1659
AlmaLinux:9kernel-debug-modules-extra5.14.0-503.26.1.el9_5ALSA-2025:1659
AlmaLinux:9kernel-debug-uki-virt5.14.0-503.26.1.el9_5ALSA-2025:1659
AlmaLinux:9kernel-devel5.14.0-503.26.1.el9_5ALSA-2025:1659
AlmaLinux:9kernel-devel-matched5.14.0-503.26.1.el9_5ALSA-2025:1659
AlmaLinux:9kernel-doc5.14.0-503.26.1.el9_5ALSA-2025:1659
AlmaLinux:9kernel-headers5.14.0-503.26.1.el9_5ALSA-2025:1659
AlmaLinux:9kernel-modules5.14.0-503.26.1.el9_5ALSA-2025:1659
AlmaLinux:9kernel-modules-core5.14.0-503.26.1.el9_5ALSA-2025:1659
AlmaLinux:9kernel-modules-extra5.14.0-503.26.1.el9_5ALSA-2025:1659
AlmaLinux:9kernel-rt5.14.0-503.26.1.el9_5ALSA-2025:1659
AlmaLinux:9kernel-rt-core5.14.0-503.26.1.el9_5ALSA-2025:1659
AlmaLinux:9kernel-rt-debug5.14.0-503.26.1.el9_5ALSA-2025:1659
AlmaLinux:9kernel-rt-debug-core5.14.0-503.26.1.el9_5ALSA-2025:1659
AlmaLinux:9kernel-rt-debug-devel5.14.0-503.26.1.el9_5ALSA-2025:1659
AlmaLinux:9kernel-rt-debug-modules5.14.0-503.26.1.el9_5ALSA-2025:1659
AlmaLinux:9kernel-rt-debug-modules-core5.14.0-503.26.1.el9_5ALSA-2025:1659
AlmaLinux:9kernel-rt-debug-modules-extra5.14.0-503.26.1.el9_5ALSA-2025:1659
AlmaLinux:9kernel-rt-devel5.14.0-503.26.1.el9_5ALSA-2025:1659
AlmaLinux:9kernel-rt-modules5.14.0-503.26.1.el9_5ALSA-2025:1659
AlmaLinux:9kernel-rt-modules-core5.14.0-503.26.1.el9_5ALSA-2025:1659
AlmaLinux:9kernel-rt-modules-extra5.14.0-503.26.1.el9_5ALSA-2025:1659
AlmaLinux:9kernel-tools5.14.0-503.26.1.el9_5ALSA-2025:1659
AlmaLinux:9kernel-tools-libs5.14.0-503.26.1.el9_5ALSA-2025:1659
AlmaLinux:9kernel-tools-libs-devel5.14.0-503.26.1.el9_5ALSA-2025:1659
AlmaLinux:9kernel-uki-virt5.14.0-503.26.1.el9_5ALSA-2025:1659
AlmaLinux:9kernel-uki-virt-addons5.14.0-503.26.1.el9_5ALSA-2025:1659
AlmaLinux:9kernel-zfcpdump5.14.0-503.26.1.el9_5ALSA-2025:1659
AlmaLinux:9kernel-zfcpdump-core5.14.0-503.26.1.el9_5ALSA-2025:1659
AlmaLinux:9kernel-zfcpdump-devel5.14.0-503.26.1.el9_5ALSA-2025:1659
AlmaLinux:9kernel-zfcpdump-devel-matched5.14.0-503.26.1.el9_5ALSA-2025:1659
AlmaLinux:9kernel-zfcpdump-modules5.14.0-503.26.1.el9_5ALSA-2025:1659
AlmaLinux:9kernel-zfcpdump-modules-core5.14.0-503.26.1.el9_5ALSA-2025:1659
AlmaLinux:9kernel-zfcpdump-modules-extra5.14.0-503.26.1.el9_5ALSA-2025:1659
AlmaLinux:9libperf5.14.0-503.26.1.el9_5ALSA-2025:1659
AlmaLinux:9perf5.14.0-503.26.1.el9_5ALSA-2025:1659
AlmaLinux:9python3-perf5.14.0-503.26.1.el9_5ALSA-2025:1659
AlmaLinux:9rtla5.14.0-503.26.1.el9_5ALSA-2025:1659
AlmaLinux:9rv5.14.0-503.26.1.el9_5ALSA-2025:1659
Debian:13linux6.6.15-1DEBIAN-CVE-2023-52490
Debian:14linux6.6.15-1DEBIAN-CVE-2023-52490
Ubuntu:22.04:LTSlinux-allwinner-5.19no fix listedUBUNTU-CVE-2023-52490
Ubuntu:22.04:LTSlinux-aws-5.19no fix listedUBUNTU-CVE-2023-52490
Ubuntu:22.04:LTSlinux-aws-6.2no fix listedUBUNTU-CVE-2023-52490
Ubuntu:22.04:LTSlinux-aws-6.5no fix listedUBUNTU-CVE-2023-52490
Ubuntu:22.04:LTSlinux-azure-5.19no fix listedUBUNTU-CVE-2023-52490
Ubuntu:22.04:LTSlinux-azure-6.2no fix listedUBUNTU-CVE-2023-52490
Ubuntu:22.04:LTSlinux-azure-6.56.5.0-1022.23~22.04.1UBUNTU-CVE-2023-52490
Ubuntu:22.04:LTSlinux-azure-6.56.5.0-1022.23~22.04.1USN-6819-1
Ubuntu:22.04:LTSlinux-azure-fde-5.19no fix listedUBUNTU-CVE-2023-52490
Ubuntu:22.04:LTSlinux-azure-fde-6.2no fix listedUBUNTU-CVE-2023-52490
Ubuntu:22.04:LTSlinux-gcp-5.19no fix listedUBUNTU-CVE-2023-52490
Ubuntu:22.04:LTSlinux-gcp-6.2no fix listedUBUNTU-CVE-2023-52490
Ubuntu:22.04:LTSlinux-gcp-6.56.5.0-1022.24~22.04.1UBUNTU-CVE-2023-52490
Ubuntu:22.04:LTSlinux-gcp-6.56.5.0-1022.24~22.04.1USN-6818-1
Ubuntu:22.04:LTSlinux-hwe-5.19no fix listedUBUNTU-CVE-2023-52490
Ubuntu:22.04:LTSlinux-hwe-6.2no fix listedUBUNTU-CVE-2023-52490
Ubuntu:22.04:LTSlinux-hwe-6.56.5.0-41.41~22.04.2USN-6818-4
Ubuntu:22.04:LTSlinux-hwe-6.56.5.0-41.41~22.04.2UBUNTU-CVE-2023-52490
Ubuntu:22.04:LTSlinux-intel-iot-realtimeno fix listedUBUNTU-CVE-2023-52490
Ubuntu:22.04:LTSlinux-lowlatency-hwe-5.19no fix listedUBUNTU-CVE-2023-52490
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.2no fix listedUBUNTU-CVE-2023-52490
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.56.5.0-41.41.1~22.04.1USN-6818-1
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.56.5.0-41.41.1~22.04.1UBUNTU-CVE-2023-52490
Ubuntu:22.04:LTSlinux-nvidia-6.2no fix listedUBUNTU-CVE-2023-52490
Ubuntu:22.04:LTSlinux-nvidia-6.56.5.0-1021.22UBUNTU-CVE-2023-52490
Ubuntu:22.04:LTSlinux-nvidia-6.56.5.0-1021.22USN-6818-3
Ubuntu:22.04:LTSlinux-oem-5.17no fix listedUBUNTU-CVE-2023-52490
Ubuntu:22.04:LTSlinux-oem-6.0no fix listedUBUNTU-CVE-2023-52490
Ubuntu:22.04:LTSlinux-oem-6.1no fix listedUBUNTU-CVE-2023-52490
Ubuntu:22.04:LTSlinux-oem-6.56.5.0-1024.25UBUNTU-CVE-2023-52490
Ubuntu:22.04:LTSlinux-oem-6.56.5.0-1024.25USN-6819-3
Ubuntu:22.04:LTSlinux-oracle-6.56.5.0-1024.24~22.04.1USN-6819-4
Ubuntu:22.04:LTSlinux-oracle-6.56.5.0-1024.24~22.04.1UBUNTU-CVE-2023-52490
Ubuntu:22.04:LTSlinux-realtimeno fix listedUBUNTU-CVE-2023-52490
Ubuntu:22.04:LTSlinux-riscvno fix listedUBUNTU-CVE-2023-52490
Ubuntu:22.04:LTSlinux-riscv-5.19no fix listedUBUNTU-CVE-2023-52490
Ubuntu:22.04:LTSlinux-riscv-6.56.5.0-40.40.1~22.04.1UBUNTU-CVE-2023-52490
Ubuntu:22.04:LTSlinux-starfive-5.19no fix listedUBUNTU-CVE-2023-52490
Ubuntu:22.04:LTSlinux-starfive-6.2no fix listedUBUNTU-CVE-2023-52490
Ubuntu:22.04:LTSlinux-starfive-6.56.5.0-1015.16~22.04.1UBUNTU-CVE-2023-52490
Ubuntu:22.04:LTSlinux-starfive-6.56.5.0-1015.16~22.04.1USN-6819-1

Affected products (as reported)

VendorProductVersions
Linux Linux 8ca5f0ea52e1eef5e7dcbdff1d1afe602764ea93 – before 1ce870a2d85969e2c9dafd2af20f205494a490f664c8902ed4418317cd416c566f896bd4a92b2efc – before 9128bfbc5c80d8f4874dd0a0424d1f5fb010df1b64c8902ed4418317cd416c566f896bd4a92b2efc – before 3889a418b6eb9a1113fb989aaadecf2f6496476764c8902ed4418317cd416c566f896bd4a92b2efc – before d1adb25df7111de83b64655a80b5a135adbded616.1.116 – before 6.1.191
Linux Linux 6.3

Weakness: CWE-476 · Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

References