CVE-2021-47340: Vulnerability in Linux Linux
In the Linux kernel, the following vulnerability has been resolved: jfs: fix GPF in diFree Avoid passing inode with JFS_SBI(inode->i_sb)->ipimap == NULL to diFree()[1]. GFP will appear: struct inode *ipimap = JFS_SBI(ip->i_sb)->ipimap; struct inomap *imap = JFS_IP(ipimap)->i_imap; JFS_IP() will return invalid pointer when ipimap == NULL Call Trace: diFree+0x13d/0x2dc0 fs/jfs/jfs_imap.c:853 [1] jfs_evict_inode+0x2c9/0x370 fs/jfs/inode.c:154 evict+0x2ed/0x750 fs/inode.c:578 iput_final fs/inode.c:1654 [inline] iput.part.0+0x3fe/0x820 fs/inode.c:1680 iput+0x58/0x70 fs/inode.c:1670
AI Analysis
Technical Summary
CVE-2021-47340 is a vulnerability identified in the Linux kernel's JFS (Journaled File System) implementation. The issue arises from improper handling of inode pointers within the diFree function in the JFS filesystem code. Specifically, the vulnerability occurs when the inode's superblock's ipimap pointer is NULL, but the code proceeds to dereference this pointer via the JFS_IP macro, leading to an invalid pointer dereference. This results in a General Protection Fault (GPF), which is a type of kernel crash. The call trace indicates that the fault occurs during inode eviction and finalization processes (jfs_evict_inode, evict, iput_final, iput), which are critical for filesystem integrity and resource management. The root cause is that diFree does not properly check whether ipimap is NULL before dereferencing it, causing a kernel panic or crash when this condition is met. This vulnerability affects Linux kernel versions identified by the given commit hashes (all the same hash repeated), indicating a specific code revision prior to the fix. No known exploits are currently reported in the wild, and no CVSS score has been assigned yet. The vulnerability was published recently on May 21, 2024, and has been acknowledged by the Linux project. The impact is primarily a denial of service (DoS) due to kernel crash, which can disrupt system availability and potentially lead to data loss if the crash occurs during critical filesystem operations.
Potential Impact
For European organizations, this vulnerability poses a risk primarily in environments using the JFS filesystem on Linux systems. JFS, while less common than ext4 or XFS, is still used in some enterprise and legacy systems, especially in storage appliances, embedded systems, or specialized Linux distributions. Exploitation of this vulnerability can cause system crashes leading to denial of service, interrupting business operations, and potentially causing data corruption or loss if the crash occurs during write operations. Systems running critical infrastructure, servers, or embedded devices with JFS are at risk of unexpected downtime. Given the kernel-level nature of the vulnerability, recovery may require system reboots and filesystem checks, impacting operational continuity. Although no exploits are known in the wild, the vulnerability's presence in the kernel means that attackers with local access or the ability to trigger inode eviction on JFS filesystems could cause crashes. This could be leveraged in multi-tenant environments or by malicious insiders. The impact on confidentiality and integrity is limited since the vulnerability does not directly allow code execution or privilege escalation, but availability impact is significant.
Mitigation Recommendations
European organizations should prioritize patching Linux kernel versions affected by this vulnerability by applying the latest kernel updates from their distribution vendors that include the fix for CVE-2021-47340. Since the vulnerability is triggered by inode eviction on JFS filesystems, organizations should audit their systems to identify any usage of JFS and consider migrating critical data to more widely supported and actively maintained filesystems like ext4 or XFS. For systems where patching is delayed, administrators should limit untrusted user access and restrict operations that could trigger inode eviction on JFS volumes. Monitoring kernel logs for signs of GPF or inode eviction failures can help detect attempts to exploit this vulnerability. Additionally, implementing robust backup and recovery procedures is essential to mitigate potential data loss from unexpected crashes. In virtualized or containerized environments, isolating workloads that use JFS can reduce the blast radius of potential crashes. Finally, organizations should stay informed about any emerging exploits or additional patches related to this vulnerability.
Affected Countries
Germany, France, United Kingdom, Netherlands, Italy, Spain, Poland, Sweden, Belgium, Finland
CVE-2021-47340: Vulnerability in Linux Linux
Description
In the Linux kernel, the following vulnerability has been resolved: jfs: fix GPF in diFree Avoid passing inode with JFS_SBI(inode->i_sb)->ipimap == NULL to diFree()[1]. GFP will appear: struct inode *ipimap = JFS_SBI(ip->i_sb)->ipimap; struct inomap *imap = JFS_IP(ipimap)->i_imap; JFS_IP() will return invalid pointer when ipimap == NULL Call Trace: diFree+0x13d/0x2dc0 fs/jfs/jfs_imap.c:853 [1] jfs_evict_inode+0x2c9/0x370 fs/jfs/inode.c:154 evict+0x2ed/0x750 fs/inode.c:578 iput_final fs/inode.c:1654 [inline] iput.part.0+0x3fe/0x820 fs/inode.c:1680 iput+0x58/0x70 fs/inode.c:1670
AI-Powered Analysis
Technical Analysis
CVE-2021-47340 is a vulnerability identified in the Linux kernel's JFS (Journaled File System) implementation. The issue arises from improper handling of inode pointers within the diFree function in the JFS filesystem code. Specifically, the vulnerability occurs when the inode's superblock's ipimap pointer is NULL, but the code proceeds to dereference this pointer via the JFS_IP macro, leading to an invalid pointer dereference. This results in a General Protection Fault (GPF), which is a type of kernel crash. The call trace indicates that the fault occurs during inode eviction and finalization processes (jfs_evict_inode, evict, iput_final, iput), which are critical for filesystem integrity and resource management. The root cause is that diFree does not properly check whether ipimap is NULL before dereferencing it, causing a kernel panic or crash when this condition is met. This vulnerability affects Linux kernel versions identified by the given commit hashes (all the same hash repeated), indicating a specific code revision prior to the fix. No known exploits are currently reported in the wild, and no CVSS score has been assigned yet. The vulnerability was published recently on May 21, 2024, and has been acknowledged by the Linux project. The impact is primarily a denial of service (DoS) due to kernel crash, which can disrupt system availability and potentially lead to data loss if the crash occurs during critical filesystem operations.
Potential Impact
For European organizations, this vulnerability poses a risk primarily in environments using the JFS filesystem on Linux systems. JFS, while less common than ext4 or XFS, is still used in some enterprise and legacy systems, especially in storage appliances, embedded systems, or specialized Linux distributions. Exploitation of this vulnerability can cause system crashes leading to denial of service, interrupting business operations, and potentially causing data corruption or loss if the crash occurs during write operations. Systems running critical infrastructure, servers, or embedded devices with JFS are at risk of unexpected downtime. Given the kernel-level nature of the vulnerability, recovery may require system reboots and filesystem checks, impacting operational continuity. Although no exploits are known in the wild, the vulnerability's presence in the kernel means that attackers with local access or the ability to trigger inode eviction on JFS filesystems could cause crashes. This could be leveraged in multi-tenant environments or by malicious insiders. The impact on confidentiality and integrity is limited since the vulnerability does not directly allow code execution or privilege escalation, but availability impact is significant.
Mitigation Recommendations
European organizations should prioritize patching Linux kernel versions affected by this vulnerability by applying the latest kernel updates from their distribution vendors that include the fix for CVE-2021-47340. Since the vulnerability is triggered by inode eviction on JFS filesystems, organizations should audit their systems to identify any usage of JFS and consider migrating critical data to more widely supported and actively maintained filesystems like ext4 or XFS. For systems where patching is delayed, administrators should limit untrusted user access and restrict operations that could trigger inode eviction on JFS volumes. Monitoring kernel logs for signs of GPF or inode eviction failures can help detect attempts to exploit this vulnerability. Additionally, implementing robust backup and recovery procedures is essential to mitigate potential data loss from unexpected crashes. In virtualized or containerized environments, isolating workloads that use JFS can reduce the blast radius of potential crashes. Finally, organizations should stay informed about any emerging exploits or additional patches 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-05-21T14:28:16.979Z
- Cisa Enriched
- true
- Cvss Version
- null
- State
- PUBLISHED
Threat ID: 682d9835c4522896dcbea4d7
Added to database: 5/21/2025, 9:09:09 AM
Last enriched: 6/26/2025, 10:38:18 AM
Last updated: 7/30/2025, 5:41:02 AM
Views: 10
Related Threats
Plex warns users to patch security vulnerability immediately
HighCVE-2025-9019: Heap-based Buffer Overflow in tcpreplay
LowCVE-2025-9017: Cross Site Scripting in PHPGurukul Zoo Management System
MediumCVE-2025-9051: SQL Injection in projectworlds Travel Management System
MediumCVE-2025-1929: CWE-89 Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') in Risk Yazılım Teknolojileri Ltd. Şti. Reel Sektör Hazine ve Risk Yönetimi Yazılımı
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.