CVE-2024-53138: Vulnerability in Linux Linux
In the Linux kernel, the following vulnerability has been resolved: net/mlx5e: kTLS, Fix incorrect page refcounting The kTLS tx handling code is using a mix of get_page() and page_ref_inc() APIs to increment the page reference. But on the release path (mlx5e_ktls_tx_handle_resync_dump_comp()), only put_page() is used. This is an issue when using pages from large folios: the get_page() references are stored on the folio page while the page_ref_inc() references are stored directly in the given page. On release the folio page will be dereferenced too many times. This was found while doing kTLS testing with sendfile() + ZC when the served file was read from NFS on a kernel with NFS large folios support (commit 49b29a573da8 ("nfs: add support for large folios")).
AI Analysis
Technical Summary
CVE-2024-53138 is a vulnerability identified in the Linux kernel's Mellanox mlx5 Ethernet driver, specifically within the kernel TLS (kTLS) transmit (tx) handling code. The issue arises from improper reference counting of memory pages when handling large folios, which are contiguous groups of pages treated as a single unit to optimize memory management. The kTLS tx code incorrectly mixes the use of get_page() and page_ref_inc() APIs to increment page references, but on the release path (mlx5e_ktls_tx_handle_resync_dump_comp()), only put_page() is called to decrement references. This mismatch leads to an imbalance in reference counting, causing the folio page to be dereferenced more times than it was incremented. This can result in premature freeing of memory pages, potentially leading to use-after-free conditions, memory corruption, or kernel crashes. The vulnerability was discovered during testing involving kTLS with sendfile() combined with zero-copy (ZC) operations where files were served from NFS shares on kernels supporting NFS large folios (introduced in commit 49b29a573da8). While no known exploits are currently reported in the wild, the flaw affects Linux kernels using the mlx5e driver with kTLS and large folio support, which are common in high-performance networking environments. The vulnerability could be triggered by crafted network traffic or specific I/O patterns involving TLS offloading and NFS file serving, potentially impacting system stability and security.
Potential Impact
For European organizations, particularly those operating data centers, cloud services, or high-performance computing environments relying on Linux servers with Mellanox network adapters and kTLS offloading, this vulnerability poses a risk of system instability or denial of service due to kernel crashes or memory corruption. Confidentiality and integrity impacts are less direct but could arise if memory corruption leads to information leakage or privilege escalation in complex attack scenarios. Organizations using NFS with large folio support and zero-copy sendfile optimizations are especially at risk. Disruptions could affect critical infrastructure, financial services, telecommunications, and research institutions prevalent in Europe that depend on robust Linux networking stacks. The lack of known exploits reduces immediate risk, but the complexity of the flaw and its presence in kernel-level code warrant prompt attention to avoid potential exploitation or operational outages.
Mitigation Recommendations
European organizations should prioritize updating their Linux kernels to versions that include the patch fixing CVE-2024-53138 once available. Until patches are applied, mitigating risk involves disabling kTLS offloading on mlx5 devices if feasible, or avoiding configurations that combine kTLS with sendfile() and zero-copy operations over NFS with large folio support. Network administrators should monitor kernel logs for signs of memory corruption or crashes related to mlx5e kTLS operations. Additionally, organizations should audit their use of NFS large folios and consider temporarily disabling large folio support if it is not critical to performance. Close coordination with hardware vendors and Linux distribution maintainers is recommended to obtain timely patches and guidance. Implementing robust kernel crash monitoring and automated recovery mechanisms can reduce downtime in case of exploitation or accidental triggering of the flaw.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Finland, Denmark, Ireland
CVE-2024-53138: Vulnerability in Linux Linux
Description
In the Linux kernel, the following vulnerability has been resolved: net/mlx5e: kTLS, Fix incorrect page refcounting The kTLS tx handling code is using a mix of get_page() and page_ref_inc() APIs to increment the page reference. But on the release path (mlx5e_ktls_tx_handle_resync_dump_comp()), only put_page() is used. This is an issue when using pages from large folios: the get_page() references are stored on the folio page while the page_ref_inc() references are stored directly in the given page. On release the folio page will be dereferenced too many times. This was found while doing kTLS testing with sendfile() + ZC when the served file was read from NFS on a kernel with NFS large folios support (commit 49b29a573da8 ("nfs: add support for large folios")).
AI-Powered Analysis
Technical Analysis
CVE-2024-53138 is a vulnerability identified in the Linux kernel's Mellanox mlx5 Ethernet driver, specifically within the kernel TLS (kTLS) transmit (tx) handling code. The issue arises from improper reference counting of memory pages when handling large folios, which are contiguous groups of pages treated as a single unit to optimize memory management. The kTLS tx code incorrectly mixes the use of get_page() and page_ref_inc() APIs to increment page references, but on the release path (mlx5e_ktls_tx_handle_resync_dump_comp()), only put_page() is called to decrement references. This mismatch leads to an imbalance in reference counting, causing the folio page to be dereferenced more times than it was incremented. This can result in premature freeing of memory pages, potentially leading to use-after-free conditions, memory corruption, or kernel crashes. The vulnerability was discovered during testing involving kTLS with sendfile() combined with zero-copy (ZC) operations where files were served from NFS shares on kernels supporting NFS large folios (introduced in commit 49b29a573da8). While no known exploits are currently reported in the wild, the flaw affects Linux kernels using the mlx5e driver with kTLS and large folio support, which are common in high-performance networking environments. The vulnerability could be triggered by crafted network traffic or specific I/O patterns involving TLS offloading and NFS file serving, potentially impacting system stability and security.
Potential Impact
For European organizations, particularly those operating data centers, cloud services, or high-performance computing environments relying on Linux servers with Mellanox network adapters and kTLS offloading, this vulnerability poses a risk of system instability or denial of service due to kernel crashes or memory corruption. Confidentiality and integrity impacts are less direct but could arise if memory corruption leads to information leakage or privilege escalation in complex attack scenarios. Organizations using NFS with large folio support and zero-copy sendfile optimizations are especially at risk. Disruptions could affect critical infrastructure, financial services, telecommunications, and research institutions prevalent in Europe that depend on robust Linux networking stacks. The lack of known exploits reduces immediate risk, but the complexity of the flaw and its presence in kernel-level code warrant prompt attention to avoid potential exploitation or operational outages.
Mitigation Recommendations
European organizations should prioritize updating their Linux kernels to versions that include the patch fixing CVE-2024-53138 once available. Until patches are applied, mitigating risk involves disabling kTLS offloading on mlx5 devices if feasible, or avoiding configurations that combine kTLS with sendfile() and zero-copy operations over NFS with large folio support. Network administrators should monitor kernel logs for signs of memory corruption or crashes related to mlx5e kTLS operations. Additionally, organizations should audit their use of NFS large folios and consider temporarily disabling large folio support if it is not critical to performance. Close coordination with hardware vendors and Linux distribution maintainers is recommended to obtain timely patches and guidance. Implementing robust kernel crash monitoring and automated recovery mechanisms can reduce downtime in case of exploitation or accidental triggering of the flaw.
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-11-19T17:17:24.996Z
- Cisa Enriched
- false
- Cvss Version
- null
- State
- PUBLISHED
Threat ID: 682d9824c4522896dcbdfafa
Added to database: 5/21/2025, 9:08:52 AM
Last enriched: 6/28/2025, 3:26:31 PM
Last updated: 8/18/2025, 11:32:54 PM
Views: 17
Related Threats
CVE-2025-52287: n/a
UnknownCVE-2025-55581: n/a
HighCVE-2025-52085: n/a
HighCVE-2025-43760: CWE-79: Cross-site Scripting in Liferay Portal
MediumCVE-2025-55613: n/a
HighActions
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.