CVE-2024-56612: Vulnerability in Linux Linux
In the Linux kernel, the following vulnerability has been resolved: mm/gup: handle NULL pages in unpin_user_pages() The recent addition of "pofs" (pages or folios) handling to gup has a flaw: it assumes that unpin_user_pages() handles NULL pages in the pages** array. That's not the case, as I discovered when I ran on a new configuration on my test machine. Fix this by skipping NULL pages in unpin_user_pages(), just like unpin_folios() already does. Details: when booting on x86 with "numa=fake=2 movablecore=4G" on Linux 6.12, and running this: tools/testing/selftests/mm/gup_longterm ...I get the following crash: BUG: kernel NULL pointer dereference, address: 0000000000000008 RIP: 0010:sanity_check_pinned_pages+0x3a/0x2d0 ... Call Trace: <TASK> ? __die_body+0x66/0xb0 ? page_fault_oops+0x30c/0x3b0 ? do_user_addr_fault+0x6c3/0x720 ? irqentry_enter+0x34/0x60 ? exc_page_fault+0x68/0x100 ? asm_exc_page_fault+0x22/0x30 ? sanity_check_pinned_pages+0x3a/0x2d0 unpin_user_pages+0x24/0xe0 check_and_migrate_movable_pages_or_folios+0x455/0x4b0 __gup_longterm_locked+0x3bf/0x820 ? mmap_read_lock_killable+0x12/0x50 ? __pfx_mmap_read_lock_killable+0x10/0x10 pin_user_pages+0x66/0xa0 gup_test_ioctl+0x358/0xb20 __se_sys_ioctl+0x6b/0xc0 do_syscall_64+0x7b/0x150 entry_SYSCALL_64_after_hwframe+0x76/0x7e
AI Analysis
Technical Summary
CVE-2024-56612 is a vulnerability identified in the Linux kernel's memory management subsystem, specifically within the handling of user pages in the function unpin_user_pages(). The issue arises from a recent addition of 'pofs' (pages or folios) handling to the get_user_pages (gup) mechanism, which incorrectly assumes that unpin_user_pages() can handle NULL pointers in the pages array. This assumption is flawed, as unpin_user_pages() does not skip NULL pages, leading to a NULL pointer dereference and consequent kernel crash. The vulnerability manifests under particular kernel configurations, such as booting on x86 architectures with parameters like 'numa=fake=2 movablecore=4G', and running specific tests (e.g., gup_longterm). The crash occurs in the function sanity_check_pinned_pages(), triggered by unpin_user_pages() processing NULL page pointers, resulting in a kernel BUG and system instability. The root cause is that unpin_user_pages() fails to skip NULL entries in the pages array, unlike unpin_folios(), which already implements this safeguard. The fix involves modifying unpin_user_pages() to skip NULL pages, preventing the NULL pointer dereference. This vulnerability affects the Linux kernel versions containing the flawed commit (noted by the affected version hashes), and it is relevant to systems using the affected kernel versions with the described configurations. No known exploits are currently reported in the wild, and no CVSS score has been assigned yet.
Potential Impact
For European organizations, the impact of CVE-2024-56612 primarily concerns system stability and availability. The vulnerability causes kernel crashes due to NULL pointer dereferences, which can lead to denial of service (DoS) conditions on affected Linux systems. Since Linux is widely used in servers, cloud infrastructure, embedded devices, and desktops across Europe, any system running the affected kernel versions with the vulnerable configuration could experience unexpected reboots or service interruptions. This is particularly critical for organizations relying on high availability environments, such as financial institutions, telecommunications providers, and critical infrastructure operators. Although the vulnerability does not directly lead to privilege escalation or data leakage, the induced system crashes can disrupt business operations and potentially cause data loss if systems are not properly backed up or if crashes occur during critical transactions. The lack of known exploits reduces immediate risk, but the vulnerability's presence in the kernel memory management code means that future exploit development could increase threat severity. European organizations using customized or newer Linux kernels with advanced memory management features should prioritize patching to maintain system reliability.
Mitigation Recommendations
To mitigate CVE-2024-56612, European organizations should: 1) Identify and inventory Linux systems running kernel versions containing the vulnerable commit hashes or affected branches, especially those with configurations involving NUMA and movable memory cores. 2) Apply the official Linux kernel patches that fix unpin_user_pages() to handle NULL pages correctly; if patches are not yet available, monitor Linux kernel mailing lists and repositories for updates and backport fixes where feasible. 3) Test kernel updates in controlled environments to ensure stability before wide deployment, focusing on workloads that utilize user page pinning or memory migration features. 4) Implement robust monitoring and alerting for kernel crashes and system reboots to detect potential exploitation or instability early. 5) For critical systems, consider temporary configuration changes to disable or limit features that trigger the vulnerable code paths, if feasible, until patches are applied. 6) Maintain regular backups and disaster recovery plans to mitigate the impact of unexpected system crashes. 7) Engage with Linux distribution vendors for timely security updates and advisories related to this vulnerability.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Finland, Italy, Spain, Poland, Belgium
CVE-2024-56612: Vulnerability in Linux Linux
Description
In the Linux kernel, the following vulnerability has been resolved: mm/gup: handle NULL pages in unpin_user_pages() The recent addition of "pofs" (pages or folios) handling to gup has a flaw: it assumes that unpin_user_pages() handles NULL pages in the pages** array. That's not the case, as I discovered when I ran on a new configuration on my test machine. Fix this by skipping NULL pages in unpin_user_pages(), just like unpin_folios() already does. Details: when booting on x86 with "numa=fake=2 movablecore=4G" on Linux 6.12, and running this: tools/testing/selftests/mm/gup_longterm ...I get the following crash: BUG: kernel NULL pointer dereference, address: 0000000000000008 RIP: 0010:sanity_check_pinned_pages+0x3a/0x2d0 ... Call Trace: <TASK> ? __die_body+0x66/0xb0 ? page_fault_oops+0x30c/0x3b0 ? do_user_addr_fault+0x6c3/0x720 ? irqentry_enter+0x34/0x60 ? exc_page_fault+0x68/0x100 ? asm_exc_page_fault+0x22/0x30 ? sanity_check_pinned_pages+0x3a/0x2d0 unpin_user_pages+0x24/0xe0 check_and_migrate_movable_pages_or_folios+0x455/0x4b0 __gup_longterm_locked+0x3bf/0x820 ? mmap_read_lock_killable+0x12/0x50 ? __pfx_mmap_read_lock_killable+0x10/0x10 pin_user_pages+0x66/0xa0 gup_test_ioctl+0x358/0xb20 __se_sys_ioctl+0x6b/0xc0 do_syscall_64+0x7b/0x150 entry_SYSCALL_64_after_hwframe+0x76/0x7e
AI-Powered Analysis
Technical Analysis
CVE-2024-56612 is a vulnerability identified in the Linux kernel's memory management subsystem, specifically within the handling of user pages in the function unpin_user_pages(). The issue arises from a recent addition of 'pofs' (pages or folios) handling to the get_user_pages (gup) mechanism, which incorrectly assumes that unpin_user_pages() can handle NULL pointers in the pages array. This assumption is flawed, as unpin_user_pages() does not skip NULL pages, leading to a NULL pointer dereference and consequent kernel crash. The vulnerability manifests under particular kernel configurations, such as booting on x86 architectures with parameters like 'numa=fake=2 movablecore=4G', and running specific tests (e.g., gup_longterm). The crash occurs in the function sanity_check_pinned_pages(), triggered by unpin_user_pages() processing NULL page pointers, resulting in a kernel BUG and system instability. The root cause is that unpin_user_pages() fails to skip NULL entries in the pages array, unlike unpin_folios(), which already implements this safeguard. The fix involves modifying unpin_user_pages() to skip NULL pages, preventing the NULL pointer dereference. This vulnerability affects the Linux kernel versions containing the flawed commit (noted by the affected version hashes), and it is relevant to systems using the affected kernel versions with the described configurations. No known exploits are currently reported in the wild, and no CVSS score has been assigned yet.
Potential Impact
For European organizations, the impact of CVE-2024-56612 primarily concerns system stability and availability. The vulnerability causes kernel crashes due to NULL pointer dereferences, which can lead to denial of service (DoS) conditions on affected Linux systems. Since Linux is widely used in servers, cloud infrastructure, embedded devices, and desktops across Europe, any system running the affected kernel versions with the vulnerable configuration could experience unexpected reboots or service interruptions. This is particularly critical for organizations relying on high availability environments, such as financial institutions, telecommunications providers, and critical infrastructure operators. Although the vulnerability does not directly lead to privilege escalation or data leakage, the induced system crashes can disrupt business operations and potentially cause data loss if systems are not properly backed up or if crashes occur during critical transactions. The lack of known exploits reduces immediate risk, but the vulnerability's presence in the kernel memory management code means that future exploit development could increase threat severity. European organizations using customized or newer Linux kernels with advanced memory management features should prioritize patching to maintain system reliability.
Mitigation Recommendations
To mitigate CVE-2024-56612, European organizations should: 1) Identify and inventory Linux systems running kernel versions containing the vulnerable commit hashes or affected branches, especially those with configurations involving NUMA and movable memory cores. 2) Apply the official Linux kernel patches that fix unpin_user_pages() to handle NULL pages correctly; if patches are not yet available, monitor Linux kernel mailing lists and repositories for updates and backport fixes where feasible. 3) Test kernel updates in controlled environments to ensure stability before wide deployment, focusing on workloads that utilize user page pinning or memory migration features. 4) Implement robust monitoring and alerting for kernel crashes and system reboots to detect potential exploitation or instability early. 5) For critical systems, consider temporary configuration changes to disable or limit features that trigger the vulnerable code paths, if feasible, until patches are applied. 6) Maintain regular backups and disaster recovery plans to mitigate the impact of unexpected system crashes. 7) Engage with Linux distribution vendors for timely security updates and advisories related to this vulnerability.
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- Linux
- Date Reserved
- 2024-12-27T14:03:06.013Z
- Cisa Enriched
- false
- Cvss Version
- null
- State
- PUBLISHED
Threat ID: 682d9823c4522896dcbdf3b2
Added to database: 5/21/2025, 9:08:51 AM
Last enriched: 6/28/2025, 12:26:06 PM
Last updated: 7/30/2025, 10:17:38 PM
Views: 8
Related Threats
CVE-2025-8293: CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in Theerawat Patthawee Intl DateTime Calendar
MediumCVE-2025-7686: CWE-352 Cross-Site Request Forgery (CSRF) in lmyoaoa weichuncai(WP伪春菜)
MediumCVE-2025-7684: CWE-352 Cross-Site Request Forgery (CSRF) in remysharp Last.fm Recent Album Artwork
MediumCVE-2025-7683: CWE-352 Cross-Site Request Forgery (CSRF) in janyksteenbeek LatestCheckins
MediumCVE-2025-7668: CWE-352 Cross-Site Request Forgery (CSRF) in timothyja Linux Promotional Plugin
MediumActions
Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.
External Links
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.