# CVE-2025-38347: f2fs: fix to do sanity check on ino and xnid

> 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.30% (percentile 15, 2026-11-26)
- **Published:** 2025-07-10T08:15:14.907Z
- **Modified:** 2026-06-17T09:16:40.443Z

## Who should check

- Anyone running Linux \>= 98e4da8ca301e062d79ae168c67e56f3c3de3ce4, \< 44e904a1ad09e84039058dcbbb1b9ea5b8d7d75d; \>= 98e4da8ca301e062d79ae168c67e56f3c3de3ce4, \< ecff54aa20b5b21db82e63e46066b55e43d72e78; \>= 98e4da8ca301e062d79ae168c67e56f3c3de3ce4, \< c4029044cc408b149e63db7dc8617a0783a3f10d; \>= 98e4da8ca301e062d79ae168c67e56f3c3de3ce4, \< e98dc1909f3d5bc078ec7a605524f1e3f4c0eb14; \>= 98e4da8ca301e062d79ae168c67e56f3c3de3ce4, \< aaddc6c696bd1bff20eaacfa88579d6eae64d541; \>= 98e4da8ca301e062d79ae168c67e56f3c3de3ce4, \< fed611bd8c7b76b070aa407d0c7558e20d9e1f68; \>= 98e4da8ca301e062d79ae168c67e56f3c3de3ce4, \< 5a06d97d5340c00510f24e80e8de821bd3bd9285; \>= 98e4da8ca301e062d79ae168c67e56f3c3de3ce4, \< 061cf3a84bde038708eb0f1d065b31b7c2456533
- Anyone running Linux 3.8

## Description

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

f2fs: fix to do sanity check on ino and xnid

syzbot reported a f2fs bug as below:

INFO: task syz-executor140:5308 blocked for more than 143 seconds.
      Not tainted 6.14.0-rc7-syzkaller-00069-g81e4f8d68c66 \#0
"echo 0 \> /proc/sys/kernel/hung\_task\_timeout\_secs" disables this message.
task:syz-executor140 state:D stack:24016 pid:5308  tgid:5308  ppid:5306   task\_flags:0x400140 flags:0x00000006
Call Trace:
 \<TASK\>
 context\_switch kernel/sched/core.c:5378 \[inline\]
 \_\_schedule+0x190e/0x4c90 kernel/sched/core.c:6765
 \_\_schedule\_loop kernel/sched/core.c:6842 \[inline\]
 schedule+0x14b/0x320 kernel/sched/core.c:6857
 io\_schedule+0x8d/0x110 kernel/sched/core.c:7690
 folio\_wait\_bit\_common+0x839/0xee0 mm/filemap.c:1317
 \_\_folio\_lock mm/filemap.c:1664 \[inline\]
 folio\_lock include/linux/pagemap.h:1163 \[inline\]
 \_\_filemap\_get\_folio+0x147/0xb40 mm/filemap.c:1917
 pagecache\_get\_page+0x2c/0x130 mm/folio-compat.c:87
 find\_get\_page\_flags include/linux/pagemap.h:842 \[inline\]
 f2fs\_grab\_cache\_page+0x2b/0x320 fs/f2fs/f2fs.h:2776
 \_\_get\_node\_page+0x131/0x11b0 fs/f2fs/node.c:1463
 read\_xattr\_block+0xfb/0x190 fs/f2fs/xattr.c:306
 lookup\_all\_xattrs fs/f2fs/xattr.c:355 \[inline\]
 f2fs\_getxattr+0x676/0xf70 fs/f2fs/xattr.c:533
 \_\_f2fs\_get\_acl+0x52/0x870 fs/f2fs/acl.c:179
 f2fs\_acl\_create fs/f2fs/acl.c:375 \[inline\]
 f2fs\_init\_acl+0xd7/0x9b0 fs/f2fs/acl.c:418
 f2fs\_init\_inode\_metadata+0xa0f/0x1050 fs/f2fs/dir.c:539
 f2fs\_add\_inline\_entry+0x448/0x860 fs/f2fs/inline.c:666
 f2fs\_add\_dentry+0xba/0x1e0 fs/f2fs/dir.c:765
 f2fs\_do\_add\_link+0x28c/0x3a0 fs/f2fs/dir.c:808
 f2fs\_add\_link fs/f2fs/f2fs.h:3616 \[inline\]
 f2fs\_mknod+0x2e8/0x5b0 fs/f2fs/namei.c:766
 vfs\_mknod+0x36d/0x3b0 fs/namei.c:4191
 unix\_bind\_bsd net/unix/af\_unix.c:1286 \[inline\]
 unix\_bind+0x563/0xe30 net/unix/af\_unix.c:1379
 \_\_sys\_bind\_socket net/socket.c:1817 \[inline\]
 \_\_sys\_bind+0x1e4/0x290 net/socket.c:1848
 \_\_do\_sys\_bind net/socket.c:1853 \[inline\]
 \_\_se\_sys\_bind net/socket.c:1851 \[inline\]
 \_\_x64\_sys\_bind+0x7a/0x90 net/socket.c:1851
 do\_syscall\_x64 arch/x86/entry/common.c:52 \[inline\]
 do\_syscall\_64+0xf3/0x230 arch/x86/entry/common.c:83
 entry\_SYSCALL\_64\_after\_hwframe+0x77/0x7f

Let's dump and check metadata of corrupted inode, it shows its xattr\_nid
is the same to its i\_ino.

dump.f2fs -i 3 chaseyu.img.raw
i\_xattr\_nid                             \[0x       3 : 3\]

So that, during mknod in the corrupted directory, it tries to get and
lock inode page twice, result in deadlock.

- f2fs\_mknod
 - f2fs\_add\_inline\_entry
  - f2fs\_get\_inode\_page --- lock dir's inode page
   - f2fs\_init\_acl
    - f2fs\_acl\_create(dir,..)
     - \_\_f2fs\_get\_acl
      - f2fs\_getxattr
       - lookup\_all\_xattrs
        - \_\_get\_node\_page --- try to lock dir's inode page

In order to fix this, let's add sanity check on ino and xnid.

## Affected and fixed versions

- Linux: \>= 98e4da8ca301e062d79ae168c67e56f3c3de3ce4, \< 44e904a1ad09e84039058dcbbb1b9ea5b8d7d75d; \>= 98e4da8ca301e062d79ae168c67e56f3c3de3ce4, \< ecff54aa20b5b21db82e63e46066b55e43d72e78; \>= 98e4da8ca301e062d79ae168c67e56f3c3de3ce4, \< c4029044cc408b149e63db7dc8617a0783a3f10d; \>= 98e4da8ca301e062d79ae168c67e56f3c3de3ce4, \< e98dc1909f3d5bc078ec7a605524f1e3f4c0eb14; \>= 98e4da8ca301e062d79ae168c67e56f3c3de3ce4, \< aaddc6c696bd1bff20eaacfa88579d6eae64d541; \>= 98e4da8ca301e062d79ae168c67e56f3c3de3ce4, \< fed611bd8c7b76b070aa407d0c7558e20d9e1f68; \>= 98e4da8ca301e062d79ae168c67e56f3c3de3ce4, \< 5a06d97d5340c00510f24e80e8de821bd3bd9285; \>= 98e4da8ca301e062d79ae168c67e56f3c3de3ce4, \< 061cf3a84bde038708eb0f1d065b31b7c2456533 (cvelist)
- Linux: 3.8 (cvelist)

## Mitigation

- Upgrade Linux to 061cf3a84bde038708eb0f1d065b31b7c2456533 or later.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2025-38347.md
Affected: Linux >= 98e4da8ca301e062d79ae168c67e56f3c3de3ce4, < 44e904a1ad09e84039058dcbbb1b9ea5b8d7d75d; >= 98e4da8ca301e062d79ae168c67e56f3c3de3ce4, < ecff54aa20b5b21db82e63e46066b55e43d72e78; >= 98e4da8ca301e062d79ae168c67e56f3c3de3ce4, < c4029044cc408b149e63db7dc8617a0783a3f10d; >= 98e4da8ca301e062d79ae16…
Fixed in: Linux 44e904a1ad09e84039058dcbbb1b9ea5b8d7d75d, Linux 5a06d97d5340c00510f24e80e8de821bd3bd9285, Linux 061cf3a84bde038708eb0f1d065b31b7c2456533

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-38347 being exploited?

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

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

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

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

Linux \>= 98e4da8ca301e062d79ae168c67e56f3c3de3ce4, \< 44e904a1ad09e84039058dcbbb1b9ea5b8d7d75d; \>= 98e4da8ca301e062d79ae168c67e56f3c3de3ce4, \< ecff54aa20b5b21db82e63e46066b55e43d72e78; \>= 98e4da8ca301e062d79ae168c67e56f3c3de3ce4, \< c4029044cc408b149e63db7dc8617a0783a3f10d; \>= 98e4da8ca301e062d79ae168c67e56f3c3de3ce4, \< e98dc1909f3d5bc078ec7a605524f1e3f4c0eb14; \>= 98e4da8ca301e062d79ae168c67e56f3c3de3ce4, \< aaddc6c696bd1bff20eaacfa88579d6eae64d541; \>= 98e4da8ca301e062d79ae168c67e56f3c3de3ce4, \< fed611bd8c7b76b070aa407d0c7558e20d9e1f68; \>= 98e4da8ca301e062d79ae168c67e56f3c3de3ce4, \< 5a06d97d5340c00510f24e80e8de821bd3bd9285; \>= 98e4da8ca301e062d79ae168c67e56f3c3de3ce4, \< 061cf3a84bde038708eb0f1d065b31b7c2456533; Linux 3.8.

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

Yes. Fixed in Linux 44e904a1ad09e84039058dcbbb1b9ea5b8d7d75d, Linux 5a06d97d5340c00510f24e80e8de821bd3bd9285, Linux 061cf3a84bde038708eb0f1d065b31b7c2456533. Upgrade Linux to 061cf3a84bde038708eb0f1d065b31b7c2456533 or later.

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

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/44e904a1ad09e84039058dcbbb1b9ea5b8d7d75d>
- patch: <https://git.kernel.org/stable/c/ecff54aa20b5b21db82e63e46066b55e43d72e78>
- patch: <https://git.kernel.org/stable/c/c4029044cc408b149e63db7dc8617a0783a3f10d>
- patch: <https://git.kernel.org/stable/c/e98dc1909f3d5bc078ec7a605524f1e3f4c0eb14>
- patch: <https://git.kernel.org/stable/c/aaddc6c696bd1bff20eaacfa88579d6eae64d541>
- patch: <https://git.kernel.org/stable/c/fed611bd8c7b76b070aa407d0c7558e20d9e1f68>
- patch: <https://git.kernel.org/stable/c/5a06d97d5340c00510f24e80e8de821bd3bd9285>
- patch: <https://git.kernel.org/stable/c/061cf3a84bde038708eb0f1d065b31b7c2456533>
- other: <https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html>
- other: <https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-032379.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-38347>

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