CVE Details
Description
In the Linux kernel, the following vulnerability has been resolved:\next4: fix slab-use-after-free in ext4_split_extent_at()\nWe hit the following use-after-free:\n==================================================================\nBUG: KASAN: slab-use-after-free in ext4_split_extent_at+0xba8/0xcc0\nRead of size 2 at addr ffff88810548ed08 by task kworker/u20:0/40\nCPU: 0 PID: 40 Comm: kworker/u20:0 Not tainted 6.9.0-dirty #724\nCall Trace:\n\nkasan_report+0x93/0xc0\next4_split_extent_at+0xba8/0xcc0\next4_split_extent.isra.0+0x18f/0x500\next4_split_convert_extents+0x275/0x750\next4_ext_handle_unwritten_extents+0x73e/0x1580\next4_ext_map_blocks+0xe20/0x2dc0\next4_map_blocks+0x724/0x1700\next4_do_writepages+0x12d6/0x2a70\n[...]\nAllocated by task 40:\n__kmalloc_noprof+0x1ac/0x480\next4_find_extent+0xf3b/0x1e70\next4_ext_map_blocks+0x188/0x2dc0\next4_map_blocks+0x724/0x1700\next4_do_writepages+0x12d6/0x2a70\n[...]\nFreed by task 40:\nkfree+0xf1/0x2b0\next4_find_extent+0xa71/0x1e70\next4_ext_insert_extent+0xa22/0x3260\next4_split_extent_at+0x3ef/0xcc0\next4_split_extent.isra.0+0x18f/0x500\next4_split_convert_extents+0x275/0x750\next4_ext_handle_unwritten_extents+0x73e/0x1580\next4_ext_map_blocks+0xe20/0x2dc0\next4_map_blocks+0x724/0x1700\next4_do_writepages+0x12d6/0x2a70\n[...]\n==================================================================\nThe flow of issue triggering is as follows:\next4_split_extent_at\npath = *ppath\next4_ext_insert_extent(ppath)\next4_ext_create_new_leaf(ppath)\next4_find_extent(orig_path)\npath = *orig_path\nread_extent_tree_block\n// return -ENOMEM or -EIO\next4_free_ext_path(path)\nkfree(path)\n*orig_path = NULL\na. If err is -ENOMEM:\next4_ext_dirty(path + path->p_depth)\n// path use-after-free !!!\nb. If err is -EIO and we have EXT_DEBUG defined:\next4_ext_show_leaf(path)\neh = path[depth].p_hdr\n// path also use-after-free !!!\nSo when trying to zeroout or fix the extent length, call ext4_find_extent()\nto update the path.\nIn addition we use *ppath directly as an ext4_ext_show_leaf() input to\navoid possible use-after-free when EXT_DEBUG is defined, and to avoid\nunnecessary path updates.
See more information about CVE-2024-49884 from MITRE CVE dictionary and NIST NVD
NOTE: The following CVSS metrics and score provided are preliminary and subject to review.
CVSS v3 metrics
Base Score: | 6.7 |
Vector String: | CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H |
Version: | 3.1 |
Attack Vector: | Local |
Attack Complexity: | Low |
Privileges Required: | High |
User Interaction: | None |
Scope: | Unchanged |
Confidentiality: | High |
Integrity: | High |
Availability: | High |
Errata information