syzbot


KASAN: use-after-free Read in ext4_xattr_delete_inode

Status: upstream: reported C repro on 2024/05/31 07:59
Bug presence: origin:upstream
[Documentation on labels]
Reported-by: syzbot+1a3077ff32098e7caf1e@syzkaller.appspotmail.com
First crash: 134d, last: 4d22h
Bug presence (2)
Date Name Commit Repro Result
2024/05/31 lts (merge base) 458ce51d0356 C [report] KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/05/31 upstream (ToT) 4a4be1ad3a6e C [report] KASAN: use-after-free Read in ext4_xattr_delete_inode
Similar bugs (5)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-6.1 KASAN: use-after-free Read in ext4_xattr_delete_inode 50 105d 130d 0/3 auto-obsoleted due to no activity on 2024/09/06 15:54
android-54 KASAN: use-after-free Read in ext4_xattr_delete_inode C 212 16d 139d 0/2 upstream: reported C repro on 2024/05/26 05:00
android-6-1 KASAN: use-after-free Read in ext4_xattr_delete_inode origin:upstream C 101 11d 134d 0/2 upstream: reported C repro on 2024/05/31 08:44
android-5-10 KASAN: use-after-free Read in ext4_xattr_delete_inode C 47 11d 134d 0/2 upstream: reported C repro on 2024/05/31 07:37
linux-5.15 KASAN: use-after-free Read in ext4_xattr_delete_inode origin:upstream C 48 39d 134d 0/3 upstream: reported C repro on 2024/05/31 07:20
Last patch testing requests (1)
Created Duration User Patch Repo Result
2024/07/19 11:33 8m retest repro android13-5.15-lts report log
Fix bisection attempts (2)
Created Duration User Patch Repo Result
2024/10/07 10:37 1h02m bisect fix android13-5.15-lts OK (0) job log log
2024/08/24 23:47 1h07m bisect fix android13-5.15-lts OK (0) job log log

Sample crash report:
==================================================================
BUG: KASAN: use-after-free in ext4_xattr_delete_inode+0xcd0/0xce0 fs/ext4/xattr.c:2904
Read of size 4 at addr ffff88810778f000 by task syz-executor841/294

CPU: 0 PID: 294 Comm: syz-executor841 Not tainted 5.15.149-syzkaller-00055-g424f92bcbe8f #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x151/0x1b7 lib/dump_stack.c:106
 print_address_description+0x87/0x3b0 mm/kasan/report.c:248
 __kasan_report mm/kasan/report.c:427 [inline]
 kasan_report+0x179/0x1c0 mm/kasan/report.c:444
 __asan_report_load4_noabort+0x14/0x20 mm/kasan/report_generic.c:308
 ext4_xattr_delete_inode+0xcd0/0xce0 fs/ext4/xattr.c:2904
 ext4_evict_inode+0xea1/0x14e0 fs/ext4/inode.c:300
 evict+0x2a3/0x630 fs/inode.c:587
 iput_final fs/inode.c:1705 [inline]
 iput+0x63b/0x7e0 fs/inode.c:1731
 d_delete_notify include/linux/fsnotify.h:270 [inline]
 vfs_rmdir+0x359/0x470 fs/namei.c:4162
 do_rmdir+0x3ab/0x630 fs/namei.c:4210
 __do_sys_rmdir fs/namei.c:4229 [inline]
 __se_sys_rmdir fs/namei.c:4227 [inline]
 __x64_sys_rmdir+0x49/0x50 fs/namei.c:4227
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x61/0xcb
RIP: 0033:0x7fe2aba47dc7
Code: 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 54 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffe9d70cac8 EFLAGS: 00000207 ORIG_RAX: 0000000000000054
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fe2aba47dc7
RDX: 0000000000008890 RSI: 0000000000000000 RDI: 00007ffe9d70dc70
RBP: 0000000000000065 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000100 R11: 0000000000000207 R12: 00007ffe9d70dc70
R13: 00005555564ab740 R14: 431bde82d7b634db R15: 00007ffe9d70fdf0
 </TASK>

Allocated by task 1:
 kasan_save_stack mm/kasan/common.c:38 [inline]
 kasan_set_track mm/kasan/common.c:45 [inline]
 set_alloc_info mm/kasan/common.c:433 [inline]
 ____kasan_kmalloc+0xdb/0x110 mm/kasan/common.c:512
 __kasan_kmalloc+0x9/0x10 mm/kasan/common.c:521
 kasan_kmalloc include/linux/kasan.h:227 [inline]
 kmem_cache_alloc_trace+0x115/0x210 mm/slub.c:3267
 kmalloc include/linux/slab.h:603 [inline]
 kzalloc include/linux/slab.h:733 [inline]
 call_usermodehelper_setup+0x8f/0x220 kernel/umh.c:365
 kobject_uevent_env+0x637/0x700 lib/kobject_uevent.c:614
 kobject_uevent+0x1f/0x30 lib/kobject_uevent.c:642
 kernel_add_sysfs_param+0x108/0x12d kernel/params.c:816
 param_sysfs_builtin+0x16a/0x1e2 kernel/params.c:851
 param_sysfs_init+0x6a/0x6f kernel/params.c:970
 do_one_initcall+0x182/0x610 init/main.c:1299
 do_initcall_level+0x186/0x304 init/main.c:1372
 do_initcalls+0x4e/0x8e init/main.c:1388
 do_basic_setup+0x81/0x8a init/main.c:1407
 kernel_init_freeable+0x2c1/0x3f7 init/main.c:1612
 kernel_init+0x1d/0x290 init/main.c:1503
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298

The buggy address belongs to the object at ffff88810778f000
 which belongs to the cache kmalloc-128 of size 128
The buggy address is located 0 bytes inside of
 128-byte region [ffff88810778f000, ffff88810778f080)
The buggy address belongs to the page:
page:ffffea00041de3c0 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10778f
flags: 0x4000000000000200(slab|zone=1)
raw: 4000000000000200 ffffea00041de240 0000000500000005 ffff888100042a80
raw: 0000000000000000 0000000080100010 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x12cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY), pid 1, ts 1205780601, free_ts 0
 set_page_owner include/linux/page_owner.h:33 [inline]
 post_alloc_hook+0x1a3/0x1b0 mm/page_alloc.c:2604
 prep_new_page+0x1b/0x110 mm/page_alloc.c:2610
 get_page_from_freelist+0x3550/0x35d0 mm/page_alloc.c:4484
 __alloc_pages+0x27e/0x8f0 mm/page_alloc.c:5776
 allocate_slab mm/slub.c:1932 [inline]
 new_slab+0x9a/0x4e0 mm/slub.c:1995
 ___slab_alloc+0x39e/0x830 mm/slub.c:3028
 __slab_alloc+0x4a/0x90 mm/slub.c:3115
 slab_alloc_node mm/slub.c:3206 [inline]
 slab_alloc mm/slub.c:3248 [inline]
 kmem_cache_alloc_trace+0x142/0x210 mm/slub.c:3265
 kmalloc include/linux/slab.h:603 [inline]
 kzalloc include/linux/slab.h:733 [inline]
 call_usermodehelper_setup+0x8f/0x220 kernel/umh.c:365
 kobject_uevent_env+0x637/0x700 lib/kobject_uevent.c:614
 kobject_uevent+0x1f/0x30 lib/kobject_uevent.c:642
 kernel_add_sysfs_param+0x108/0x12d kernel/params.c:816
 param_sysfs_builtin+0x16a/0x1e2 kernel/params.c:851
 param_sysfs_init+0x6a/0x6f kernel/params.c:970
 do_one_initcall+0x182/0x610 init/main.c:1299
 do_initcall_level+0x186/0x304 init/main.c:1372
page_owner free stack trace missing

Memory state around the buggy address:
 ffff88810778ef00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff88810778ef80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff88810778f000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                   ^
 ffff88810778f080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff88810778f100: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================

Crashes (194):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/05/31 07:51 android13-5.15-lts 424f92bcbe8f 34889ee3 .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-android-5-15 KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/07/05 11:08 android13-5.15-lts 9044d25b8ff5 2a40360c .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15 KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/07/04 08:14 android13-5.15-lts 9044d25b8ff5 3f2748a3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15 KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/07/03 19:20 android13-5.15-lts 9044d25b8ff5 f76a75f3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15 KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/07/03 15:30 android13-5.15-lts 9044d25b8ff5 1ecfa2d8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15 KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/07/03 05:12 android13-5.15-lts 9044d25b8ff5 1ecfa2d8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15 KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/07/02 10:00 android13-5.15-lts 9044d25b8ff5 07f0a0a0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15 KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/07/01 14:29 android13-5.15-lts 9044d25b8ff5 b294e901 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15 KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/28 16:10 android13-5.15-lts 9044d25b8ff5 757f06b1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15 KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/26 12:18 android13-5.15-lts 9044d25b8ff5 c6d33a01 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15 KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/26 09:13 android13-5.15-lts 9044d25b8ff5 dec8bc94 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15 KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/25 22:03 android13-5.15-lts 9044d25b8ff5 dec8bc94 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15 KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/24 22:42 android13-5.15-lts 9044d25b8ff5 215eef4a .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15 KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/24 10:40 android13-5.15-lts 9044d25b8ff5 edc5149a .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15 KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/21 16:26 android13-5.15-lts 85445b5a2107 edc5149a .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15 KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/20 13:18 android13-5.15-lts 85445b5a2107 dac2aa43 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15 KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/20 13:17 android13-5.15-lts 85445b5a2107 dac2aa43 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15 KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/19 04:05 android13-5.15-lts 85445b5a2107 41b7e219 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15 KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/18 11:02 android13-5.15-lts 85445b5a2107 ce6011bc .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15 KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/18 08:46 android13-5.15-lts 85445b5a2107 ce6011bc .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15 KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/18 07:28 android13-5.15-lts 85445b5a2107 ce6011bc .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15 KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/18 02:37 android13-5.15-lts 85445b5a2107 ce6011bc .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15 KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/18 01:17 android13-5.15-lts 85445b5a2107 ce6011bc .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15 KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/17 21:27 android13-5.15-lts 85445b5a2107 1f11cfd7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15 KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/17 21:27 android13-5.15-lts 85445b5a2107 1f11cfd7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15 KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/17 20:14 android13-5.15-lts 85445b5a2107 1f11cfd7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15 KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/17 14:32 android13-5.15-lts 85445b5a2107 1f11cfd7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15 KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/17 13:20 android13-5.15-lts 85445b5a2107 1f11cfd7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15 KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/17 11:44 android13-5.15-lts 85445b5a2107 1f11cfd7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15 KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/17 08:54 android13-5.15-lts 85445b5a2107 88722c0f .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15 KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/17 07:47 android13-5.15-lts 85445b5a2107 f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15 KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/17 07:47 android13-5.15-lts 85445b5a2107 f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15 KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/17 04:53 android13-5.15-lts 85445b5a2107 f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15 KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/17 02:21 android13-5.15-lts 85445b5a2107 f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15 KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/16 22:38 android13-5.15-lts 85445b5a2107 f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15 KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/16 21:02 android13-5.15-lts 85445b5a2107 f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15 KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/16 18:43 android13-5.15-lts 85445b5a2107 f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15 KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/16 17:43 android13-5.15-lts 85445b5a2107 f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15 KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/16 11:32 android13-5.15-lts 85445b5a2107 f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15 KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/16 08:04 android13-5.15-lts 85445b5a2107 f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15 KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/16 05:36 android13-5.15-lts 85445b5a2107 f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15 KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/16 02:58 android13-5.15-lts 85445b5a2107 f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15 KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/15 20:53 android13-5.15-lts 85445b5a2107 f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15 KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/15 19:03 android13-5.15-lts 85445b5a2107 f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15 KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/15 17:30 android13-5.15-lts 85445b5a2107 f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15 KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/15 16:10 android13-5.15-lts 85445b5a2107 f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15 KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/15 14:14 android13-5.15-lts 85445b5a2107 f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15 KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/15 12:28 android13-5.15-lts 85445b5a2107 f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15 KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/16 08:05 android13-5.15-lts 85445b5a2107 f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15 KASAN: slab-out-of-bounds Read in ext4_xattr_delete_inode
2024/06/14 13:45 android13-5.15-lts 85445b5a2107 8d849073 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15 KASAN: out-of-bounds Read in ext4_xattr_delete_inode
* Struck through repros no longer work on HEAD.