{"id":"CVE-2024-46751","state":"PUBLISHED","title":"btrfs: don't BUG_ON() when 0 reference count at btrfs_lookup_extent_info()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nbtrfs: don't BUG_ON() when 0 reference count at btrfs_lookup_extent_info()\n\nInstead of doing a BUG_ON() handle the error by returning -EUCLEAN,\naborting the transaction and logging an error message.","publishedAt":"2024-09-18T07:12:11.240Z","updatedAt":"2026-08-05T11:38:21.347Z","severity":{"score":7.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"5d4f98a28c7d334091c1b7744f48a1acdd2a4ae0","status":"affected","lessThan":"9c309d2434abbe880712af7e60da9ead8b6703fe","versionType":"git"},{"version":"5d4f98a28c7d334091c1b7744f48a1acdd2a4ae0","status":"affected","lessThan":"d64807ded1b6054f066e03d8add6d920f3db9e5d","versionType":"git"},{"version":"5d4f98a28c7d334091c1b7744f48a1acdd2a4ae0","status":"affected","lessThan":"18eb53a2734ff61b9a72c4fef5db7b38cb48ae16","versionType":"git"},{"version":"5d4f98a28c7d334091c1b7744f48a1acdd2a4ae0","status":"affected","lessThan":"3cfec712a439c5c5f5c718c5c669ee41a898f776","versionType":"git"},{"version":"5d4f98a28c7d334091c1b7744f48a1acdd2a4ae0","status":"affected","lessThan":"ef9a8b73c8b60b27d9db4787e624a3438ffe8428","versionType":"git"},{"version":"5d4f98a28c7d334091c1b7744f48a1acdd2a4ae0","status":"affected","lessThan":"28cb13f29faf6290597b24b728dc3100c019356f","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/btrfs/extent-tree.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"2.6.31","status":"affected"},{"version":"0","status":"unaffected","lessThan":"2.6.31","versionType":"semver"},{"version":"5.10.238","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.184","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.140","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.92","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.10.10","status":"unaffected","lessThanOrEqual":"6.10.*","versionType":"semver"},{"version":"6.11","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/btrfs/extent-tree.c"]}],"references":["https://git.kernel.org/stable/c/9c309d2434abbe880712af7e60da9ead8b6703fe","https://git.kernel.org/stable/c/d64807ded1b6054f066e03d8add6d920f3db9e5d","https://git.kernel.org/stable/c/18eb53a2734ff61b9a72c4fef5db7b38cb48ae16","https://git.kernel.org/stable/c/3cfec712a439c5c5f5c718c5c669ee41a898f776","https://git.kernel.org/stable/c/ef9a8b73c8b60b27d9db4787e624a3438ffe8428","https://git.kernel.org/stable/c/28cb13f29faf6290597b24b728dc3100c019356f","https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html","https://lists.debian.org/debian-lts-announce/2025/08/msg00010.html"],"weaknesses":[],"ingestedAt":"2026-10-29T20:07:47.831Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2024/46xxx/CVE-2024-46751.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2024-46751","state":"PUBLISHED","datePublished":"2024-09-18T07:12:11.240Z","dateUpdated":"2026-08-05T11:38:21.347Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-09-11T15:12:18.268Z"},"containers":{"cna":{"title":"btrfs: don't BUG_ON() when 0 reference count at btrfs_lookup_extent_info()","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nbtrfs: don't BUG_ON() when 0 reference count at btrfs_lookup_extent_info()\n\nInstead of doing a BUG_ON() handle the error by returning -EUCLEAN,\naborting the transaction and logging an error message."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"5d4f98a28c7d334091c1b7744f48a1acdd2a4ae0","status":"affected","lessThan":"9c309d2434abbe880712af7e60da9ead8b6703fe","versionType":"git"},{"version":"5d4f98a28c7d334091c1b7744f48a1acdd2a4ae0","status":"affected","lessThan":"d64807ded1b6054f066e03d8add6d920f3db9e5d","versionType":"git"},{"version":"5d4f98a28c7d334091c1b7744f48a1acdd2a4ae0","status":"affected","lessThan":"18eb53a2734ff61b9a72c4fef5db7b38cb48ae16","versionType":"git"},{"version":"5d4f98a28c7d334091c1b7744f48a1acdd2a4ae0","status":"affected","lessThan":"3cfec712a439c5c5f5c718c5c669ee41a898f776","versionType":"git"},{"version":"5d4f98a28c7d334091c1b7744f48a1acdd2a4ae0","status":"affected","lessThan":"ef9a8b73c8b60b27d9db4787e624a3438ffe8428","versionType":"git"},{"version":"5d4f98a28c7d334091c1b7744f48a1acdd2a4ae0","status":"affected","lessThan":"28cb13f29faf6290597b24b728dc3100c019356f","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/btrfs/extent-tree.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"2.6.31","status":"affected"},{"version":"0","status":"unaffected","lessThan":"2.6.31","versionType":"semver"},{"version":"5.10.238","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.184","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.140","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.92","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.10.10","status":"unaffected","lessThanOrEqual":"6.10.*","versionType":"semver"},{"version":"6.11","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/btrfs/extent-tree.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/9c309d2434abbe880712af7e60da9ead8b6703fe"},{"url":"https://git.kernel.org/stable/c/d64807ded1b6054f066e03d8add6d920f3db9e5d"},{"url":"https://git.kernel.org/stable/c/18eb53a2734ff61b9a72c4fef5db7b38cb48ae16"},{"url":"https://git.kernel.org/stable/c/3cfec712a439c5c5f5c718c5c669ee41a898f776"},{"url":"https://git.kernel.org/stable/c/ef9a8b73c8b60b27d9db4787e624a3438ffe8428"},{"url":"https://git.kernel.org/stable/c/28cb13f29faf6290597b24b728dc3100c019356f"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The vulnerable path is reached through a locally attached btrfs filesystem — a crafted image on a USB stick, loop-mounted file, or container/VM disk image — and then driven by ordinary local file writes or subvolume deletion. There is no network-facing consumer of btrfs_lookup_extent_info().\nAC:L - The triggering condition is a static, fully attacker-controlled on-disk value (extent item refs == 0) that the tree checker does not reject, so the crafted image deterministically hits the BUG_ON on the first COW or snapshot-delete of the affected block. No race, timing window, or memory-layout dependency is involved.\nPR:L - Once a crafted or inconsistent btrfs is mounted — routinely via desktop/kiosk automount (udisks2/systemd), shared storage, or container images — any unprivileged local user with write access drives btrfs_force_cow_block()/btrfs_drop_snapshot() into the assertion; no capability check gates the path.\nUI:N - After the filesystem is present, the attacker triggers the fault entirely through their own file writes or a subvolume delete, with no action required from any other user. Automount removes the need for a victim to explicitly mount the device.\nS:U - The crash and any resulting metadata corruption are confined to the kernel and the affected btrfs filesystem, within the same security authority. No hypervisor, IOMMU, or sandbox boundary is crossed.\nC:H - The assertion is btrfs's last line of defense before operating on an extent with broken reference bookkeeping; when it is bypassed (CONFIG_BUG=n embedded/IoT builds) update_ref_for_cow() takes the last-reference path and frees a still-referenced tree block, producing cross-linked extents that expose one file's or subvolume's data through another. The oops itself also dumps kernel registers, stack contents, and pointers to the log.\nI:H - Continuing past a zero refcount causes btrfs to free and re-allocate live metadata blocks, giving the attacker arbitrary corruption of extent-tree and file data belonging to other users on the filesystem. The oops additionally aborts a transaction mid-flight, leaving on-disk state inconsistent.\nA:H - BUG_ON() panics the kernel outright under panic_on_oops; otherwise the task is killed while still holding delayed_refs->lock, head->mutex, and tree locks, so every subsequent delayed-ref operation on that filesystem spins or blocks forever — an unrecoverable filesystem-wide hang and potential hard lockup, which is exactly why the fix unlocks all three before returning -EUCLEAN."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T11:38:21.347Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.31","versionEndExcluding":"5.10.238"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.31","versionEndExcluding":"5.15.184"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.31","versionEndExcluding":"6.1.140"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.31","versionEndExcluding":"6.6.92"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.31","versionEndExcluding":"6.10.10"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.31","versionEndExcluding":"6.11"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2024-09-29T14:47:35.151913Z","id":"CVE-2024-46751","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-09-29T14:47:50.614Z"}},{"title":"CVE Program Container","references":[{"url":"https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html"},{"url":"https://lists.debian.org/debian-lts-announce/2025/08/msg00010.html"}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2025-11-03T19:31:02.648Z"}}]}}}