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
primary is a file-backed device, extra devices should also be
regular files.
However, if the primary is a block device while the extra device
is a file-backed device, erofs_init_device will get an ENOTBLK,
which is not treated as an error in erofs_fc_get_tree, and that
leads to an UAF:
erofsfcgettree gettreebdevflags(erofsfcfillsuper) erofsreadsuperblock erofsinitdevice // sbi->dif0 is not inited yet, // return -ENOTBLK deactivatelockedsuper free(sbi) if (err is -ENOTBLK) sbi->dif0.file = filpopen() // sbi UAF
So if -ENOTBLK is hitted in erofs_init_device, it means the
primary device must be a block device, and the extra device
is not a block device. The error can be converted to -EINVAL.
[
{
"id": "CVE-2025-38172-31e291f0",
"deprecated": false,
"digest": {
"length": 1373.0,
"function_hash": "179934217437853389915950967232845861772"
},
"target": {
"file": "fs/erofs/super.c",
"function": "erofs_init_device"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9748f2f54f66743ac77275c34886a9f890e18409",
"signature_version": "v1",
"signature_type": "Function"
},
{
"id": "CVE-2025-38172-389afc44",
"deprecated": false,
"digest": {
"length": 1373.0,
"function_hash": "179934217437853389915950967232845861772"
},
"target": {
"file": "fs/erofs/super.c",
"function": "erofs_init_device"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@cd04beb9ce2773a16057248bb4fa424068ae3807",
"signature_version": "v1",
"signature_type": "Function"
},
{
"id": "CVE-2025-38172-6f5dfb2b",
"deprecated": false,
"digest": {
"length": 1387.0,
"function_hash": "116103684906645232437401598458549171618"
},
"target": {
"file": "fs/erofs/super.c",
"function": "erofs_init_device"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@65115472f741ca000d7ea4a5922214f93cd1516e",
"signature_version": "v1",
"signature_type": "Function"
},
{
"id": "CVE-2025-38172-75b0b8d1",
"deprecated": false,
"digest": {
"line_hashes": [
"93896023460800140993078890913851437936",
"234263658139618896240067322419426957989",
"5338847901380570306155002562365792301",
"99211175673006647044442294068155915222",
"59683606506007078008947281108343889143"
],
"threshold": 0.9
},
"target": {
"file": "fs/erofs/super.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@cd04beb9ce2773a16057248bb4fa424068ae3807",
"signature_version": "v1",
"signature_type": "Line"
},
{
"id": "CVE-2025-38172-8a16fc20",
"deprecated": false,
"digest": {
"line_hashes": [
"93896023460800140993078890913851437936",
"234263658139618896240067322419426957989",
"5338847901380570306155002562365792301",
"99211175673006647044442294068155915222",
"59683606506007078008947281108343889143"
],
"threshold": 0.9
},
"target": {
"file": "fs/erofs/super.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9748f2f54f66743ac77275c34886a9f890e18409",
"signature_version": "v1",
"signature_type": "Line"
},
{
"id": "CVE-2025-38172-e4c1abab",
"deprecated": false,
"digest": {
"line_hashes": [
"93896023460800140993078890913851437936",
"234263658139618896240067322419426957989",
"5338847901380570306155002562365792301",
"99211175673006647044442294068155915222",
"59683606506007078008947281108343889143"
],
"threshold": 0.9
},
"target": {
"file": "fs/erofs/super.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@65115472f741ca000d7ea4a5922214f93cd1516e",
"signature_version": "v1",
"signature_type": "Line"
}
]