{"id":70545,"date":"2025-09-19T21:32:37","date_gmt":"2025-09-19T18:02:37","guid":{"rendered":"https:\/\/afaghhosting.net\/blog\/cve-2025-39866-fs-writeback-fix-use-after-free-in-__mark_inode_dirty\/"},"modified":"2025-09-19T21:32:37","modified_gmt":"2025-09-19T18:02:37","slug":"cve-2025-39866-fs-writeback-fix-use-after-free-in-__mark_inode_dirty","status":"publish","type":"post","link":"https:\/\/afaghhosting.net\/blog\/cve-2025-39866-fs-writeback-fix-use-after-free-in-__mark_inode_dirty\/","title":{"rendered":"CVE-2025-39866 &#8211; fs: writeback: fix use-after-free in __mark_inode_dirty()"},"content":{"rendered":"<p><strong>CVE ID : <\/strong>CVE-2025-39866<br \/>\n<br \/>\n<strong>Published : <\/strong> Sept. 19, 2025, 4:15 p.m. | 48\u00a0minutes ago<br \/>\n<br \/>\n<strong>Description : <\/strong>In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>fs: writeback: fix use-after-free in __mark_inode_dirty()<\/p>\n<p>An use-after-free issue occurred when __mark_inode_dirty() get the<br \/>\nbdi_writeback that was in the progress of switching.<\/p>\n<p>CPU: 1 PID: 562 Comm: systemd-random- Not tainted 6.6.56-gb4403bd46a8e #1<br \/>\n&#8230;&#8230;<br \/>\npstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=&#8211;)<br \/>\npc : __mark_inode_dirty+0x124\/0x418<br \/>\nlr : __mark_inode_dirty+0x118\/0x418<br \/>\nsp : ffffffc08c9dbbc0<br \/>\n&#8230;&#8230;..<br \/>\nCall trace:<br \/>\n __mark_inode_dirty+0x124\/0x418<br \/>\n generic_update_time+0x4c\/0x60<br \/>\n file_modified+0xcc\/0xd0<br \/>\n ext4_buffered_write_iter+0x58\/0x124<br \/>\n ext4_file_write_iter+0x54\/0x704<br \/>\n vfs_write+0x1c0\/0x308<br \/>\n ksys_write+0x74\/0x10c<br \/>\n __arm64_sys_write+0x1c\/0x28<br \/>\n invoke_syscall+0x48\/0x114<br \/>\n el0_svc_common.constprop.0+0xc0\/0xe0<br \/>\n do_el0_svc+0x1c\/0x28<br \/>\n el0_svc+0x40\/0xe4<br \/>\n el0t_64_sync_handler+0x120\/0x12c<br \/>\n el0t_64_sync+0x194\/0x198<\/p>\n<p>Root cause is:<\/p>\n<p>systemd-random-seed                         kworker<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br \/>\n___mark_inode_dirty                     inode_switch_wbs_work_fn<\/p>\n<p>  spin_lock(&amp;inode-&gt;i_lock);<br \/>\n  inode_attach_wb<br \/>\n  locked_inode_to_wb_and_lock_list<br \/>\n     get inode-&gt;i_wb<br \/>\n     spin_unlock(&amp;inode-&gt;i_lock);<br \/>\n     spin_lock(&amp;wb-&gt;list_lock)<br \/>\n  spin_lock(&amp;inode-&gt;i_lock)<br \/>\n  inode_io_list_move_locked<br \/>\n  spin_unlock(&amp;wb-&gt;list_lock)<br \/>\n  spin_unlock(&amp;inode-&gt;i_lock)<br \/>\n                                    spin_lock(&amp;old_wb-&gt;list_lock)<br \/>\n                                      inode_do_switch_wbs<br \/>\n                                        spin_lock(&amp;inode-&gt;i_lock)<br \/>\n                                        inode-&gt;i_wb = new_wb<br \/>\n                                        spin_unlock(&amp;inode-&gt;i_lock)<br \/>\n                                    spin_unlock(&amp;old_wb-&gt;list_lock)<br \/>\n                                    wb_put_many(old_wb, nr_switched)<br \/>\n                                      cgwb_release<br \/>\n                                      old wb released<br \/>\n  wb_wakeup_delayed() accesses wb,<br \/>\n  then trigger the use-after-free<br \/>\n  issue<\/p>\n<p>Fix this race condition by holding inode spinlock until<br \/>\nwb_wakeup_delayed() finished.<br \/>\n<br \/>\n<strong>Severity:<\/strong> 0.0 | NA<br \/>\n<br \/>\nVisit the link for more details, such as CVSS details, affected products, timeline, and more&#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>CVE ID : CVE-2025-39866 Published : Sept. 19, 2025, 4:15 p.m. | 48\u00a0minutes ago Description : 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 &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26],"tags":[],"class_list":["post-70545","post","type-post","status-publish","format-standard","hentry","category-vulnerability"],"_links":{"self":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/70545","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/comments?post=70545"}],"version-history":[{"count":0,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/70545\/revisions"}],"wp:attachment":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media?parent=70545"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/categories?post=70545"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/tags?post=70545"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}