CVE-2024-47701
Severity CVSS v4.0:
Pending analysis
Type:
CWE-416
Use After Free
Publication date:
21/10/2024
Last modified:
08/11/2024
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
ext4: avoid OOB when system.data xattr changes underneath the filesystem<br />
<br />
When looking up for an entry in an inlined directory, if e_value_offs is<br />
changed underneath the filesystem by some change in the block device, it<br />
will lead to an out-of-bounds access that KASAN detects as an UAF.<br />
<br />
EXT4-fs (loop0): mounted filesystem 00000000-0000-0000-0000-000000000000 r/w without journal. Quota mode: none.<br />
loop0: detected capacity change from 2048 to 2047<br />
==================================================================<br />
BUG: KASAN: use-after-free in ext4_search_dir+0xf2/0x1c0 fs/ext4/namei.c:1500<br />
Read of size 1 at addr ffff88803e91130f by task syz-executor269/5103<br />
<br />
CPU: 0 UID: 0 PID: 5103 Comm: syz-executor269 Not tainted 6.11.0-rc4-syzkaller #0<br />
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014<br />
Call Trace:<br />
<br />
__dump_stack lib/dump_stack.c:93 [inline]<br />
dump_stack_lvl+0x241/0x360 lib/dump_stack.c:119<br />
print_address_description mm/kasan/report.c:377 [inline]<br />
print_report+0x169/0x550 mm/kasan/report.c:488<br />
kasan_report+0x143/0x180 mm/kasan/report.c:601<br />
ext4_search_dir+0xf2/0x1c0 fs/ext4/namei.c:1500<br />
ext4_find_inline_entry+0x4be/0x5e0 fs/ext4/inline.c:1697<br />
__ext4_find_entry+0x2b4/0x1b30 fs/ext4/namei.c:1573<br />
ext4_lookup_entry fs/ext4/namei.c:1727 [inline]<br />
ext4_lookup+0x15f/0x750 fs/ext4/namei.c:1795<br />
lookup_one_qstr_excl+0x11f/0x260 fs/namei.c:1633<br />
filename_create+0x297/0x540 fs/namei.c:3980<br />
do_symlinkat+0xf9/0x3a0 fs/namei.c:4587<br />
__do_sys_symlinkat fs/namei.c:4610 [inline]<br />
__se_sys_symlinkat fs/namei.c:4607 [inline]<br />
__x64_sys_symlinkat+0x95/0xb0 fs/namei.c:4607<br />
do_syscall_x64 arch/x86/entry/common.c:52 [inline]<br />
do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83<br />
entry_SYSCALL_64_after_hwframe+0x77/0x7f<br />
RIP: 0033:0x7f3e73ced469<br />
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 21 18 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48<br />
RSP: 002b:00007fff4d40c258 EFLAGS: 00000246 ORIG_RAX: 000000000000010a<br />
RAX: ffffffffffffffda RBX: 0032656c69662f2e RCX: 00007f3e73ced469<br />
RDX: 0000000020000200 RSI: 00000000ffffff9c RDI: 00000000200001c0<br />
RBP: 0000000000000000 R08: 00007fff4d40c290 R09: 00007fff4d40c290<br />
R10: 0023706f6f6c2f76 R11: 0000000000000246 R12: 00007fff4d40c27c<br />
R13: 0000000000000003 R14: 431bde82d7b634db R15: 00007fff4d40c2b0<br />
<br />
<br />
Calling ext4_xattr_ibody_find right after reading the inode with<br />
ext4_get_inode_loc will lead to a check of the validity of the xattrs,<br />
avoiding this problem.
Impact
Base Score 3.x
7.80
Severity 3.x
HIGH
Vulnerable products and versions
CPE | From | Up to |
---|---|---|
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 3.8 (including) | 5.10.227 (excluding) |
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.11 (including) | 5.15.168 (excluding) |
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.16 (including) | 6.1.113 (excluding) |
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.2 (including) | 6.6.54 (excluding) |
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.7 (including) | 6.10.13 (excluding) |
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.11 (including) | 6.11.2 (excluding) |
To consult the complete list of CPE names with products and versions, see this page
References to Advisories, Solutions, and Tools
- https://git.kernel.org/stable/c/2a6579ef5f2576a940125729f7409cc182f1c8df
- https://git.kernel.org/stable/c/371d0bacecd529f887ea2547333d9173e7bcdc0a
- https://git.kernel.org/stable/c/5b076d37e8d99918e9294bd6b35a8bbb436819b0
- https://git.kernel.org/stable/c/7fc22c3b3ffc0e952f5e0062dd11aa6ae76affba
- https://git.kernel.org/stable/c/8adf0eb4e361a9e060d54f4bd0ac9c5d85277d20
- https://git.kernel.org/stable/c/be2e9b111e2790962cc66a177869b4e9717b4e29
- https://git.kernel.org/stable/c/c6b72f5d82b1017bad80f9ebf502832fc321d796
- https://git.kernel.org/stable/c/ccb8c18076e2e630fea23fbec583cdad61787fc5
- https://git.kernel.org/stable/c/ea32883e4a03ed575a2eb7a66542022312bde477