nday
CVE-2024-56582

btrfs: fix use-after-free in btrfs_encoded_read_endio()

Linux / Linux

揭露時間:。nday 尚未取得修補依據,不能據此認為沒有修補。四個 PoC 來源皆未收錄。目前未列入 CISA KEV。

tags weakness typeuse-after-free accesslocalno user interaction productLinux kernel product typeoperating system
why these tags

nday derives these tags by fixed rules from the facts below; NVD, the CNA and other sources do not assign them. Vocabulary and rules: ~/tags.

use-after-free
CWE-416, stated by the ADP CISA-ADP、NVD's analysts 與 NVD, republishing 134c704f-9b21-4f2e-91b3-4a467353bcc0
local
AV:L in CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H (CVSS 3.1) from the ADP CISA-ADP
no user interaction
UI:N in CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H (CVSS 3.1) from the ADP CISA-ADP
Linux kernel
affected products in the CVE record: Linux · LinuxCPE names NVD's analysts give as vulnerable: o:linux:linux_kernel
operating system
affected products in the CVE record: Linux · LinuxCPE names NVD's analysts give as vulnerable: o:linux:linux_kernelthe product type of Linux kernel in nday's product registry
目前階段
DIS
揭露時間
CVSS
7.8 HIGH v3.1

生命週期

橫軸 UTC;點=精確到分鐘,寬條=僅日期,空心=不明或推斷。
時間不明
DIS揭露
2024-12-27T14:23Z
PAT修補
尚無紀錄
ANA分析
尚無紀錄
POCPoC
尚無紀錄
ITW遭利用
尚無紀錄
KEVKEV
尚無紀錄

摘要

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---

Original text of the CVE record (cvelist), shown as published.

Exploit conditions

What an attack needs, read from the CVSS vector.
Attack vector AV:L
Local: needs a local or SSH session, or a user tricked into acting on the machine
Attack complexity AC:L
Low: no special conditions; the attacker can expect repeatable success
Privileges required PR:L
Low: ordinary user privileges
User interaction UI:N
None: no action by anyone other than the attacker

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

CVSS 3.1 vector from the CVE record, added by the ADP CISA-ADP.

事件紀錄

+DIS揭露

CVE 紀錄由 Linux 發布。CVSS 7.8,屬高風險等級。

來源 cvelist · nday 於 批次匯入 · 原始
{
  "id": 347734,
  "type": "disclosed",
  "source": "cvelist",
  "url": "https://www.cve.org/CVERecord?id=CVE-2024-56582",
  "occurred_at": "2024-12-27T14:23:23.851Z",
  "observed_at": "2026-11-13T05:38:45.966745Z",
  "is_backfill": true,
  "dedupe_key": "",
  "detail": {
    "cvss": {
      "source": "adp:CISA-ADP",
      "vector": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
      "version": "3.1",
      "base_score": 7.8,
      "base_severity": "HIGH"
    },
    "ssvc": {
      "timestamp": "2025-02-11T15:42:35.022378Z",
      "automatable": "no",
      "exploitation": "none",
      "technical_impact": "total"
    },
    "state": "PUBLISHED",
    "date_published": "2024-12-27T14:23:23.851Z",
    "assigner_short_name": "Linux"
  }
}

Report an error

report an error or omission

Something on this page wrong or missing? Tell the editors; if they accept it, this page's revision log says so publicly. Upstream data is not changed.

研究員討論

近 7 天有 0 位研究員提及

名單內研究員在 X 上提及此 CVE 的貼文,照原文呈現,nday 不查核。

尚未收錄名單內研究員在 X 上提及此 CVE 的貼文。

Discussion

0 comments

No comments yet.