{"id":"CVE-2024-36966","state":"PUBLISHED","title":"erofs: reliably distinguish block based and fscache mode","description":"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.","publishedAt":"2024-06-08T12:52:59.148Z","updatedAt":"2026-05-11T20:18:02.971Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"aca740cecbe57b12bd9c1fc632092af5ebacda0c","status":"affected","lessThan":"f9b877a7ee312ec8ce17598a7ef85cb820d7c371","versionType":"git"},{"version":"aca740cecbe57b12bd9c1fc632092af5ebacda0c","status":"affected","lessThan":"dcdd49701e429c55b3644fd70fc58d85745f8cfe","versionType":"git"},{"version":"aca740cecbe57b12bd9c1fc632092af5ebacda0c","status":"affected","lessThan":"7af2ae1b1531feab5d38ec9c8f472dc6cceb4606","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/erofs/super.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.6","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.6","versionType":"semver"},{"version":"6.6.32","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.8.11","status":"unaffected","lessThanOrEqual":"6.8.*","versionType":"semver"},{"version":"6.9","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/erofs/super.c"]}],"references":["https://git.kernel.org/stable/c/f9b877a7ee312ec8ce17598a7ef85cb820d7c371","https://git.kernel.org/stable/c/dcdd49701e429c55b3644fd70fc58d85745f8cfe","https://git.kernel.org/stable/c/7af2ae1b1531feab5d38ec9c8f472dc6cceb4606"],"weaknesses":[],"ingestedAt":"2026-10-29T20:07:30.303Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2024/36xxx/CVE-2024-36966.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2024-36966","state":"PUBLISHED","datePublished":"2024-06-08T12:52:59.148Z","dateUpdated":"2026-05-11T20:18:02.971Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-05-30T15:25:07.081Z"},"containers":{"cna":{"title":"erofs: reliably distinguish block based and fscache mode","descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"aca740cecbe57b12bd9c1fc632092af5ebacda0c","status":"affected","lessThan":"f9b877a7ee312ec8ce17598a7ef85cb820d7c371","versionType":"git"},{"version":"aca740cecbe57b12bd9c1fc632092af5ebacda0c","status":"affected","lessThan":"dcdd49701e429c55b3644fd70fc58d85745f8cfe","versionType":"git"},{"version":"aca740cecbe57b12bd9c1fc632092af5ebacda0c","status":"affected","lessThan":"7af2ae1b1531feab5d38ec9c8f472dc6cceb4606","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/erofs/super.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.6","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.6","versionType":"semver"},{"version":"6.6.32","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.8.11","status":"unaffected","lessThanOrEqual":"6.8.*","versionType":"semver"},{"version":"6.9","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/erofs/super.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/f9b877a7ee312ec8ce17598a7ef85cb820d7c371"},{"url":"https://git.kernel.org/stable/c/dcdd49701e429c55b3644fd70fc58d85745f8cfe"},{"url":"https://git.kernel.org/stable/c/7af2ae1b1531feab5d38ec9c8f472dc6cceb4606"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-05-11T20:18:02.971Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.6","versionEndExcluding":"6.6.32"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.6","versionEndExcluding":"6.8.11"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.6","versionEndExcluding":"6.9"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2024-06-12T19:01:23.136909Z","id":"CVE-2024-36966","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-06-12T19:01:35.258Z"}},{"title":"CVE Program Container","references":[{"url":"https://git.kernel.org/stable/c/f9b877a7ee312ec8ce17598a7ef85cb820d7c371","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/dcdd49701e429c55b3644fd70fc58d85745f8cfe","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/7af2ae1b1531feab5d38ec9c8f472dc6cceb4606","tags":["x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-02T03:43:50.363Z"}}]}}}