# CVE-2021-47340: jfs: fix GPF in diFree

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.31% (percentile 17, 2026-11-26)
- **CWE:** CWE-476
- **Published:** 2024-05-21T14:35:48.342Z
- **Modified:** 2026-06-17T04:17:14.253Z

## Who should check

- Anyone running Linux \>= 62aff86fdf18657d9eca7878654415f94f16d027, \< 7bde24bde490f3139eee147efc6d60d6040fe975; \>= 62aff86fdf18657d9eca7878654415f94f16d027, \< 745c9a59422c63f661f4374ed5181740db4130a1; \>= 62aff86fdf18657d9eca7878654415f94f16d027, \< 49def1b0644892e3b113673c13d650c3060b43bc; \>= 62aff86fdf18657d9eca7878654415f94f16d027, \< aff8d95b69051d0cf4acc3d91f22299fdbb9dfb3; \>= 62aff86fdf18657d9eca7878654415f94f16d027, \< a21e5cb1a64c904f1f0ef7b2d386fc7d2b1d2ce2; \>= 62aff86fdf18657d9eca7878654415f94f16d027, \< 8018936950360f1c503bb385e158cfc5e4945d18; \>= 62aff86fdf18657d9eca7878654415f94f16d027, \< 3bb27e27240289b47d3466f647a55c567adbdc3a; \>= 62aff86fdf18657d9eca7878654415f94f16d027, \< 42f102ea1943ecb10a0756bf75424de5d1d5beed; \>= 62aff86fdf18657d9eca7878654415f94f16d027, \< 9d574f985fe33efd6911f4d752de6f485a1ea732
- Anyone running Linux 2.6.36

## 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

## Affected and fixed versions

- Linux: \>= 62aff86fdf18657d9eca7878654415f94f16d027, \< 7bde24bde490f3139eee147efc6d60d6040fe975; \>= 62aff86fdf18657d9eca7878654415f94f16d027, \< 745c9a59422c63f661f4374ed5181740db4130a1; \>= 62aff86fdf18657d9eca7878654415f94f16d027, \< 49def1b0644892e3b113673c13d650c3060b43bc; \>= 62aff86fdf18657d9eca7878654415f94f16d027, \< aff8d95b69051d0cf4acc3d91f22299fdbb9dfb3; \>= 62aff86fdf18657d9eca7878654415f94f16d027, \< a21e5cb1a64c904f1f0ef7b2d386fc7d2b1d2ce2; \>= 62aff86fdf18657d9eca7878654415f94f16d027, \< 8018936950360f1c503bb385e158cfc5e4945d18; \>= 62aff86fdf18657d9eca7878654415f94f16d027, \< 3bb27e27240289b47d3466f647a55c567adbdc3a; \>= 62aff86fdf18657d9eca7878654415f94f16d027, \< 42f102ea1943ecb10a0756bf75424de5d1d5beed; \>= 62aff86fdf18657d9eca7878654415f94f16d027, \< 9d574f985fe33efd6911f4d752de6f485a1ea732 (cvelist)
- Linux: 2.6.36 (cvelist)

## Mitigation

- Upgrade Linux to 9d574f985fe33efd6911f4d752de6f485a1ea732 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2021-47340. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2021-47340.md
Affected: Linux >= 62aff86fdf18657d9eca7878654415f94f16d027, < 7bde24bde490f3139eee147efc6d60d6040fe975; >= 62aff86fdf18657d9eca7878654415f94f16d027, < 745c9a59422c63f661f4374ed5181740db4130a1; >= 62aff86fdf18657d9eca7878654415f94f16d027, < 49def1b0644892e3b113673c13d650c3060b43bc; >= 62aff86fdf18657d9eca787…
Fixed in: Linux 7bde24bde490f3139eee147efc6d60d6040fe975, Linux 745c9a59422c63f661f4374ed5181740db4130a1, Linux 49def1b0644892e3b113673c13d650c3060b43bc, Linux 8018936950360f1c503bb385e158cfc5e4945d18, Linux 3bb27e27240289b47d3466f647a55c567adbdc3a, Linux 42f102ea1943ecb10a0756bf75424de5d1d5beed, Linux 9d574…

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2021-47340 being exploited?

There is no confirmed exploitation: CVE-2021-47340 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.31% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2021-47340?

Medium: CVSS 5.5 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2021-47340?

Linux \>= 62aff86fdf18657d9eca7878654415f94f16d027, \< 7bde24bde490f3139eee147efc6d60d6040fe975; \>= 62aff86fdf18657d9eca7878654415f94f16d027, \< 745c9a59422c63f661f4374ed5181740db4130a1; \>= 62aff86fdf18657d9eca7878654415f94f16d027, \< 49def1b0644892e3b113673c13d650c3060b43bc; \>= 62aff86fdf18657d9eca7878654415f94f16d027, \< aff8d95b69051d0cf4acc3d91f22299fdbb9dfb3; \>= 62aff86fdf18657d9eca7878654415f94f16d027, \< a21e5cb1a64c904f1f0ef7b2d386fc7d2b1d2ce2; \>= 62aff86fdf18657d9eca7878654415f94f16d027, \< 8018936950360f1c503bb385e158cfc5e4945d18; \>= 62aff86fdf18657d9eca7878654415f94f16d027, \< 3bb27e27240289b47d3466f647a55c567adbdc3a; \>= 62aff86fdf18657d9eca7878654415f94f16d027, \< 42f102ea1943ecb10a0756bf75424de5d1d5beed; \>= 62aff86fdf18657d9eca7878654415f94f16d027, \< 9d574f985fe33efd6911f4d752de6f485a1ea732; Linux 2.6.36.

### Is there a fix for CVE-2021-47340?

Yes. Fixed in Linux 7bde24bde490f3139eee147efc6d60d6040fe975, Linux 745c9a59422c63f661f4374ed5181740db4130a1, Linux 49def1b0644892e3b113673c13d650c3060b43bc, Linux 8018936950360f1c503bb385e158cfc5e4945d18, Linux 3bb27e27240289b47d3466f647a55c567adbdc3a, Linux 42f102ea1943ecb10a0756bf75424de5d1d5beed, Linux 9d574f985fe33efd6911f4d752de6f485a1ea732. Upgrade Linux to 9d574f985fe33efd6911f4d752de6f485a1ea732 or later.

### How do I check if I'm affected by CVE-2021-47340?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/7bde24bde490f3139eee147efc6d60d6040fe975>
- patch: <https://git.kernel.org/stable/c/745c9a59422c63f661f4374ed5181740db4130a1>
- patch: <https://git.kernel.org/stable/c/49def1b0644892e3b113673c13d650c3060b43bc>
- patch: <https://git.kernel.org/stable/c/aff8d95b69051d0cf4acc3d91f22299fdbb9dfb3>
- patch: <https://git.kernel.org/stable/c/a21e5cb1a64c904f1f0ef7b2d386fc7d2b1d2ce2>
- patch: <https://git.kernel.org/stable/c/8018936950360f1c503bb385e158cfc5e4945d18>
- patch: <https://git.kernel.org/stable/c/3bb27e27240289b47d3466f647a55c567adbdc3a>
- patch: <https://git.kernel.org/stable/c/42f102ea1943ecb10a0756bf75424de5d1d5beed>
- patch: <https://git.kernel.org/stable/c/9d574f985fe33efd6911f4d752de6f485a1ea732>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2021-47340>

HTML: <https://flawdb.com/CVE-2021-47340> · JSON: <https://flawdb.com/api/v1/entries/CVE-2021-47340>
