CVE-2021-47259: Vulnerability in Linux Linux
In the Linux kernel, the following vulnerability has been resolved: NFS: Fix use-after-free in nfs4_init_client() KASAN reports a use-after-free when attempting to mount two different exports through two different NICs that belong to the same server. Olga was able to hit this with kernels starting somewhere between 5.7 and 5.10, but I traced the patch that introduced the clear_bit() call to 4.13. So something must have changed in the refcounting of the clp pointer to make this call to nfs_put_client() the very last one.
AI Analysis
Technical Summary
CVE-2021-47259 is a high-severity use-after-free vulnerability in the Linux kernel's NFS (Network File System) client implementation, specifically within the nfs4_init_client() function. The flaw arises when mounting two different NFS exports through two different network interface cards (NICs) that connect to the same NFS server. This scenario triggers a use-after-free condition due to improper reference counting and memory management of the client pointer (clp). The vulnerability was introduced around Linux kernel version 4.13 with a patch involving a clear_bit() call, but it became exploitable in kernels between versions 5.7 and 5.10 due to changes in the refcounting logic. The use-after-free can lead to memory corruption, allowing an attacker to potentially execute arbitrary code, cause denial of service (system crash), or escalate privileges by manipulating kernel memory. The vulnerability affects multiple Linux kernel versions and has a CVSS v3.1 score of 7.5, indicating high severity. Exploitation requires network access to mount NFS exports and low privileges, but no user interaction is needed. No known exploits are currently reported in the wild. The vulnerability is categorized under CWE-416 (Use After Free).
Potential Impact
For European organizations, this vulnerability poses significant risks, especially for enterprises and service providers relying on Linux-based infrastructure with NFS mounts for file sharing and storage. Exploitation could lead to system crashes, disrupting critical services and causing availability issues. More critically, successful exploitation could allow attackers to execute arbitrary code with kernel privileges, compromising confidentiality and integrity of sensitive data. This is particularly concerning for sectors such as finance, healthcare, government, and critical infrastructure, where Linux servers are widely deployed. The vulnerability's network attack vector means that attackers can exploit it remotely if they can mount NFS exports, increasing the attack surface. Given the widespread use of Linux in European data centers, cloud environments, and enterprise networks, the impact could be broad if unpatched systems remain in operation.
Mitigation Recommendations
European organizations should prioritize patching affected Linux kernel versions to the latest stable releases where this vulnerability is fixed. Since the issue arises during mounting of NFS exports via multiple NICs, administrators should review and restrict NFS mount configurations to trusted servers and interfaces only. Network segmentation and firewall rules should limit NFS traffic to authorized hosts to reduce exposure. Employing kernel hardening techniques such as Kernel Address Space Layout Randomization (KASLR) and enabling Kernel Address Sanitizer (KASAN) in testing environments can help detect similar issues early. Monitoring kernel logs for unusual NFS client behavior and crashes can provide early warning signs. Additionally, organizations should audit and limit user privileges to prevent unauthorized mounting of NFS shares. Finally, maintaining an up-to-date inventory of Linux kernel versions in use across infrastructure will facilitate rapid identification and remediation of vulnerable systems.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Finland, Italy, Spain
CVE-2021-47259: Vulnerability in Linux Linux
Description
In the Linux kernel, the following vulnerability has been resolved: NFS: Fix use-after-free in nfs4_init_client() KASAN reports a use-after-free when attempting to mount two different exports through two different NICs that belong to the same server. Olga was able to hit this with kernels starting somewhere between 5.7 and 5.10, but I traced the patch that introduced the clear_bit() call to 4.13. So something must have changed in the refcounting of the clp pointer to make this call to nfs_put_client() the very last one.
AI-Powered Analysis
Technical Analysis
CVE-2021-47259 is a high-severity use-after-free vulnerability in the Linux kernel's NFS (Network File System) client implementation, specifically within the nfs4_init_client() function. The flaw arises when mounting two different NFS exports through two different network interface cards (NICs) that connect to the same NFS server. This scenario triggers a use-after-free condition due to improper reference counting and memory management of the client pointer (clp). The vulnerability was introduced around Linux kernel version 4.13 with a patch involving a clear_bit() call, but it became exploitable in kernels between versions 5.7 and 5.10 due to changes in the refcounting logic. The use-after-free can lead to memory corruption, allowing an attacker to potentially execute arbitrary code, cause denial of service (system crash), or escalate privileges by manipulating kernel memory. The vulnerability affects multiple Linux kernel versions and has a CVSS v3.1 score of 7.5, indicating high severity. Exploitation requires network access to mount NFS exports and low privileges, but no user interaction is needed. No known exploits are currently reported in the wild. The vulnerability is categorized under CWE-416 (Use After Free).
Potential Impact
For European organizations, this vulnerability poses significant risks, especially for enterprises and service providers relying on Linux-based infrastructure with NFS mounts for file sharing and storage. Exploitation could lead to system crashes, disrupting critical services and causing availability issues. More critically, successful exploitation could allow attackers to execute arbitrary code with kernel privileges, compromising confidentiality and integrity of sensitive data. This is particularly concerning for sectors such as finance, healthcare, government, and critical infrastructure, where Linux servers are widely deployed. The vulnerability's network attack vector means that attackers can exploit it remotely if they can mount NFS exports, increasing the attack surface. Given the widespread use of Linux in European data centers, cloud environments, and enterprise networks, the impact could be broad if unpatched systems remain in operation.
Mitigation Recommendations
European organizations should prioritize patching affected Linux kernel versions to the latest stable releases where this vulnerability is fixed. Since the issue arises during mounting of NFS exports via multiple NICs, administrators should review and restrict NFS mount configurations to trusted servers and interfaces only. Network segmentation and firewall rules should limit NFS traffic to authorized hosts to reduce exposure. Employing kernel hardening techniques such as Kernel Address Space Layout Randomization (KASLR) and enabling Kernel Address Sanitizer (KASAN) in testing environments can help detect similar issues early. Monitoring kernel logs for unusual NFS client behavior and crashes can provide early warning signs. Additionally, organizations should audit and limit user privileges to prevent unauthorized mounting of NFS shares. Finally, maintaining an up-to-date inventory of Linux kernel versions in use across infrastructure will facilitate rapid identification and remediation of vulnerable systems.
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-05-21T13:27:52.125Z
- Cisa Enriched
- true
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 682d9835c4522896dcbea212
Added to database: 5/21/2025, 9:09:09 AM
Last enriched: 7/3/2025, 6:09:43 AM
Last updated: 8/13/2025, 8:53:16 PM
Views: 13
Related Threats
CVE-2025-8975: Cross Site Scripting in givanz Vvveb
MediumCVE-2025-55716: CWE-862 Missing Authorization in VeronaLabs WP Statistics
MediumCVE-2025-55714: CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in Crocoblock JetElements For Elementor
MediumCVE-2025-55713: CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in CreativeThemes Blocksy
MediumCVE-2025-55712: CWE-862 Missing Authorization in POSIMYTH The Plus Addons for Elementor Page Builder Lite
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.