{"id":"CVE-2025-38172","published":"2025-07-03T08:36:10Z","modified":"2026-08-05T12:00:03Z","title":"erofs: avoid using multiple devices with different type","vendor":"Linux","product":"Linux","tier":"tail","description":{"text":"In the Linux kernel, the following vulnerability has been resolved:\n\nerofs: avoid using multiple devices with different type\n\nFor multiple devices, both primary and extra devices should be the\nsame type. `erofs_init_device` has already guaranteed that if the\nprimary is a file-backed device, extra devices should also be\nregular files.\n\nHowever, if the primary is a block device while the extra device\nis a file-backed device, `erofs_init_device` will get an ENOTBLK,\nwhich is not treated as an error in `erofs_fc_get_tree`, and that\nleads to an UAF:\n\n  erofs_fc_get_tree\n    get_tree_bdev_flags(erofs_fc_fill_super)\n      erofs_read_superblock\n        erofs_init_device  // sbi->dif0 is not inited yet,\n                           // return -ENOTBLK\n      deactivate_locked_super\n        free(sbi)\n    if (err is -ENOTBLK)\n      sbi->dif0.file = filp_open()  // sbi UAF\n\nSo if -ENOTBLK is hitted in `erofs_init_device`, it means the\nprimary device must be a block device, and the extra device\nis not a block device. The error can be converted to -EINVAL.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.8,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00177,"percentile":0.07285,"provenance":"source"},"cwes":[],"references":[{"url":"https://git.kernel.org/stable/c/65115472f741ca000d7ea4a5922214f93cd1516e","tags":[]},{"url":"https://git.kernel.org/stable/c/cd04beb9ce2773a16057248bb4fa424068ae3807","tags":[]},{"url":"https://git.kernel.org/stable/c/9748f2f54f66743ac77275c34886a9f890e18409","tags":[]}],"priority":{"score":6.9,"factors":[{"name":"EPSS percentile","points":1.46},{"name":"CVSS severity","points":5.46}]},"vendorSlug":"linux","affectedVersions":[{"vendor":"Linux","product":"Linux","versions":[">= fb176750266a3d7f42ebdcf28e8ba40350b27847, < 65115472f741ca000d7ea4a5922214f93cd1516e",">= fb176750266a3d7f42ebdcf28e8ba40350b27847, < cd04beb9ce2773a16057248bb4fa424068ae3807",">= fb176750266a3d7f42ebdcf28e8ba40350b27847, < 9748f2f54f66743ac77275c34886a9f890e18409"]},{"vendor":"Linux","product":"Linux","versions":["6.12"]}],"euvd":{"id":"EUVD-2025-19772","exploited":false,"provenance":"source"}}