CVE-2025-39885: ocfs2: fix recursive semaphore deadlock in fiemap call
Noroxi assessment
Priority: Monitor (action score 22/100)
- The sources we track (CISA KEV, Exploit-DB, Metasploit, Nuclei, GitHub) show no public exploit code or exploitation in the wild.
- Probability of exploitation in the next 30 days: 0.12% (FIRST EPSS).
- Someone with local access to the system can trigger it. A low-privileged account is enough. No user action is required. No special conditions are required; it is repeatable.
- Fixed version: Linux Linux 04100f775c2ea501927f508f17ad824ad1f23c8d, 0709bc11b942870fc0a7be150e42aea42321093a, 16e518ca84dfe860c20a62f3615e14e8af0ace57.
Low priority for now. Upgrade to Linux Linux 04100f775c2ea501927f508f17ad824ad1f23c8d, 0709bc11b942870fc0a7be150e42aea42321093a, 16e518ca84dfe860c20a62f3615e14e8af0ace57 or later.
Generated automatically from the record's data: CVSS (NVD and CNA), CISA KEV and SSVC, FIRST EPSS, exploit sources, fixed versions. How we calculate it
Primary sources: NVD · CVE.org · FIRST EPSS
In the Linux kernel, the following vulnerability has been resolved: ocfs2: fix recursive semaphore deadlock in fiemap call syzbot detected a OCFS2 hang due to a recursive semaphore on a FS_IOC_FIEMAP of the extent list on a specially crafted mmap file. context_switch kernel/sched/core.c:5357 [inline] __schedule+0x1798/0x4cc0 kernel/sched/core.c:6961 __schedule_loop kernel/sched/core.c:7043 [inline] schedule+0x165/0x360 kernel/sched/core.c:7058 schedule_preempt_disabled+0x13/0x30 kernel/sched/core.c:7115 rwsem_down_write_slowpath+0x872/0xfe0 kernel/locking/rwsem.c:1185 __down_write_common kernel/locking/rwsem.c:1317 [inline] __down_write kernel/locking/rwsem.c:1326 [inline] down_write+0x1ab/0x1f0 kernel/locking/rwsem.c:1591 ocfs2_page_mkwrite+0x2ff/0xc40 fs/ocfs2/mmap.c:142 do_page_mkwrite+0x14d/0x310 mm/memory.c:3361 wp_page_shared mm/memory.c:3762 [inline] do_wp_page+0x268d/0x5800 mm/memory.c:3981 handle_pte_fault mm/memory.c:6068 [inline] __handle_mm_fault+0x1033/0x5440 mm/memory.c:6195 handle_mm_fault+0x40a/0x8e0 mm/memory.c:6364 do_user_addr_fault+0x764/0x1390 arch/x86/mm/fault.c:1387 handle_page_fault arch/x86/mm/fault.c:1476 [inline] exc_page_fault+0x76/0xf0 arch/x86/mm/fault.c:1532 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623 RIP: 0010:copy_user_generic arch/x86/include/asm/uaccess_64.h:126 [inline] RIP: 0010:raw_copy_to_user arch/x86/include/asm/uaccess_64.h:147 [inline] RIP: 0010:_inline_copy_to_user include/linux/uaccess.h:197 [inline] RIP: 0010:_copy_to_user+0x85/0xb0 lib/usercopy.c:26 Code: e8 00 bc f7 fc 4d 39 fc 72 3d 4d 39 ec 77 38 e8 91 b9 f7 fc 4c 89 f7 89 de e8 47 25 5b fd 0f 01 cb 4c 89 ff 48 89 d9 4c 89 f6 <f3> a4 0f 1f 00 48 89 cb 0f 01 ca 48 89 d8 5b 41 5c 41 5d 41 5e 41 RSP: 0018:ffffc9000403f950 EFLAGS: 00050256 RAX: ffffffff84c7f101 RBX: 0000000000000038 RCX: 0000000000000038 RDX: 0000000000000000 RSI: ffffc9000403f9e0 RDI: 0000200000000060 RBP: ffffc9000403fa90 R08: ffffc9000403fa17 R09: 1ffff92000807f42 R10: dffffc0000000000 R11: fffff52000807f43 R12: 0000200000000098 R13: 00007ffffffff000 R14: ffffc9000403f9e0 R15: 0000200000000060 copy_to_user include/linux/uaccess.h:225 [inline] fiemap_fill_next_extent+0x1c0/0x390 fs/ioctl.c:145 ocfs2_fiemap+0x888/0xc90 fs/ocfs2/extent_map.c:806 ioctl_fiemap fs/ioctl.c:220 [inline] do_vfs_ioctl+0x1173/0x1430 fs/ioctl.c:532 __do_sys_ioctl fs/ioctl.c:596 [inline] __se_sys_ioctl+0x82/0x170 fs/ioctl.c:584 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f5f13850fd9 RSP: 002b:00007ffe3b3518b8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 0000200000000000 RCX: 00007f5f13850fd9 RDX: 0000200000000040 RSI: 00000000c020660b RDI: 0000000000000004 RBP: 6165627472616568 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffe3b3518f0 R13: 00007ffe3b351b18 R14: 431bde82d7b634db R15: 00007f5f1389a03b ocfs2_fiemap() takes a read lock of the ip_alloc_sem semaphore (since v2.6.22-527-g7307de80510a) and calls fiemap_fill_next_extent() to read the extent list of this running mmap executable. The user supplied buffer to hold the fiemap information page faults calling ocfs2_page_mkwrite() which will take a write lock (since v2.6.27-38-g00dc417fa3e7) of the same semaphore. This recursive semaphore will hold filesystem locks and causes a hang of the fileystem. The ip_alloc_sem protects the inode extent list and size. Release the read semphore before calling fiemap_fill_next_extent() in ocfs2_fiemap() and ocfs2_fiemap_inline(). This does an unnecessary semaphore lock/unlock on the last extent but simplifies the error path.
- Published
- Sep 23, 2025
- Updated
- Oct 19, 2026
- EPSS
- 0.1% · 1th percentile
- CWE
- CWE-667
Report tools
Action score
22
Low priority for now.
- CVSS
- 22 / 40 · 5.5 / 10
- CISA KEV
- 0 / 30 · Not listed
- EPSS
- 0 / 30 · 0.1%
Get told when this record changes
- Not in KEV: no record of exploitation in the wild
- No public exploit code on record
- A fix has been released
If any of these changes, we'll tell you in the daily email digest.
Is your version affected? Check itNoroxi analysis
What does it mean in your environment?
The assessment above is generated automatically from the record's data; it doesn't know your environment. Our team verifies on your systems whether this vulnerability is actually exploitable and which mitigation is enough.
We use this product, ask for helpAffected systems
Is your version affected?
Pick the product and type the version you run. It's compared with this record's version ranges in your browser; the version isn't sent anywhere.
| Vendor | Product | CPE |
|---|---|---|
| linux | linux kernel | cpe:2.3:o:linux:linux_kernel |
| debian | debian linux | cpe:2.3:o:debian:debian_linux |
Versions reported by the vendor
Affected version ranges reported by the assigning authority (Linux). Independent of NVD's CPE analysis and usually ahead of it.
Linux Linux
- 2.6.28affected
- 00dc417fa3e763345b34ccb6034d72de76eea0a1 and later · before 16e518ca84dfe860c20a62f3615e14e8af0ace57affected · git
- 00dc417fa3e763345b34ccb6034d72de76eea0a1 and later · before 7e1514bd44ef68007703c752c99ff7319f35bce6affected · git
- 00dc417fa3e763345b34ccb6034d72de76eea0a1 and later · before ef30404980e4c832ef9bba1b10c08f67fa77a9ecaffected · git
- 00dc417fa3e763345b34ccb6034d72de76eea0a1 and later · before 36054554772f95d090eb45793faf6aa3c0254b02affected · git
- 00dc417fa3e763345b34ccb6034d72de76eea0a1 and later · before 0709bc11b942870fc0a7be150e42aea42321093aaffected · git
- 00dc417fa3e763345b34ccb6034d72de76eea0a1 and later · before 1d3c96547ee2ddeaddf8f19a3ef99ea06cc8115eaffected · git
- 00dc417fa3e763345b34ccb6034d72de76eea0a1 and later · before 9efcb7a8b97310efed995397941a292cf89fa94faffected · git
- 00dc417fa3e763345b34ccb6034d72de76eea0a1 and later · before 04100f775c2ea501927f508f17ad824ad1f23c8daffected · git
- before 2.6.28not affected · semver
Affected versions · NVD (9)
NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.
- debian debian linux11.0
- linux linux kernel5.5 and later · before 5.10.245
- linux linux kernel5.11 and later · before 5.15.194
- linux linux kernel5.16 and later · before 6.1.153
- linux linux kernel2.6.28 and later · before 5.4.300
- linux linux kernel6.7 and later · before 6.12.48
- linux linux kernel6.13 and later · before 6.16.8
- linux linux kernel6.2 and later · before 6.6.107
- linux linux kernel6.17
Package-level exposure
OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.
| Ecosystem | Package | Affected range | Fix |
|---|---|---|---|
| Debian:11 | linux | before 5.10.247-1 | 5.10.247-1 |
| Debian:12 | linux | before 6.1.153-1 | 6.1.153-1 |
| Debian:13 | linux | before 6.12.48-1 | 6.12.48-1 |
| Debian:14 | linux | before 6.16.8-1 | 6.16.8-1 |
Same product
linux: all recordsOther highest-scoring records for the same primary product.
- CVE-2026-31431crypto: algif_aead - Revert to operating out-of-placeKEV90Now
- CVE-2022-0847A flaw was found in the way the "flags" member of the new pipe buffer structure was lacking proper initialization in copy_page_to_iter_pipe…KEV89Now
- CVE-2021-22555Heap Out-Of-Bounds Write in Netfilter IP6T_SO_SET_REPLACEKEV85Now
Published before and after this one in the same product
- ← EarlierCVE-2025-39883Sep 23, 2025 · mm/memory-failure: fix VM_BUG_ON_PAGE(PagePoisoned(page)) when unpoison memory28Monitor
- ← EarlierCVE-2025-39884Sep 23, 2025 · btrfs: fix subvolume deletion lockup caused by inodes xarray race18Monitor
- Later →CVE-2025-39886Sep 23, 2025 · bpf: Tell memcg to use allow_spinning=false path in bpf_timer_init()22Monitor
Remediation
Which version to upgrade to
Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.
| Product / package | Fixed version | Source |
|---|---|---|
| Linux Linux | 04100f775c2ea501927f508f17ad824ad1f23c8d | Vendor (CNA) |
| Linux Linux | 0709bc11b942870fc0a7be150e42aea42321093a | Vendor (CNA) |
| Linux Linux | 16e518ca84dfe860c20a62f3615e14e8af0ace57 | Vendor (CNA) |
| Linux Linux | 1d3c96547ee2ddeaddf8f19a3ef99ea06cc8115e | Vendor (CNA) |
| Linux Linux | 36054554772f95d090eb45793faf6aa3c0254b02 | Vendor (CNA) |
| Linux Linux | 7e1514bd44ef68007703c752c99ff7319f35bce6 | Vendor (CNA) |
| Linux Linux | 9efcb7a8b97310efed995397941a292cf89fa94f | Vendor (CNA) |
| Linux Linux | ef30404980e4c832ef9bba1b10c08f67fa77a9ec | Vendor (CNA) |
| debian:linux | 6.1.153-1 · Debian:12 | Package registry (OSV) |
Exploit status
No known public exploit
No public exploit has been observed yet. That doesn't mean you're safe, only that the bar is a little higher.
Research context
For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.
Timeline
From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.
No dated events beyond publication.
Not on record for this CVE: EPSS history · patch commit or PR link · researcher credit · variant or chain candidate · public bounty program.
Technical details
Attack conditions
- Someone with local access to the system can trigger it.
- A low-privileged account is enough.
- No user action is required.
- No special conditions are required; it is repeatable.
If successful
- Confidentiality
- none
- Integrity
- none
- Availability
- high · the service can be disrupted
- Attack vector
- Local
- Attack complexity
- Low
- Privileges required
- Low
- User interaction
- None
- Scope
- Unchanged
- Confidentiality impact
- None
- Integrity impact
- None
- Availability impact
- High
Weakness class (CWE)
CWE-667 · Improper LockingCVSS vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
nvd-primary
Attack context
MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.
Change log (1)
- Fix✗ → ✓
For records you follow, these changes also arrive as notifications. →
References
Show all references (8 more)Show less
- git.kernel.org/stable/c/0709bc11b942870fc0a7be150e42aea42321093a
- git.kernel.org/stable/c/16e518ca84dfe860c20a62f3615e14e8af0ace57
- git.kernel.org/stable/c/1d3c96547ee2ddeaddf8f19a3ef99ea06cc8115e
- git.kernel.org/stable/c/36054554772f95d090eb45793faf6aa3c0254b02
- git.kernel.org/stable/c/7e1514bd44ef68007703c752c99ff7319f35bce6
- git.kernel.org/stable/c/9efcb7a8b97310efed995397941a292cf89fa94f
- git.kernel.org/stable/c/ef30404980e4c832ef9bba1b10c08f67fa77a9ec
- lists.debian.org/debian-lts-announce/2025/10/msg00008.html
Vendor advisories and official records. Exploit/PoC links are deliberately left out.