{"id":"CVE-2024-41086","state":"PUBLISHED","title":"bcachefs: Fix sb_field_downgrade validation","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nbcachefs: Fix sb_field_downgrade validation\n\n- bch2_sb_downgrade_validate() wasn't checking for a downgrade entry\n  extending past the end of the superblock section\n\n- for_each_downgrade_entry() is used in to_text() and needs to work on\n  malformed input; it also was missing a check for a field extending\n  past the end of the section","publishedAt":"2024-07-29T15:48:02.175Z","updatedAt":"2026-08-05T11:35:16.451Z","severity":{"score":7.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"84f1638795da1ff2084597de4251e9054f1ad728","status":"affected","lessThan":"bf920ed92ef24dcd6970c88881cd4700b3acf05b","versionType":"git"},{"version":"84f1638795da1ff2084597de4251e9054f1ad728","status":"affected","lessThan":"692aa7a54b2b28d59f24b3bf8250837805484b99","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/bcachefs/sb-downgrade.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.7","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.7","versionType":"semver"},{"version":"6.9.8","status":"unaffected","lessThanOrEqual":"6.9.*","versionType":"semver"},{"version":"6.10","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/bcachefs/sb-downgrade.c"]}],"references":["https://git.kernel.org/stable/c/bf920ed92ef24dcd6970c88881cd4700b3acf05b","https://git.kernel.org/stable/c/692aa7a54b2b28d59f24b3bf8250837805484b99"],"weaknesses":[],"ingestedAt":"2026-10-29T20:07:39.287Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2024/41xxx/CVE-2024-41086.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2024-41086","state":"PUBLISHED","datePublished":"2024-07-29T15:48:02.175Z","dateUpdated":"2026-08-05T11:35:16.451Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-07-12T12:17:45.634Z"},"containers":{"cna":{"title":"bcachefs: Fix sb_field_downgrade validation","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nbcachefs: Fix sb_field_downgrade validation\n\n- bch2_sb_downgrade_validate() wasn't checking for a downgrade entry\n  extending past the end of the superblock section\n\n- for_each_downgrade_entry() is used in to_text() and needs to work on\n  malformed input; it also was missing a check for a field extending\n  past the end of the section"}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"84f1638795da1ff2084597de4251e9054f1ad728","status":"affected","lessThan":"bf920ed92ef24dcd6970c88881cd4700b3acf05b","versionType":"git"},{"version":"84f1638795da1ff2084597de4251e9054f1ad728","status":"affected","lessThan":"692aa7a54b2b28d59f24b3bf8250837805484b99","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/bcachefs/sb-downgrade.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.7","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.7","versionType":"semver"},{"version":"6.9.8","status":"unaffected","lessThanOrEqual":"6.9.*","versionType":"semver"},{"version":"6.10","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/bcachefs/sb-downgrade.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/bf920ed92ef24dcd6970c88881cd4700b3acf05b"},{"url":"https://git.kernel.org/stable/c/692aa7a54b2b28d59f24b3bf8250837805484b99"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The vulnerability is triggered by parsing a crafted bcachefs superblock from an attached block device (USB stick, loop-mounted image, or attached storage) during mount, which requires local presentation of the malicious filesystem rather than any network path.\nAC:L - The attacker fully controls every input — the `nr_errors` field, the entry's major version that forces the validation failure into `to_text()`, and the superblock checksum — so the out-of-bounds read is triggered deterministically on every mount attempt.\nPR:N - Authoring the malicious filesystem image requires no privileges on the target system whatsoever; the attacker only needs to supply the image, and the mounting privilege belongs to the victim, not the attacker.\nUI:R - A user or administrator must mount the crafted image (or insert removable media that a desktop auto-mounter mounts) for `bch2_read_super()` to reach the vulnerable loop.\nS:U - The out-of-bounds read and its consequences are confined to the kernel's own memory and the kernel security authority; no VM, IOMMU, or sandbox boundary is crossed.\nC:H - Up to ~128 KB of kernel heap beyond the superblock slab allocation is read and each `u16` is decoded into an exact error-string name when below `BCH_SB_ERR_MAX`, disclosing adjacent heap contents through the kernel log — far beyond a strictly bounded few-byte read.\nI:H - Out-of-bounds heap values flow into `__set_bit(e, c->sb.errors_silent)` in `bch2_sb_set_downgrade()`, silently suppressing filesystem consistency error detection during recovery, and the unvalidated malformed section reaches the superblock write-back path, corrupting on-disk metadata handling.\nA:H - The slab-out-of-bounds read reported by syzbot panics KASAN/hardened kernels immediately, and a wild ~32-page read plus a multi-megabyte printbuf expansion can oops or exhaust memory on production kernels."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T11:35:16.451Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.7","versionEndExcluding":"6.9.8"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.7","versionEndExcluding":"6.10"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CVE Program Container","references":[{"url":"https://git.kernel.org/stable/c/bf920ed92ef24dcd6970c88881cd4700b3acf05b","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/692aa7a54b2b28d59f24b3bf8250837805484b99","tags":["x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-02T04:46:52.363Z"}},{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2024-41086","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"version":"2.0.3","timestamp":"2024-09-10T16:20:49.092454Z"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-09-11T17:33:58.845Z"}}]}}}