{"id":65454,"date":"2025-07-03T14:32:12","date_gmt":"2025-07-03T11:02:12","guid":{"rendered":"https:\/\/afaghhosting.net\/blog\/cve-2025-38172-linux-erofs-uaf-vulnerability\/"},"modified":"2025-07-03T14:32:12","modified_gmt":"2025-07-03T11:02:12","slug":"cve-2025-38172-linux-erofs-uaf-vulnerability","status":"publish","type":"post","link":"https:\/\/afaghhosting.net\/blog\/cve-2025-38172-linux-erofs-uaf-vulnerability\/","title":{"rendered":"CVE-2025-38172 &#8211; &#8220;Linux EROFS UAF Vulnerability&#8221;"},"content":{"rendered":"<p><strong>CVE ID : <\/strong>CVE-2025-38172<br \/>\n<br \/>\n<strong>Published : <\/strong> July 3, 2025, 9:15 a.m. | 1\u00a0hour, 40\u00a0minutes ago<br \/>\n<br \/>\n<strong>Description : <\/strong>In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>erofs: avoid using multiple devices with different type<\/p>\n<p>For multiple devices, both primary and extra devices should be the<br \/>\nsame type. `erofs_init_device` has already guaranteed that if the<br \/>\nprimary is a file-backed device, extra devices should also be<br \/>\nregular files.<\/p>\n<p>However, if the primary is a block device while the extra device<br \/>\nis a file-backed device, `erofs_init_device` will get an ENOTBLK,<br \/>\nwhich is not treated as an error in `erofs_fc_get_tree`, and that<br \/>\nleads to an UAF:<\/p>\n<p>  erofs_fc_get_tree<br \/>\n    get_tree_bdev_flags(erofs_fc_fill_super)<br \/>\n      erofs_read_superblock<br \/>\n        erofs_init_device  \/\/ sbi-&gt;dif0 is not inited yet,<br \/>\n                           \/\/ return -ENOTBLK<br \/>\n      deactivate_locked_super<br \/>\n        free(sbi)<br \/>\n    if (err is -ENOTBLK)<br \/>\n      sbi-&gt;dif0.file = filp_open()  \/\/ sbi UAF<\/p>\n<p>So if -ENOTBLK is hitted in `erofs_init_device`, it means the<br \/>\nprimary device must be a block device, and the extra device<br \/>\nis not a block device. The error can be converted to -EINVAL.<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-38172 Published : July 3, 2025, 9:15 a.m. | 1\u00a0hour, 40\u00a0minutes ago Description : In the Linux kernel, the following vulnerability has been resolved: erofs: avoid using multiple devices with different type For multiple devices, both primary and extra devices should be the same type. `erofs_init_device` has already guaranteed that if 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-65454","post","type-post","status-publish","format-standard","hentry","category-vulnerability"],"_links":{"self":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/65454","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=65454"}],"version-history":[{"count":0,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/65454\/revisions"}],"wp:attachment":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media?parent=65454"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/categories?post=65454"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/tags?post=65454"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}