{"id":66895,"date":"2025-07-28T17:33:52","date_gmt":"2025-07-28T14:03:52","guid":{"rendered":"https:\/\/afaghhosting.net\/blog\/cve-2025-38492-linux-kernel-netfs-all_queued-race-condition-vulnerability\/"},"modified":"2025-07-28T17:33:52","modified_gmt":"2025-07-28T14:03:52","slug":"cve-2025-38492-linux-kernel-netfs-all_queued-race-condition-vulnerability","status":"publish","type":"post","link":"https:\/\/afaghhosting.net\/blog\/cve-2025-38492-linux-kernel-netfs-all_queued-race-condition-vulnerability\/","title":{"rendered":"CVE-2025-38492 &#8211; Linux Kernel Netfs ALL_QUEUED Race Condition Vulnerability"},"content":{"rendered":"<p><strong>CVE ID : <\/strong>CVE-2025-38492<br \/>\n<br \/>\n<strong>Published : <\/strong> July 28, 2025, 12:15 p.m. | 1\u00a0hour, 5\u00a0minutes ago<br \/>\n<br \/>\n<strong>Description : <\/strong>In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>netfs: Fix race between cache write completion and ALL_QUEUED being set<\/p>\n<p>When netfslib is issuing subrequests, the subrequests start processing<br \/>\nimmediately and may complete before we reach the end of the issuing<br \/>\nfunction.  At the end of the issuing function we set NETFS_RREQ_ALL_QUEUED<br \/>\nto indicate to the collector that we aren&#8217;t going to issue any more subreqs<br \/>\nand that it can do the final notifications and cleanup.<\/p>\n<p>Now, this isn&#8217;t a problem if the request is synchronous<br \/>\n(NETFS_RREQ_OFFLOAD_COLLECTION is unset) as the result collection will be<br \/>\ndone in-thread and we&#8217;re guaranteed an opportunity to run the collector.<\/p>\n<p>However, if the request is asynchronous, collection is primarily triggered<br \/>\nby the termination of subrequests queuing it on a workqueue.  Now, a race<br \/>\ncan occur here if the app thread sets ALL_QUEUED after the last subrequest<br \/>\nterminates.<\/p>\n<p>This can happen most easily with the copy2cache code (as used by Ceph)<br \/>\nwhere, in the collection routine of a read request, an asynchronous write<br \/>\nrequest is spawned to copy data to the cache.  Folios are added to the<br \/>\nwrite request as they&#8217;re unlocked, but there may be a delay before<br \/>\nALL_QUEUED is set as the write subrequests may complete before we get<br \/>\nthere.<\/p>\n<p>If all the write subreqs have finished by the ALL_QUEUED point, no further<br \/>\nevents happen and the collection never happens, leaving the request<br \/>\nhanging.<\/p>\n<p>Fix this by queuing the collector after setting ALL_QUEUED.  This is a bit<br \/>\nheavy-handed and it may be sufficient to do it only if there are no extant<br \/>\nsubreqs.<\/p>\n<p>Also add a tracepoint to cross-reference both requests in a copy-to-request<br \/>\noperation and add a trace to the netfs_rreq tracepoint to indicate the<br \/>\nsetting of ALL_QUEUED.<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-38492 Published : July 28, 2025, 12:15 p.m. | 1\u00a0hour, 5\u00a0minutes ago Description : In the Linux kernel, the following vulnerability has been resolved: netfs: Fix race between cache write completion and ALL_QUEUED being set When netfslib is issuing subrequests, the subrequests start processing immediately and may complete before we reach the &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-66895","post","type-post","status-publish","format-standard","hentry","category-vulnerability"],"_links":{"self":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/66895","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=66895"}],"version-history":[{"count":0,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/66895\/revisions"}],"wp:attachment":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media?parent=66895"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/categories?post=66895"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/tags?post=66895"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}