syzbot


KASAN: out-of-bounds Read in ext4_xattr_set_entry

Status: auto-obsoleted due to no activity on 2023/08/23 09:06
Subsystems: ext4
[Documentation on labels]
Reported-by: syzbot+7e8d321460434dffad35@syzkaller.appspotmail.com
First crash: 1125d, last: 359d
Similar bugs (13)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.19 KASAN: use-after-free Read in ext4_xattr_set_entry (2) C done 7 950d 1408d 1/1 fixed on 2021/10/13 07:23
android-5-15 KASAN: out-of-bounds Read in ext4_xattr_set_entry 1 305d 305d 0/2 auto-obsoleted due to no activity on 2023/09/17 07:02
linux-6.1 KASAN: out-of-bounds Read in ext4_xattr_set_entry origin:upstream missing-backport syz unreliable 1 305d 336d 0/3 upstream: reported syz repro on 2023/05/19 08:42
android-5-10 KASAN: out-of-bounds Read in ext4_xattr_set_entry C 1 3d01h 212d 0/2 upstream: reported C repro on 2023/09/20 02:40
linux-4.14 KASAN: out-of-bounds Read in ext4_xattr_set_entry C error 2 589d 1103d 0/1 upstream: reported C repro on 2021/04/12 14:20
android-5-15 general protection fault in ext4_xattr_set_entry C error 1 414d 494d 2/2 fixed on 2023/03/28 12:29
android-5-10 general protection fault in ext4_xattr_set_entry (4) C error 62 317d 346d 2/2 fixed on 2023/06/07 17:22
android-5-10 general protection fault in ext4_xattr_set_entry (2) ext4 C error 423 352d 552d 2/2 fixed on 2023/05/03 13:06
upstream KASAN: use-after-free Read in ext4_xattr_set_entry (5) ext4 2 634d 692d 0/26 auto-obsoleted due to no activity on 2022/11/22 17:19
android-5-10 general protection fault in ext4_xattr_set_entry (3) C error 9 348d 351d 2/2 fixed on 2023/05/08 19:06
upstream KASAN: use-after-free Read in ext4_xattr_set_entry (4) ext4 C error done 21 788d 1175d 20/26 fixed on 2022/03/28 10:17
android-5-10 general protection fault in ext4_xattr_set_entry C error 2 575d 589d 0/2 closed as invalid on 2022/09/26 18:30
android-5-10 general protection fault in ext4_xattr_set_entry (5) C done 11 314d 316d 2/2 fixed on 2023/06/13 02:27
Last patch testing requests (3)
Created Duration User Patch Repo Result
2023/07/06 04:06 15m retest repro android12-5.4 OK log
2023/04/26 10:56 24m retest repro android12-5.4 OK log
2023/04/26 10:56 12m retest repro android12-5.4 report log

Sample crash report:
==================================================================
BUG: KASAN: out-of-bounds in ext4_xattr_set_entry+0x1bc7/0x3c50 fs/ext4/xattr.c:1726
Read of size 18446744073709551600 at addr ffff8881e9df00d4 by task syz-executor357/343

CPU: 1 PID: 343 Comm: syz-executor357 Not tainted 5.4.107-syzkaller-00750-g543ec4541c0e #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x1d8/0x24e lib/dump_stack.c:118
 print_address_description+0x9b/0x650 mm/kasan/report.c:384
 __kasan_report+0x182/0x260 mm/kasan/report.c:516
 kasan_report+0x30/0x60 mm/kasan/common.c:641
 check_memory_region_inline mm/kasan/generic.c:141 [inline]
 check_memory_region+0x2a5/0x2e0 mm/kasan/generic.c:191
 memmove+0x25/0x50 mm/kasan/common.c:114
 ext4_xattr_set_entry+0x1bc7/0x3c50 fs/ext4/xattr.c:1726
 ext4_xattr_ibody_inline_set+0x74/0x280 fs/ext4/xattr.c:2215
 ext4_destroy_inline_data_nolock+0x1c9/0x5e0 fs/ext4/inline.c:435
 ext4_convert_inline_data_nolock+0x434/0x1640 fs/ext4/inline.c:1218
 ext4_convert_inline_data+0x33c/0x430 fs/ext4/inline.c:2043
 ext4_fallocate+0xdf/0x800 fs/ext4/extents.c:4898
 vfs_fallocate+0x564/0x840 fs/open.c:309
 ksys_fallocate fs/open.c:332 [inline]
 __do_sys_fallocate fs/open.c:340 [inline]
 __se_sys_fallocate fs/open.c:338 [inline]
 __x64_sys_fallocate+0xb9/0x100 fs/open.c:338
 do_syscall_64+0xcb/0x1e0 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x44a3c9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f4e5e560208 EFLAGS: 00000246 ORIG_RAX: 000000000000011d
RAX: ffffffffffffffda RBX: 00000000004cc4e8 RCX: 000000000044a3c9
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000007
RBP: 00000000004cc4e0 R08: 0000000000000000 R09: 0000000000000000
R10: 000000000000bb89 R11: 0000000000000246 R12: 00000000004cc4ec
R13: 00007ffdfbb28fef R14: 00007f4e5e560300 R15: 0000000000022000

The buggy address belongs to the page:
page:ffffea0007a77c00 refcount:2 mapcount:0 mapping:ffff8881f45e5268 index:0x8
def_blk_aops
flags: 0x800000000002203e(referenced|uptodate|dirty|lru|active|private|mappedtodisk)
raw: 800000000002203e ffffea0007773408 ffffea0007a38648 ffff8881f45e5268
raw: 0000000000000008 ffff8881e0072e70 00000002ffffffff ffff8881f5cac000
page dumped because: kasan: bad access detected
page->mem_cgroup:ffff8881f5cac000

Memory state around the buggy address:
 ffff8881e9deff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff8881e9df0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff8881e9df0080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
                                                 ^
 ffff8881e9df0100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff8881e9df0180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================

Crashes (14):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/03/21 22:06 android12-5.4 543ec4541c0e 4c9a64da .config console log report syz C ci2-android-5-4-kasan KASAN: out-of-bounds Read in ext4_xattr_set_entry
2023/01/01 20:06 android12-5.4 a8aad8851131 ab32d508 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-android-5-4-kasan general protection fault in ext4_xattr_set_entry
2023/01/16 10:56 android12-5.4 a0eae55f26a0 a63719e7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-4-kasan general protection fault in ext4_xattr_set_entry
2023/01/13 08:06 android12-5.4 a0eae55f26a0 96166539 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-4-kasan general protection fault in ext4_xattr_set_entry
2023/01/11 05:01 android12-5.4 4a947285bcca 48bc529a .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-4-kasan general protection fault in ext4_xattr_set_entry
2023/01/10 22:15 android12-5.4 4a947285bcca 48bc529a .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-4-kasan general protection fault in ext4_xattr_set_entry
2023/01/08 17:19 android12-5.4 4a947285bcca 1dac8c7a .config console log report info ci2-android-5-4-kasan general protection fault in ext4_xattr_set_entry
2023/01/07 22:19 android12-5.4 4a947285bcca 1dac8c7a .config console log report info ci2-android-5-4-kasan general protection fault in ext4_xattr_set_entry
2023/01/06 06:39 android12-5.4 4a947285bcca 1dac8c7a .config console log report info ci2-android-5-4-kasan general protection fault in ext4_xattr_set_entry
2023/01/05 10:16 android12-5.4 a8aad8851131 1dac8c7a .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-4-kasan general protection fault in ext4_xattr_set_entry
2023/01/05 06:49 android12-5.4 a8aad8851131 1dac8c7a .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-4-kasan general protection fault in ext4_xattr_set_entry
2023/01/04 19:32 android12-5.4 a8aad8851131 1dac8c7a .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-4-kasan general protection fault in ext4_xattr_set_entry
2023/01/04 02:21 android12-5.4 a8aad8851131 f0036e18 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-4-kasan general protection fault in ext4_xattr_set_entry
2023/01/01 19:57 android12-5.4 a8aad8851131 ab32d508 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-4-kasan general protection fault in ext4_xattr_set_entry
* Struck through repros no longer work on HEAD.