cbcvebase.
CVE-2024-49867
published 2024-10-21

CVE-2024-49867: In the Linux kernel, the following vulnerability has been resolved: btrfs: wait for fixup workers before stopping cleaner kthread during umount During unmount…

PriorityP421medium5.5CVSS 3.1
AVLACLPRLUINSUCNINAH
EPSS
0.29%
21.3th percentile
In the Linux kernel, the following vulnerability has been resolved: btrfs: wait for fixup workers before stopping cleaner kthread during umount During unmount, at close_ctree(), we have the following steps in this order: 1) Park the cleaner kthread - this doesn't destroy the kthread, it basically halts its execution (wake ups against it work but do nothing); 2) We stop the cleaner kthread - this results in freeing the respective struct task_struct; 3) We call btrfs_stop_all_workers() which waits for any jobs running in all the work queues and then free the work queues. Syzbot reported a case where a fixup worker resulted in a crash when doing a delayed iput on its inode while attempting to wake up the cleaner at btrfs_add_delayed_iput(), because the task_struct of the cleaner kthread was already freed. This can happen during unmount because we don't wait for any fixup workers still running before we call kthread_stop() against the cleaner kthread, which stops and free all its resources. Fix this by waiting for any fixup workers at close_ctree() before we call kthread_stop() against the cleaner and run pending delayed iputs. The stack traces reported by syzbot were the following: BUG: KASAN: slab-use-after-free in __lock_acquire+0x77/0x2050 kernel/locking/lockdep.c:5065 Read of size 8 at addr ffff8880272a8a18 by task kworker/u8:3/52 CPU: 1 UID: 0 PID: 52 Comm: kworker/u8:3 Not tainted 6.12.0-rc1-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Workqueue: btrfs-fixup btrfs_work_helper Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:377 [inline] print_report+0x169/0x550 mm/kasan/report.c:488 kasan_report+0x143/0x180 mm/kasan/report.c:601 __lock_acquire+0x77/0x2050 kernel/locking/lockdep.c:5065 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5825 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [

Affected

36 ranges· showing 25
VendorProductVersion rangeFixed in
debianlinux< linux 6.1.115-1 (bookworm)linux 6.1.115-1 (bookworm)
debianlinux-6.1< linux 6.1.115-1 (bookworm)linux 6.1.115-1 (bookworm)
linuxlinux
linuxlinux
linuxlinux>= 5.4.22 < 5.4.2855.4.285
linuxlinux>= 5.5.6 < 5.65.6
linuxlinux>= 7a97311de48d56af6db4c5819f95faf9b0b23b1a < a71349b692ab34ea197949e13e3cc42570fe73d9a71349b692ab34ea197949e13e3cc42570fe73d9
linuxlinux>= f4b1363cae43fef7c86c993b7ca7fe7d546b3c68 < 70b60c8d9b42763d6629e44f448aa5d8ae477d6170b60c8d9b42763d6629e44f448aa5d8ae477d61
linuxlinux>= f4b1363cae43fef7c86c993b7ca7fe7d546b3c68 < 4c98fe0dfa2ae83c4631699695506d8941db4bfe4c98fe0dfa2ae83c4631699695506d8941db4bfe
linuxlinux>= f4b1363cae43fef7c86c993b7ca7fe7d546b3c68 < 9da40aea63f8769f28afb91aea0fac4cf6fbbb659da40aea63f8769f28afb91aea0fac4cf6fbbb65
linuxlinux>= f4b1363cae43fef7c86c993b7ca7fe7d546b3c68 < ed87190e9d9c80aad220fb6b0b03a84d22e2c95bed87190e9d9c80aad220fb6b0b03a84d22e2c95b
linuxlinux>= f4b1363cae43fef7c86c993b7ca7fe7d546b3c68 < bf0de0f9a0544c11f96f93206da04ab87dcea1f4bf0de0f9a0544c11f96f93206da04ab87dcea1f4
linuxlinux>= f4b1363cae43fef7c86c993b7ca7fe7d546b3c68 < 65d11eb276836d49003a8060cf31fa2284ad104765d11eb276836d49003a8060cf31fa2284ad1047
linuxlinux>= f4b1363cae43fef7c86c993b7ca7fe7d546b3c68 < 41fd1e94066a815a7ab0a7025359e9b40e4b357641fd1e94066a815a7ab0a7025359e9b40e4b3576
linuxlinux_kernel< 5.10.2275.10.227
linuxlinux_kernel>= 0 < 5.10.234-15.10.234-1
linuxlinux_kernel>= 0 < 6.1.115-16.1.115-1
linuxlinux_kernel>= 0 < 6.11.4-16.11.4-1
linuxlinux_kernel>= 0 < 6.11.4-16.11.4-1
linuxlinux_kernel>= 0 < 5.4.0-208.2285.4.0-208.228
linuxlinux_kernel>= 0 < 5.15.0-127.1375.15.0-127.137
linuxlinux_kernel>= 0 < 6.8.0-54.566.8.0-54.56
linuxlinux_kernel>= 0 < 6.11.0-18.186.11.0-18.18
linuxlinux_kernel>= 5.11 < 5.15.1685.15.168
linuxlinux_kernel>= 5.16 < 6.1.1136.1.113

CVSS provenance

nvdv3.15.5MEDIUMCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
osv8.8HIGH
vendor_ubuntu8.8HIGH
vendor_debian5.5MEDIUM
vendor_msrc5.5MEDIUM
vendor_redhat5.5MEDIUM
Stop checking back — get the weekly exploitation signal.

Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.