Linux Kernel up to 6.17-rc2 fs __mark_inode_dirty use after free

| CVSS Meta Temp Score | Current Exploit Price (≈) | CTI Interest Score |
|---|---|---|
| 7.7 | $0-$5k | 0.00 |
Summary
A vulnerability described as critical has been identified in Linux Kernel up to 6.17-rc2. Affected by this vulnerability is the function __mark_inode_dirty of the component fs. The manipulation results in use after free.
This vulnerability is known as CVE-2025-39866. No exploit is available.
Upgrading the affected component is recommended.
Details
A vulnerability was found in Linux Kernel up to 6.17-rc2. It has been classified as critical. Affected is the function __mark_inode_dirty of the component fs. The manipulation with an unknown input leads to a use after free vulnerability. CWE is classifying the issue as CWE-416. Referencing memory after it has been freed can cause a program to crash, use unexpected values, or execute code. This is going to have an impact on confidentiality, integrity, and availability. CVE summarizes:
In the Linux kernel, the following vulnerability has been resolved: fs: writeback: fix use-after-free in __mark_inode_dirty() An use-after-free issue occurred when __mark_inode_dirty() get the bdi_writeback that was in the progress of switching. CPU: 1 PID: 562 Comm: systemd-random- Not tainted 6.6.56-gb4403bd46a8e #1 ...... pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : __mark_inode_dirty+0x124/0x418 lr : __mark_inode_dirty+0x118/0x418 sp : ffffffc08c9dbbc0 ........ Call trace: __mark_inode_dirty+0x124/0x418 generic_update_time+0x4c/0x60 file_modified+0xcc/0xd0 ext4_buffered_write_iter+0x58/0x124 ext4_file_write_iter+0x54/0x704 vfs_write+0x1c0/0x308 ksys_write+0x74/0x10c __arm64_sys_write+0x1c/0x28 invoke_syscall+0x48/0x114 el0_svc_common.constprop.0+0xc0/0xe0 do_el0_svc+0x1c/0x28 el0_svc+0x40/0xe4 el0t_64_sync_handler+0x120/0x12c el0t_64_sync+0x194/0x198 Root cause is: systemd-random-seed kworker ---------------------------------------------------------------------- ___mark_inode_dirty inode_switch_wbs_work_fn spin_lock(&inode->i_lock); inode_attach_wb locked_inode_to_wb_and_lock_list get inode->i_wb spin_unlock(&inode->i_lock); spin_lock(&wb->list_lock) spin_lock(&inode->i_lock) inode_io_list_move_locked spin_unlock(&wb->list_lock) spin_unlock(&inode->i_lock) spin_lock(&old_wb->list_lock) inode_do_switch_wbs spin_lock(&inode->i_lock) inode->i_wb = new_wb spin_unlock(&inode->i_lock) spin_unlock(&old_wb->list_lock) wb_put_many(old_wb, nr_switched) cgwb_release old wb released wb_wakeup_delayed() accesses wb, then trigger the use-after-free issue Fix this race condition by holding inode spinlock until wb_wakeup_delayed() finished.
The advisory is available at git.kernel.org. This vulnerability is traded as CVE-2025-39866 since 04/16/2025. The exploitability is told to be easy. Technical details are known, but there is no available exploit. The structure of the vulnerability defines a possible price range of USD $0-$5k at the moment (estimation calculated on 01/23/2026).
The vulnerability scanner Nessus provides a plugin with the ID 265477 (Linux Distros Unpatched Vulnerability : CVE-2025-39866), which helps to determine the existence of the flaw in a target environment.
Upgrading to version 5.15.192, 6.1.151, 6.6.105, 6.12.46, 6.16.6 or 6.17-rc3 eliminates this vulnerability. Applying the patch b187c976111960e6e54a6b1fff724f6e3d39406c/1edc2feb9c759a9883dfe81cb5ed231412d8b2e4/bf89b1f87c72df79cf76203f71fbf8349cd5c9de/e63052921f1b25a836feb1500b841bff7a4a0456/c8c14adf80bd1a6e4a1d7ee9c2a816881c26d17a/d02d2c98d25793902f65803ab853b592c7a96b29 is able to eliminate this problem. The bugfix is ready for download at git.kernel.org. The best possible mitigation is suggested to be upgrading to the latest version.
The vulnerability is also documented in the databases at Tenable (265477), EUVD (EUVD-2025-30334) and CERT Bund (WID-SEC-2025-2099). If you want to get best quality of vulnerability data, you may have to visit VulDB.
Affected
- Debian Linux
- Amazon Linux 2
- Red Hat Enterprise Linux
- Ubuntu Linux
- SUSE Linux
- Oracle Linux
- IBM QRadar SIEM
- SUSE openSUSE
- RESF Rocky Linux
- Open Source Linux Kernel
- Dell Secure Connect Gateway
Product
Type
Vendor
Name
Version
- 5.15.191
- 6.1.150
- 6.6.104
- 6.12.0
- 6.12.1
- 6.12.2
- 6.12.3
- 6.12.4
- 6.12.5
- 6.12.6
- 6.12.7
- 6.12.8
- 6.12.9
- 6.12.10
- 6.12.11
- 6.12.12
- 6.12.13
- 6.12.14
- 6.12.15
- 6.12.16
- 6.12.17
- 6.12.18
- 6.12.19
- 6.12.20
- 6.12.21
- 6.12.22
- 6.12.23
- 6.12.24
- 6.12.25
- 6.12.26
- 6.12.27
- 6.12.28
- 6.12.29
- 6.12.30
- 6.12.31
- 6.12.32
- 6.12.33
- 6.12.34
- 6.12.35
- 6.12.36
- 6.12.37
- 6.12.38
- 6.12.39
- 6.12.40
- 6.12.41
- 6.12.42
- 6.12.43
- 6.12.44
- 6.12.45
- 6.16.0
- 6.16.1
- 6.16.2
- 6.16.3
- 6.16.4
- 6.16.5
- 6.17-rc1
- 6.17-rc2
License
Website
- Vendor: https://www.kernel.org/
CPE 2.3
CPE 2.2
CVSSv4
VulDB Vector: 🔒VulDB Reliability: 🔍
CVSSv3
VulDB Meta Base Score: 7.9VulDB Meta Temp Score: 7.7
VulDB Base Score: 8.0
VulDB Temp Score: 7.6
VulDB Vector: 🔒
VulDB Reliability: 🔍
NVD Base Score: 7.8
NVD Vector: 🔒
CVSSv2
| AV | AC | Au | C | I | A |
|---|---|---|---|---|---|
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| Vector | Complexity | Authentication | Confidentiality | Integrity | Availability |
|---|---|---|---|---|---|
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
VulDB Base Score: 🔒
VulDB Temp Score: 🔒
VulDB Reliability: 🔍
Exploiting
Class: Use after freeCWE: CWE-416 / CWE-119
CAPEC: 🔒
ATT&CK: 🔒
Physical: Partially
Local: Yes
Remote: Partially
Availability: 🔒
Status: Not defined
EPSS Score: 🔒
EPSS Percentile: 🔒
Price Prediction: 🔍
Current Price Estimation: 🔒
| 0-Day | Unlock | Unlock | Unlock | Unlock |
|---|---|---|---|---|
| Today | Unlock | Unlock | Unlock | Unlock |
Nessus ID: 265477
Nessus Name: Linux Distros Unpatched Vulnerability : CVE-2025-39866
Threat Intelligence
Interest: 🔍Active Actors: 🔍
Active APT Groups: 🔍
Countermeasures
Recommended: UpgradeStatus: 🔍
0-Day Time: 🔒
Upgrade: Kernel 5.15.192/6.1.151/6.6.105/6.12.46/6.16.6/6.17-rc3
Patch: b187c976111960e6e54a6b1fff724f6e3d39406c/1edc2feb9c759a9883dfe81cb5ed231412d8b2e4/bf89b1f87c72df79cf76203f71fbf8349cd5c9de/e63052921f1b25a836feb1500b841bff7a4a0456/c8c14adf80bd1a6e4a1d7ee9c2a816881c26d17a/d02d2c98d25793902f65803ab853b592c7a96b29
Timeline
04/16/2025 CVE reserved09/19/2025 Advisory disclosed
09/19/2025 VulDB entry created
01/23/2026 VulDB entry last update
Sources
Vendor: kernel.orgAdvisory: git.kernel.org
Status: Confirmed
CVE: CVE-2025-39866 (🔒)
GCVE (CVE): GCVE-0-2025-39866
GCVE (VulDB): GCVE-100-325050
EUVD: 🔒
CERT Bund: WID-SEC-2025-2099 - Linux Kernel: Mehrere Schwachstellen
Entry
Created: 09/19/2025 18:20Updated: 01/23/2026 04:34
Changes: 09/19/2025 18:20 (59), 09/22/2025 23:45 (2), 10/20/2025 23:52 (7), 11/12/2025 06:18 (1), 11/29/2025 07:20 (1), 12/07/2025 01:12 (1), 12/22/2025 13:41 (1), 01/23/2026 04:34 (11)
Complete: 🔍
Cache ID: 216::103
If you want to get best quality of vulnerability data, you may have to visit VulDB.
No comments yet. Languages: en.
Please log in to comment.