CVE-2025-22036: Vulnerability in Linux Linux
In the Linux kernel, the following vulnerability has been resolved: exfat: fix random stack corruption after get_block When get_block is called with a buffer_head allocated on the stack, such as do_mpage_readpage, stack corruption due to buffer_head UAF may occur in the following race condition situation. <CPU 0> <CPU 1> mpage_read_folio <<bh on stack>> do_mpage_readpage exfat_get_block bh_read __bh_read get_bh(bh) submit_bh wait_on_buffer ... end_buffer_read_sync __end_buffer_read_notouch unlock_buffer <<keep going>> ... ... ... ... <<bh is not valid out of mpage_read_folio>> . . another_function <<variable A on stack>> put_bh(bh) atomic_dec(bh->b_count) * stack corruption here * This patch returns -EAGAIN if a folio does not have buffers when bh_read needs to be called. By doing this, the caller can fallback to functions like block_read_full_folio(), create a buffer_head in the folio, and then call get_block again. Let's do not call bh_read() with on-stack buffer_head.
AI Analysis
Technical Summary
CVE-2025-22036 is a vulnerability identified in the Linux kernel's exFAT filesystem driver, specifically related to the handling of buffer_head structures on the stack during block read operations. The flaw arises when the function get_block is called with a buffer_head allocated on the stack, such as in the do_mpage_readpage function. Under certain race conditions involving concurrent CPU operations, this can lead to use-after-free (UAF) scenarios where the buffer_head reference count is decremented prematurely, causing random stack corruption. The vulnerability is triggered when one CPU thread is executing mpage_read_folio and its associated functions, while another CPU thread concurrently manipulates the buffer_head reference count, leading to the buffer_head becoming invalid while still in use. The patch for this vulnerability changes the behavior of bh_read to return -EAGAIN if the folio lacks buffers, prompting the caller to fallback to safer functions like block_read_full_folio that create a buffer_head in the folio before retrying get_block. This prevents calling bh_read with an on-stack buffer_head, thereby avoiding the race condition and stack corruption. This vulnerability affects Linux kernel versions identified by the commit hash 11a347fb6cef62ce47e84b97c45f2b2497c7593b and was published on April 16, 2025. There are no known exploits in the wild at this time, and no CVSS score has been assigned yet.
Potential Impact
For European organizations, this vulnerability poses a risk primarily to systems running Linux kernels with the affected exFAT driver code, especially those handling exFAT-formatted storage devices. The exFAT filesystem is commonly used for removable storage media such as USB drives and SD cards, which are frequently used in enterprise environments for data transfer and backup. Exploitation of this vulnerability could lead to stack corruption, potentially allowing local attackers or malicious processes to cause system instability, crashes (denial of service), or in worst cases, arbitrary code execution with kernel privileges. This could compromise the confidentiality, integrity, and availability of affected systems. Given the widespread use of Linux in European data centers, cloud infrastructure, and embedded systems, the vulnerability could impact critical infrastructure, enterprise servers, and endpoint devices. The lack of known exploits currently reduces immediate risk, but the complexity of the race condition and kernel-level impact means that once exploited, the consequences could be severe. Organizations relying on Linux systems that mount exFAT filesystems should consider the risk of local privilege escalation or denial of service attacks, especially in multi-tenant or shared environments.
Mitigation Recommendations
European organizations should prioritize updating their Linux kernels to versions that include the patch for CVE-2025-22036 as soon as vendor updates become available. Until patches are applied, organizations should consider the following mitigations: 1) Limit or restrict the use of exFAT-formatted removable media on critical systems, or enforce strict scanning and validation of such media before use. 2) Employ kernel hardening techniques such as Kernel Address Space Layout Randomization (KASLR), stack canaries, and control flow integrity to reduce the impact of potential exploitation. 3) Monitor system logs and kernel messages for unusual buffer_head or filesystem-related errors that might indicate exploitation attempts. 4) Use mandatory access controls (e.g., SELinux, AppArmor) to restrict the ability of untrusted users or processes to mount or access exFAT filesystems. 5) In environments where kernel updates are delayed, consider disabling exFAT support if not required, or mounting exFAT devices in user space via FUSE-based drivers as a temporary workaround. 6) Conduct thorough testing of kernel updates in staging environments to ensure stability and compatibility before production deployment.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Finland, Poland, Italy, Spain
CVE-2025-22036: Vulnerability in Linux Linux
Description
In the Linux kernel, the following vulnerability has been resolved: exfat: fix random stack corruption after get_block When get_block is called with a buffer_head allocated on the stack, such as do_mpage_readpage, stack corruption due to buffer_head UAF may occur in the following race condition situation. <CPU 0> <CPU 1> mpage_read_folio <<bh on stack>> do_mpage_readpage exfat_get_block bh_read __bh_read get_bh(bh) submit_bh wait_on_buffer ... end_buffer_read_sync __end_buffer_read_notouch unlock_buffer <<keep going>> ... ... ... ... <<bh is not valid out of mpage_read_folio>> . . another_function <<variable A on stack>> put_bh(bh) atomic_dec(bh->b_count) * stack corruption here * This patch returns -EAGAIN if a folio does not have buffers when bh_read needs to be called. By doing this, the caller can fallback to functions like block_read_full_folio(), create a buffer_head in the folio, and then call get_block again. Let's do not call bh_read() with on-stack buffer_head.
AI-Powered Analysis
Technical Analysis
CVE-2025-22036 is a vulnerability identified in the Linux kernel's exFAT filesystem driver, specifically related to the handling of buffer_head structures on the stack during block read operations. The flaw arises when the function get_block is called with a buffer_head allocated on the stack, such as in the do_mpage_readpage function. Under certain race conditions involving concurrent CPU operations, this can lead to use-after-free (UAF) scenarios where the buffer_head reference count is decremented prematurely, causing random stack corruption. The vulnerability is triggered when one CPU thread is executing mpage_read_folio and its associated functions, while another CPU thread concurrently manipulates the buffer_head reference count, leading to the buffer_head becoming invalid while still in use. The patch for this vulnerability changes the behavior of bh_read to return -EAGAIN if the folio lacks buffers, prompting the caller to fallback to safer functions like block_read_full_folio that create a buffer_head in the folio before retrying get_block. This prevents calling bh_read with an on-stack buffer_head, thereby avoiding the race condition and stack corruption. This vulnerability affects Linux kernel versions identified by the commit hash 11a347fb6cef62ce47e84b97c45f2b2497c7593b and was published on April 16, 2025. There are no known exploits in the wild at this time, and no CVSS score has been assigned yet.
Potential Impact
For European organizations, this vulnerability poses a risk primarily to systems running Linux kernels with the affected exFAT driver code, especially those handling exFAT-formatted storage devices. The exFAT filesystem is commonly used for removable storage media such as USB drives and SD cards, which are frequently used in enterprise environments for data transfer and backup. Exploitation of this vulnerability could lead to stack corruption, potentially allowing local attackers or malicious processes to cause system instability, crashes (denial of service), or in worst cases, arbitrary code execution with kernel privileges. This could compromise the confidentiality, integrity, and availability of affected systems. Given the widespread use of Linux in European data centers, cloud infrastructure, and embedded systems, the vulnerability could impact critical infrastructure, enterprise servers, and endpoint devices. The lack of known exploits currently reduces immediate risk, but the complexity of the race condition and kernel-level impact means that once exploited, the consequences could be severe. Organizations relying on Linux systems that mount exFAT filesystems should consider the risk of local privilege escalation or denial of service attacks, especially in multi-tenant or shared environments.
Mitigation Recommendations
European organizations should prioritize updating their Linux kernels to versions that include the patch for CVE-2025-22036 as soon as vendor updates become available. Until patches are applied, organizations should consider the following mitigations: 1) Limit or restrict the use of exFAT-formatted removable media on critical systems, or enforce strict scanning and validation of such media before use. 2) Employ kernel hardening techniques such as Kernel Address Space Layout Randomization (KASLR), stack canaries, and control flow integrity to reduce the impact of potential exploitation. 3) Monitor system logs and kernel messages for unusual buffer_head or filesystem-related errors that might indicate exploitation attempts. 4) Use mandatory access controls (e.g., SELinux, AppArmor) to restrict the ability of untrusted users or processes to mount or access exFAT filesystems. 5) In environments where kernel updates are delayed, consider disabling exFAT support if not required, or mounting exFAT devices in user space via FUSE-based drivers as a temporary workaround. 6) Conduct thorough testing of kernel updates in staging environments to ensure stability and compatibility before production deployment.
Affected Countries
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-29T08:45:45.809Z
- Cisa Enriched
- false
- Cvss Version
- null
- State
- PUBLISHED
Threat ID: 682d9831c4522896dcbe7ef0
Added to database: 5/21/2025, 9:09:05 AM
Last enriched: 7/3/2025, 8:11:45 PM
Last updated: 7/27/2025, 11:44:45 PM
Views: 9
Related Threats
CVE-2025-43734: CWE-79 Improper Neutralization of Input During Web Page Generation (XSS or 'Cross-site Scripting') in Liferay Portal
MediumCVE-2025-36124: CWE-268 Privilege Chaining in IBM WebSphere Application Server Liberty
MediumCVE-2025-55168: CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') in LabRedesCefetRJ WeGIA
CriticalCVE-2025-53744: Escalation of privilege in Fortinet FortiOS
MediumCVE-2025-52970: Improper access control in Fortinet FortiWeb
HighActions
Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.