Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1336 CNY

100%

CVE-2024-56582— btrfs: fix use-after-free in btrfs_encoded_read_endio()

Quick assessment

Affected
Linux Linux
Exploitation
No confirmed in-the-wild exploitation; assess based on exposure
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel存在安全漏洞,该漏洞源于btrfs模块中btrfs_encoded_read_endio函数中释放后重用。

AI Predicted 5.5 Difficulty: Hard EPSS 0.24% · P15

Affected Version Matrix 10

VendorProduct Version RangeStatus
Linux Linux 1881fba89bd5dcd364d2e1bf561912a90a11c21a< a40de0330af4fb7bc6b354250c24f294f8b826a0 affected
1881fba89bd5dcd364d2e1bf561912a90a11c21a< 6228f13f1996a4feb9b601d6644bf0bfe03671dd affected
1881fba89bd5dcd364d2e1bf561912a90a11c21a< f8a5129e4a9fc3f6aa3f137513253b51b31b94d4 affected
1881fba89bd5dcd364d2e1bf561912a90a11c21a< 05b36b04d74a517d6675bf2f90829ff1ac7e28dc affected
5.18 affected
< 5.18 unaffected
6.1.124≤ 6.1.* unaffected
6.6.70≤ 6.6.* unaffected
… +2 more rows
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2024-56582

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
btrfs: fix use-after-free in btrfs_encoded_read_endio()
Source: CVE Program / CVE List V5
Vulnerability Description
In the Linux kernel, the following vulnerability has been resolved: btrfs: fix use-after-free in btrfs_encoded_read_endio() Shinichiro reported the following use-after free that sometimes is happening in our CI system when running fstests' btrfs/284 on a TCMU runner device: BUG: KASAN: slab-use-after-free in lock_release+0x708/0x780 Read of size 8 at addr ffff888106a83f18 by task kworker/u80:6/219 CPU: 8 UID: 0 PID: 219 Comm: kworker/u80:6 Not tainted 6.12.0-rc6-kts+ #15 Hardware name: Supermicro Super Server/X11SPi-TF, BIOS 3.3 02/21/2020 Workqueue: btrfs-endio btrfs_end_bio_work [btrfs] Call Trace: <TASK> dump_stack_lvl+0x6e/0xa0 ? lock_release+0x708/0x780 print_report+0x174/0x505 ? lock_release+0x708/0x780 ? __virt_addr_valid+0x224/0x410 ? lock_release+0x708/0x780 kasan_report+0xda/0x1b0 ? lock_release+0x708/0x780 ? __wake_up+0x44/0x60 lock_release+0x708/0x780 ? __pfx_lock_release+0x10/0x10 ? __pfx_do_raw_spin_lock+0x10/0x10 ? lock_is_held_type+0x9a/0x110 _raw_spin_unlock_irqrestore+0x1f/0x60 __wake_up+0x44/0x60 btrfs_encoded_read_endio+0x14b/0x190 [btrfs] btrfs_check_read_bio+0x8d9/0x1360 [btrfs] ? lock_release+0x1b0/0x780 ? trace_lock_acquire+0x12f/0x1a0 ? __pfx_btrfs_check_read_bio+0x10/0x10 [btrfs] ? process_one_work+0x7e3/0x1460 ? lock_acquire+0x31/0xc0 ? process_one_work+0x7e3/0x1460 process_one_work+0x85c/0x1460 ? __pfx_process_one_work+0x10/0x10 ? assign_work+0x16c/0x240 worker_thread+0x5e6/0xfc0 ? __pfx_worker_thread+0x10/0x10 kthread+0x2c3/0x3a0 ? __pfx_kthread+0x10/0x10 ret_from_fork+0x31/0x70 ? __pfx_kthread+0x10/0x10 ret_from_fork_asm+0x1a/0x30 </TASK> Allocated by task 3661: kasan_save_stack+0x30/0x50 kasan_save_track+0x14/0x30 __kasan_kmalloc+0xaa/0xb0 btrfs_encoded_read_regular_fill_pages+0x16c/0x6d0 [btrfs] send_extent_data+0xf0f/0x24a0 [btrfs] process_extent+0x48a/0x1830 [btrfs] changed_cb+0x178b/0x2ea0 [btrfs] btrfs_ioctl_send+0x3bf9/0x5c20 [btrfs] _btrfs_ioctl_send+0x117/0x330 [btrfs] btrfs_ioctl+0x184a/0x60a0 [btrfs] __x64_sys_ioctl+0x12e/0x1a0 do_syscall_64+0x95/0x180 entry_SYSCALL_64_after_hwframe+0x76/0x7e Freed by task 3661: kasan_save_stack+0x30/0x50 kasan_save_track+0x14/0x30 kasan_save_free_info+0x3b/0x70 __kasan_slab_free+0x4f/0x70 kfree+0x143/0x490 btrfs_encoded_read_regular_fill_pages+0x531/0x6d0 [btrfs] send_extent_data+0xf0f/0x24a0 [btrfs] process_extent+0x48a/0x1830 [btrfs] changed_cb+0x178b/0x2ea0 [btrfs] btrfs_ioctl_send+0x3bf9/0x5c20 [btrfs] _btrfs_ioctl_send+0x117/0x330 [btrfs] btrfs_ioctl+0x184a/0x60a0 [btrfs] __x64_sys_ioctl+0x12e/0x1a0 do_syscall_64+0x95/0x180 entry_SYSCALL_64_after_hwframe+0x76/0x7e The buggy address belongs to the object at ffff888106a83f00 which belongs to the cache kmalloc-rnd-07-96 of size 96 The buggy address is located 24 bytes inside of freed 96-byte region [ffff888106a83f00, ffff888106a83f60) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888106a83800 pfn:0x106a83 flags: 0x17ffffc0000000(node=0|zone=2|lastcpupid=0x1fffff) page_type: f5(slab) raw: 0017ffffc0000000 ffff888100053680 ffffea0004917200 0000000000000004 raw: ffff888106a83800 0000000080200019 00000001f5000000 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888106a83e00: fa fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc ffff888106a83e80: fa fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc >ffff888106a83f00: fa fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc ^ ffff888106a83f80: fa fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc ffff888106a84000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== Further analyzing the trace and ---truncated---
Source: CVE Program / CVE List V5
CVSS Information
N/A
Source: CVE Program / CVE List V5
Vulnerability Type
N/A
Source: CVE Program / CVE List V5
Vulnerability Title
Linux kernel 安全漏洞
Source: CNNVD (China National Vulnerability Database)
Vulnerability Description
Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel存在安全漏洞,该漏洞源于btrfs模块中btrfs_encoded_read_endio函数中释放后重用。
Source: CNNVD (China National Vulnerability Database)
CVSS Information
N/A
Source: CNNVD (China National Vulnerability Database)
Vulnerability Type
N/A
Source: CNNVD (China National Vulnerability Database)

Affected Products

Vendor Product Affected Versions CPE Subscribe
Linux Linux 1881fba89bd5dcd364d2e1bf561912a90a11c21a ~ a40de0330af4fb7bc6b354250c24f294f8b826a0 -
Linux Linux 5.18 -

II. Public POCs for CVE-2024-56582

# POC Description Source Link Shenlong Link
AI-Generated POC Premium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2024-56582

登录查看更多情报信息。

Patches & Fixes for CVE-2024-56582 (4)

Same Patch Batch · Linux · 2024-12-27 · 221 CVEs total

CVE-2024-53206 9.8 CRITICAL tcp: Fix use-after-free of nreq in reqsk_timer_handler().
CVE-2024-53209 9.8 CRITICAL bnxt_en: Fix receive ring space parameters when XDP is active
CVE-2024-56656 9.8 CRITICAL bnxt_en: Fix aggregation ID mask to prevent oops on 5760X chips
CVE-2024-53169 9.8 CRITICAL nvme-fabrics: fix kernel crash while shutting down controller
CVE-2024-56645 9.8 CRITICAL can: j1939: j1939_session_new(): fix skb reference counting
CVE-2024-53186 9.8 CRITICAL ksmbd: fix use-after-free in SMB request handling
CVE-2024-56640 9.8 CRITICAL net/smc: fix LGR and link use-after-free issue
CVE-2024-53176 9.8 CRITICAL smb: During unmount, ensure all cached dir instances drop their dentry
CVE-2024-53177 9.8 CRITICAL smb: prevent use-after-free due to open_cached_dir error paths
CVE-2024-53179 9.8 CRITICAL smb: client: fix use-after-free of signing key
CVE-2024-56626 8.8 HIGH ksmbd: fix Out-of-Bounds Write in ksmbd_vfs_stream_write
CVE-2024-56653 8.8 HIGH Bluetooth: btmtk: avoid UAF in btmtk_process_coredump
CVE-2024-56651 8.8 HIGH can: hi311x: hi3110_can_ist(): fix potential use-after-free
CVE-2024-56591 8.8 HIGH Bluetooth: hci_conn: Use disable_delayed_work_sync
CVE-2024-53224 8.8 HIGH RDMA/mlx5: Move events notifier registration to be after device registration
CVE-2024-53237 8.8 HIGH Bluetooth: fix use-after-free in device_for_each_child()
CVE-2024-56669 8.8 HIGH iommu/vt-d: Remove cache tags before disabling ATS
CVE-2024-56627 8.1 HIGH ksmbd: fix Out-of-Bounds Read in ksmbd_vfs_stream_read
CVE-2024-53214 7.8 HIGH vfio/pci: Properly hide first-in-list PCIe extended capability
CVE-2024-56619 7.8 HIGH nilfs2: fix potential out-of-bounds memory access in nilfs_find_entry()

Showing top 20 of 221 CVEs. View all on vendor page &rarr; →

IV. Related Vulnerabilities

V. Comments for CVE-2024-56582

No comments yet


Leave a comment