{"id":"DEBIAN-CVE-2024-46733","details":"In the Linux kernel, the following vulnerability has been resolved:  btrfs: fix qgroup reserve leaks in cow_file_range  In the buffered write path, the dirty page owns the qgroup reserve until it creates an ordered_extent.  Therefore, any errors that occur before the ordered_extent is created must free that reservation, or else the space is leaked. The fstest generic/475 exercises various IO error paths, and is able to trigger errors in cow_file_range where we fail to get to allocating the ordered extent. Note that because we *do* clear delalloc, we are likely to remove the inode from the delalloc list, so the inodes/pages to not have invalidate/launder called on them in the commit abort path.  This results in failures at the unmount stage of the test that look like:    BTRFS: error (device dm-8 state EA) in cleanup_transaction:2018: errno=-5 IO failure   BTRFS: error (device dm-8 state EA) in btrfs_replace_file_extents:2416: errno=-5 IO failure   BTRFS warning (device dm-8 state EA): qgroup 0/5 has unreleased space, type 0 rsv 28672   ------------[ cut here ]------------   WARNING: CPU: 3 PID: 22588 at fs/btrfs/disk-io.c:4333 close_ctree+0x222/0x4d0 [btrfs]   Modules linked in: btrfs blake2b_generic libcrc32c xor zstd_compress raid6_pq   CPU: 3 PID: 22588 Comm: umount Kdump: loaded Tainted: G W          6.10.0-rc7-gab56fde445b8 #21   Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Arch Linux 1.16.3-1-1 04/01/2014   RIP: 0010:close_ctree+0x222/0x4d0 [btrfs]   RSP: 0018:ffffb4465283be00 EFLAGS: 00010202   RAX: 0000000000000001 RBX: ffffa1a1818e1000 RCX: 0000000000000001   RDX: 0000000000000000 RSI: ffffb4465283bbe0 RDI: ffffa1a19374fcb8   RBP: ffffa1a1818e13c0 R08: 0000000100028b16 R09: 0000000000000000   R10: 0000000000000003 R11: 0000000000000003 R12: ffffa1a18ad7972c   R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000   FS:  00007f9168312b80(0000) GS:ffffa1a4afcc0000(0000) knlGS:0000000000000000   CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033   CR2: 00007f91683c9140 CR3: 000000010acaa000 CR4: 00000000000006f0   Call Trace:    \u003cTASK\u003e    ? close_ctree+0x222/0x4d0 [btrfs]    ? __warn.cold+0x8e/0xea    ? close_ctree+0x222/0x4d0 [btrfs]    ? report_bug+0xff/0x140    ? handle_bug+0x3b/0x70    ? exc_invalid_op+0x17/0x70    ? asm_exc_invalid_op+0x1a/0x20    ? close_ctree+0x222/0x4d0 [btrfs]    generic_shutdown_super+0x70/0x160    kill_anon_super+0x11/0x40    btrfs_kill_super+0x11/0x20 [btrfs]    deactivate_locked_super+0x2e/0xa0    cleanup_mnt+0xb5/0x150    task_work_run+0x57/0x80    syscall_exit_to_user_mode+0x121/0x130    do_syscall_64+0xab/0x1a0    entry_SYSCALL_64_after_hwframe+0x77/0x7f   RIP: 0033:0x7f916847a887   ---[ end trace 0000000000000000 ]---   BTRFS error (device dm-8 state EA): qgroup reserved space leaked  Cases 2 and 3 in the out_reserve path both pertain to this type of leak and must free the reserved qgroup data. Because it is already an error path, I opted not to handle the possible errors in btrfs_free_qgroup_data.","modified":"2026-09-15T09:03:11.706840445Z","published":"2024-09-18T07:15:04.170Z","upstream":["CVE-2024-46733"],"references":[{"type":"ADVISORY","url":"https://security-tracker.debian.org/tracker/CVE-2024-46733"}],"affected":[{"package":{"name":"linux","ecosystem":"Debian:12","purl":"pkg:deb/debian/linux?arch=source&distro=bookworm"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"6.1.135-1"}]}],"versions":["6.1.106-1","6.1.106-2","6.1.106-3","6.1.112-1","6.1.115-1","6.1.119-1","6.1.123-1","6.1.124-1","6.1.128-1","6.1.129-1","6.1.133-1","6.1.27-1","6.1.37-1","6.1.38-1","6.1.38-2","6.1.38-2~bpo11+1","6.1.38-3","6.1.38-4","6.1.38-4~bpo11+1","6.1.52-1","6.1.55-1","6.1.55-1~bpo11+1","6.1.64-1","6.1.66-1","6.1.67-1","6.1.69-1","6.1.69-1~bpo11+1","6.1.76-1","6.1.76-1~bpo11+1","6.1.82-1","6.1.85-1","6.1.90-1","6.1.90-1~bpo11+1","6.1.94-1","6.1.94-1~bpo11+1","6.1.98-1","6.1.99-1"],"ecosystem_specific":{"urgency":"not yet assigned"},"database_specific":{"source":"https://storage.googleapis.com/osv-test-debian-osv/debian-cve-osv/DEBIAN-CVE-2024-46733.json"}},{"package":{"name":"linux","ecosystem":"Debian:13","purl":"pkg:deb/debian/linux?arch=source&distro=trixie"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"6.10.9-1"}]}],"ecosystem_specific":{"urgency":"not yet assigned"},"database_specific":{"source":"https://storage.googleapis.com/osv-test-debian-osv/debian-cve-osv/DEBIAN-CVE-2024-46733.json"}},{"package":{"name":"linux","ecosystem":"Debian:14","purl":"pkg:deb/debian/linux?arch=source&distro=forky"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"6.10.9-1"}]}],"ecosystem_specific":{"urgency":"not yet assigned"},"database_specific":{"source":"https://storage.googleapis.com/osv-test-debian-osv/debian-cve-osv/DEBIAN-CVE-2024-46733.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H"}]}