{"id":"CVE-2024-36966","aliases":["CVE-2024-36966"],"related":[],"kind":"vulnerability","state":"published","title":"erofs: reliably distinguish block based and fscache mode","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nerofs: reliably distinguish block based and fscache mode\n\nWhen erofs_kill_sb() is called in block dev based mode, s_bdev may not\nhave been initialised yet, and if CONFIG_EROFS_FS_ONDEMAND is enabled,\nit will be mistaken for fscache mode, and then attempt to free an anon_dev\nthat has never been allocated, triggering the following warning:\n\n============================================\nida_free called for id=0 which is not allocated.\nWARNING: CPU: 14 PID: 926 at lib/idr.c:525 ida_free+0x134/0x140\nModules linked in:\nCPU: 14 PID: 926 Comm: mount Not tainted 6.9.0-rc3-dirty #630\nRIP: 0010:ida_free+0x134/0x140\nCall Trace:\n <TASK>\n erofs_kill_sb+0x81/0x90\n deactivate_locked_super+0x35/0x80\n get_tree_bdev+0x136/0x1e0\n vfs_get_tree+0x2c/0xf0\n do_new_mount+0x190/0x2f0\n [...]\n============================================\n\nNow when erofs_kill_sb() is called, erofs_sb_info must have been\ninitialised, so use sbi->fsid to distinguish between the two modes.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nerofs: reliably distinguish block based and fscache mode\n\nWhen erofs_kill_sb() is called in block dev based mode, s_bdev may not\nhave been initialised yet, and if CONFIG_EROFS_FS_ONDEMAND is enabled,\nit will be mistaken for fscache mode, and then attempt to free an anon_dev\nthat has never been allocated, triggering the following warning:\n\n============================================\nida_free called for id=0 which is not allocated.\nWARNING: CPU: 14 PID: 926 at lib/idr.c:525 ida_free+0x134/0x140\nModules linked in:\nCPU: 14 PID: 926 Comm: mount Not tainted 6.9.0-rc3-dirty #630\nRIP: 0010:ida_free+0x134/0x140\nCall Trace:\n <TASK>\n erofs_kill_sb+0x81/0x90\n deactivate_locked_super+0x35/0x80\n get_tree_bdev+0x136/0x1e0\n vfs_get_tree+0x2c/0xf0\n do_new_mount+0x190/0x2f0\n [...]\n============================================\n\nNow when erofs_kill_sb() is called, erofs_sb_info must have been\ninitialised, so use sbi->fsid to distinguish between the two modes.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: erofs: distingue de manera confiable el modo basado en bloques y el modo fscache cuando se llama a erofs_kill_sb() en el modo basado en desarrollo de bloques, es posible que s_bdev aún no se haya inicializado y, si CONFIG_EROFS_FS_ONDEMAND está habilitado, se confundido con el modo fscache y luego intenta liberar un anon_dev que nunca ha sido asignado, lo que genera la siguiente advertencia: ============================= ================= ida_free solicitó id=0 que no está asignado. ADVERTENCIA: CPU: 14 PID: 926 en lib/idr.c:525 ida_free+0x134/0x140 Módulos vinculados en: CPU: 14 PID: 926 Comm: mount No contaminado 6.9.0-rc3-dirty #630 RIP: 0010:ida_free +0x134/0x140 Seguimiento de llamadas:  erofs_kill_sb+0x81/0x90 desactivar_locked_super+0x35/0x80 get_tree_bdev+0x136/0x1e0 vfs_get_tree+0x2c/0xf0 do_new_mount+0x190/0x2f0 [...] ========== ================================== Ahora, cuando se llama a erofs_kill_sb(), erofs_sb_info debe haberse inicializado, así que use sbi-&gt;fsid para distinguir entre los dos modos.","source":"nvd"}],"published":"2024-06-08T12:52:59.148Z","modified":"2026-06-17T07:37:28.403Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"}],"cwes":["CWE-824"],"affected":[{"ranges":[{"type":"git","introduced":"aca740cecbe57b12bd9c1fc632092af5ebacda0c","fixed":"f9b877a7ee312ec8ce17598a7ef85cb820d7c371","status":"affected"},{"type":"git","introduced":"aca740cecbe57b12bd9c1fc632092af5ebacda0c","fixed":"dcdd49701e429c55b3644fd70fc58d85745f8cfe","status":"affected"},{"type":"git","introduced":"aca740cecbe57b12bd9c1fc632092af5ebacda0c","fixed":"7af2ae1b1531feab5d38ec9c8f472dc6cceb4606","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"6.6","status":"affected"},{"type":"semver","introduced":"0","fixed":"6.6","status":"unaffected"},{"type":"semver","introduced":"6.6.32","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.8.11","lastAffected":"6.8.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.9","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"6.6","fixed":"6.6.32"},{"status":"affected","introduced":"6.7","fixed":"6.8.11"},{"status":"affected","version":"6.9"},{"status":"affected","version":"6.9"},{"status":"affected","version":"6.9"},{"status":"affected","version":"6.9"},{"status":"affected","version":"6.9"},{"status":"affected","version":"6.9"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/f9b877a7ee312ec8ce17598a7ef85cb820d7c371","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/dcdd49701e429c55b3644fd70fc58d85745f8cfe","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/7af2ae1b1531feab5d38ec9c8f472dc6cceb4606","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2024-06-12T19:01:23.136Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-36966","url":"https://www.cve.org/CVERecord?id=CVE-2024-36966","licence":"CVE Terms of Use","modified":"2026-05-11T20:18:02.971Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-36966","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-36966","licence":"Public domain","modified":"2026-06-17T07:37:28.403Z"}],"updatedAt":"2026-11-25T22:58:41.562Z","epss":{"score":0.0021,"percentile":0.11795,"date":"2026-12-01T12:00:22.000Z"}}