# CVE-2025-37741: jfs: Prevent copying of nlink with value 0 from disk inode

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

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; 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.24% (percentile 9, 2026-11-26)
- **CWE:** CWE-667
- **Published:** 2025-05-01T12:55:49.947Z
- **Modified:** 2026-08-05T11:57:12.701Z

## Who should check

- Anyone running Linux \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 5b2f26d3fba4e9aac314f8bc0963b3fc28c0e456; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 8b5ce75f8bd3ddf480cc0a240d7ff5cdea0444f9; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 86bfeaa18f9e4615b97f2d613e0fcc4ced196527; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< c9541c2bd0edbdbc5c1148a84d3b48dc8d1b8af2; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< b3c4884b987e5d8d0ec061a4d52653c4f4b9c37e; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< aeb926e605f97857504bdf748f575e40617e2ef9; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 994787341358816d91b2fded288ecb7f129f2b27; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< a2b560815528ae8e266fca6038bb5585d13aaef4; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< b61e69bb1c049cf507e3c654fa3dc1568231bd07
- Anyone running Linux 2.6.12

## Description

In the Linux kernel, the following vulnerability has been resolved:

jfs: Prevent copying of nlink with value 0 from disk inode

syzbot report a deadlock in diFree. \[1\]

When calling "ioctl$LOOP\_SET\_STATUS64", the offset value passed in is 4,
which does not match the mounted loop device, causing the mapping of the
mounted loop device to be invalidated.

When creating the directory and creating the inode of iag in diReadSpecial(),
read the page of fixed disk inode (AIT) in raw mode in read\_metapage(), the
metapage data it returns is corrupted, which causes the nlink value of 0 to be
assigned to the iag inode when executing copy\_from\_dinode(), which ultimately
causes a deadlock when entering diFree().

To avoid this, first check the nlink value of dinode before setting iag inode.

\[1\]
WARNING: possible recursive locking detected
6.12.0-rc7-syzkaller-00212-g4a5df3796467 \#0 Not tainted
--------------------------------------------
syz-executor301/5309 is trying to acquire lock:
ffff888044548920 (&(imap-\>im\_aglock\[index\])){+.+.}-{3:3}, at: diFree+0x37c/0x2fb0 fs/jfs/jfs\_imap.c:889

but task is already holding lock:
ffff888044548920 (&(imap-\>im\_aglock\[index\])){+.+.}-{3:3}, at: diAlloc+0x1b6/0x1630

other info that might help us debug this:
 Possible unsafe locking scenario:

       CPU0
       ----
  lock(&(imap-\>im\_aglock\[index\]));
  lock(&(imap-\>im\_aglock\[index\]));

 \*\*\* DEADLOCK \*\*\*

 May be due to missing lock nesting notation

5 locks held by syz-executor301/5309:
 \#0: ffff8880422a4420 (sb\_writers\#9){.+.+}-{0:0}, at: mnt\_want\_write+0x3f/0x90 fs/namespace.c:515
 \#1: ffff88804755b390 (&type-\>i\_mutex\_dir\_key\#6/1){+.+.}-{3:3}, at: inode\_lock\_nested include/linux/fs.h:850 \[inline\]
 \#1: ffff88804755b390 (&type-\>i\_mutex\_dir\_key\#6/1){+.+.}-{3:3}, at: filename\_create+0x260/0x540 fs/namei.c:4026
 \#2: ffff888044548920 (&(imap-\>im\_aglock\[index\])){+.+.}-{3:3}, at: diAlloc+0x1b6/0x1630
 \#3: ffff888044548890 (&imap-\>im\_freelock){+.+.}-{3:3}, at: diNewIAG fs/jfs/jfs\_imap.c:2460 \[inline\]
 \#3: ffff888044548890 (&imap-\>im\_freelock){+.+.}-{3:3}, at: diAllocExt fs/jfs/jfs\_imap.c:1905 \[inline\]
 \#3: ffff888044548890 (&imap-\>im\_freelock){+.+.}-{3:3}, at: diAllocAG+0x4b7/0x1e50 fs/jfs/jfs\_imap.c:1669
 \#4: ffff88804755a618 (&jfs\_ip-\>rdwrlock/1){++++}-{3:3}, at: diNewIAG fs/jfs/jfs\_imap.c:2477 \[inline\]
 \#4: ffff88804755a618 (&jfs\_ip-\>rdwrlock/1){++++}-{3:3}, at: diAllocExt fs/jfs/jfs\_imap.c:1905 \[inline\]
 \#4: ffff88804755a618 (&jfs\_ip-\>rdwrlock/1){++++}-{3:3}, at: diAllocAG+0x869/0x1e50 fs/jfs/jfs\_imap.c:1669

stack backtrace:
CPU: 0 UID: 0 PID: 5309 Comm: syz-executor301 Not tainted 6.12.0-rc7-syzkaller-00212-g4a5df3796467 \#0
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
Call Trace:
 \<TASK\>
 \_\_dump\_stack lib/dump\_stack.c:94 \[inline\]
 dump\_stack\_lvl+0x241/0x360 lib/dump\_stack.c:120
 print\_deadlock\_bug+0x483/0x620 kernel/locking/lockdep.c:3037
 check\_deadlock kernel/locking/lockdep.c:3089 \[inline\]
 validate\_chain+0x15e2/0x5920 kernel/locking/lockdep.c:3891
 \_\_lock\_acquire+0x1384/0x2050 kernel/locking/lockdep.c:5202
 lock\_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5825
 \_\_mutex\_lock\_common kernel/locking/mutex.c:608 \[inline\]
 \_\_mutex\_lock+0x136/0xd70 kernel/locking/mutex.c:752
 diFree+0x37c/0x2fb0 fs/jfs/jfs\_imap.c:889
 jfs\_evict\_inode+0x32d/0x440 fs/jfs/inode.c:156
 evict+0x4e8/0x9b0 fs/inode.c:725
 diFreeSpecial fs/jfs/jfs\_imap.c:552 \[inline\]
 duplicateIXtree+0x3c6/0x550 fs/jfs/jfs\_imap.c:3022
 diNewIAG fs/jfs/jfs\_imap.c:2597 \[inline\]
 diAllocExt fs/jfs/jfs\_imap.c:1905 \[inline\]
 diAllocAG+0x17dc/0x1e50 fs/jfs/jfs\_imap.c:1669
 diAlloc+0x1d2/0x1630 fs/jfs/jfs\_imap.c:1590
 ialloc+0x8f/0x900 fs/jfs/jfs\_inode.c:56
 jfs\_mkdir+0x1c5/0xba0 fs/jfs/namei.c:225
 vfs\_mkdir+0x2f9/0x4f0 fs/namei.c:4257
 do\_mkdirat+0x264/0x3a0 fs/namei.c:4280
 \_\_do\_sys\_mkdirat fs/namei.c:4295 \[inline\]
 \_\_se\_sys\_mkdirat fs/namei.c:4293 \[inline\]
 \_\_x64\_sys\_mkdirat+0x87/0xa0 fs/namei.c:4293
 do\_syscall\_x64 arch/x86/en
---truncated---

## Affected and fixed versions

- Linux: \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 5b2f26d3fba4e9aac314f8bc0963b3fc28c0e456; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 8b5ce75f8bd3ddf480cc0a240d7ff5cdea0444f9; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 86bfeaa18f9e4615b97f2d613e0fcc4ced196527; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< c9541c2bd0edbdbc5c1148a84d3b48dc8d1b8af2; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< b3c4884b987e5d8d0ec061a4d52653c4f4b9c37e; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< aeb926e605f97857504bdf748f575e40617e2ef9; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 994787341358816d91b2fded288ecb7f129f2b27; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< a2b560815528ae8e266fca6038bb5585d13aaef4; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< b61e69bb1c049cf507e3c654fa3dc1568231bd07 (cvelist)
- Linux: 2.6.12 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2025-37741.md
Affected: Linux >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < 5b2f26d3fba4e9aac314f8bc0963b3fc28c0e456; >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < 8b5ce75f8bd3ddf480cc0a240d7ff5cdea0444f9; >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < 86bfeaa18f9e4615b97f2d613e0fcc4ced196527; >= 1da177e4c3f41524e886b7f…
Fixed in: Linux 5b2f26d3fba4e9aac314f8bc0963b3fc28c0e456, Linux 8b5ce75f8bd3ddf480cc0a240d7ff5cdea0444f9, Linux 86bfeaa18f9e4615b97f2d613e0fcc4ced196527, Linux 994787341358816d91b2fded288ecb7f129f2b27

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-2025-37741 being exploited?

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

### How serious is CVE-2025-37741?

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2025-37741?

Linux \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 5b2f26d3fba4e9aac314f8bc0963b3fc28c0e456; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 8b5ce75f8bd3ddf480cc0a240d7ff5cdea0444f9; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 86bfeaa18f9e4615b97f2d613e0fcc4ced196527; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< c9541c2bd0edbdbc5c1148a84d3b48dc8d1b8af2; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< b3c4884b987e5d8d0ec061a4d52653c4f4b9c37e; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< aeb926e605f97857504bdf748f575e40617e2ef9; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 994787341358816d91b2fded288ecb7f129f2b27; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< a2b560815528ae8e266fca6038bb5585d13aaef4; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< b61e69bb1c049cf507e3c654fa3dc1568231bd07; Linux 2.6.12.

### Is there a fix for CVE-2025-37741?

Yes. Fixed in Linux 5b2f26d3fba4e9aac314f8bc0963b3fc28c0e456, Linux 8b5ce75f8bd3ddf480cc0a240d7ff5cdea0444f9, Linux 86bfeaa18f9e4615b97f2d613e0fcc4ced196527, Linux 994787341358816d91b2fded288ecb7f129f2b27. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2025-37741?

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/5b2f26d3fba4e9aac314f8bc0963b3fc28c0e456>
- patch: <https://git.kernel.org/stable/c/8b5ce75f8bd3ddf480cc0a240d7ff5cdea0444f9>
- patch: <https://git.kernel.org/stable/c/86bfeaa18f9e4615b97f2d613e0fcc4ced196527>
- patch: <https://git.kernel.org/stable/c/c9541c2bd0edbdbc5c1148a84d3b48dc8d1b8af2>
- patch: <https://git.kernel.org/stable/c/b3c4884b987e5d8d0ec061a4d52653c4f4b9c37e>
- patch: <https://git.kernel.org/stable/c/aeb926e605f97857504bdf748f575e40617e2ef9>
- patch: <https://git.kernel.org/stable/c/994787341358816d91b2fded288ecb7f129f2b27>
- patch: <https://git.kernel.org/stable/c/a2b560815528ae8e266fca6038bb5585d13aaef4>
- patch: <https://git.kernel.org/stable/c/b61e69bb1c049cf507e3c654fa3dc1568231bd07>
- other: <https://lists.debian.org/debian-lts-announce/2025/05/msg00045.html>
- other: <https://lists.debian.org/debian-lts-announce/2025/05/msg00030.html>

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

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