syzbot


KASAN: use-after-free Read in ext4_xattr_delete_inode

Status: upstream: reported C repro on 2024/05/31 07:20
Bug presence: origin:upstream
[Documentation on labels]
Reported-by: syzbot+73c586d849966dd9a6b1@syzkaller.appspotmail.com
First crash: 135d, last: 40d
Bug presence (1)
Date Name Commit Repro Result
2024/06/02 upstream (ToT) a693b9c95abd C [report] KASAN: slab-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 107d 132d 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 17h45m 140d 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 12d 135d 0/2 upstream: reported C repro on 2024/05/31 08:44
android-5-15 KASAN: use-after-free Read in ext4_xattr_delete_inode origin:upstream C 194 6d05h 135d 0/2 upstream: reported C repro on 2024/05/31 07:59
android-5-10 KASAN: use-after-free Read in ext4_xattr_delete_inode C 47 12d 135d 0/2 upstream: reported C repro on 2024/05/31 07:37
Fix bisection attempts (2)
Created Duration User Patch Repo Result
2024/09/03 08:11 1h05m bisect fix linux-5.15.y OK (0) job log log
2024/07/30 05:30 1h19m bisect fix linux-5.15.y 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 ffff88807a0ee000 by task syz-executor295/3522

CPU: 0 PID: 3522 Comm: syz-executor295 Not tainted 5.15.160-syzkaller #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+0x1e3/0x2d0 lib/dump_stack.c:106
 print_address_description+0x63/0x3b0 mm/kasan/report.c:248
 __kasan_report mm/kasan/report.c:434 [inline]
 kasan_report+0x16b/0x1c0 mm/kasan/report.c:451
 ext4_xattr_delete_inode+0xcd0/0xce0 fs/ext4/xattr.c:2904
 ext4_evict_inode+0xcb7/0x1100 fs/ext4/inode.c:299
 evict+0x2a4/0x620 fs/inode.c:587
 d_delete_notify include/linux/fsnotify.h:261 [inline]
 vfs_rmdir+0x33c/0x460 fs/namei.c:4162
 do_rmdir+0x368/0x670 fs/namei.c:4210
 __do_sys_rmdir fs/namei.c:4229 [inline]
 __se_sys_rmdir fs/namei.c:4227 [inline]
 __x64_sys_rmdir+0x45/0x50 fs/namei.c:4227
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7f6041935dc7
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:00007ffcfb5e5ab8 EFLAGS: 00000207 ORIG_RAX: 0000000000000054
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f6041935dc7
RDX: 0000000000008890 RSI: 0000000000000000 RDI: 00007ffcfb5e6c60
RBP: 0000000000000065 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000100 R11: 0000000000000207 R12: 00007ffcfb5e6c60
R13: 00005555565df740 R14: 431bde82d7b634db R15: 00007ffcfb5e8de0
 </TASK>

The buggy address belongs to the page:
page:ffffea0001e83b80 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7a0ee
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000000 ffffea000077ecc8 ffffea0001e5dfc8 0000000000000000
raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as freed
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x500cc2(GFP_HIGHUSER|__GFP_ACCOUNT), pid 3362, ts 32094703347, free_ts 32094881963
 prep_new_page mm/page_alloc.c:2426 [inline]
 get_page_from_freelist+0x322a/0x33c0 mm/page_alloc.c:4159
 __alloc_pages+0x272/0x700 mm/page_alloc.c:5423
 pipe_write+0x5c7/0x1b90 fs/pipe.c:500
 call_write_iter include/linux/fs.h:2172 [inline]
 new_sync_write fs/read_write.c:507 [inline]
 vfs_write+0xacf/0xe50 fs/read_write.c:594
 ksys_write+0x1a2/0x2c0 fs/read_write.c:647
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x66/0xd0
page last free stack trace:
 reset_page_owner include/linux/page_owner.h:24 [inline]
 free_pages_prepare mm/page_alloc.c:1340 [inline]
 free_pcp_prepare mm/page_alloc.c:1391 [inline]
 free_unref_page_prepare+0xc34/0xcf0 mm/page_alloc.c:3317
 free_unref_page+0x95/0x2d0 mm/page_alloc.c:3396
 pipe_buf_release include/linux/pipe_fs_i.h:219 [inline]
 pipe_read+0x6e4/0x12b0 fs/pipe.c:323
 call_read_iter include/linux/fs.h:2166 [inline]
 new_sync_read fs/read_write.c:404 [inline]
 vfs_read+0xa9f/0xe10 fs/read_write.c:485
 ksys_read+0x1a2/0x2c0 fs/read_write.c:623
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x66/0xd0

Memory state around the buggy address:
 ffff88807a0edf00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff88807a0edf80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff88807a0ee000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
                   ^
 ffff88807a0ee080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff88807a0ee100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================

Crashes (48):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/06/02 21:05 linux-5.15.y c61bd26ae81a 3113787f .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-5-15-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/12 14:33 linux-5.15.y c61bd26ae81a f815599d .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/12 07:43 linux-5.15.y c61bd26ae81a 4d75f4f7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/12 00:19 linux-5.15.y c61bd26ae81a 4d75f4f7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/11 18:01 linux-5.15.y c61bd26ae81a 4d75f4f7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/11 18:01 linux-5.15.y c61bd26ae81a 4d75f4f7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/11 17:59 linux-5.15.y c61bd26ae81a 4d75f4f7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/11 17:59 linux-5.15.y c61bd26ae81a 4d75f4f7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/11 17:59 linux-5.15.y c61bd26ae81a 4d75f4f7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/11 17:59 linux-5.15.y c61bd26ae81a 4d75f4f7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/11 17:59 linux-5.15.y c61bd26ae81a 4d75f4f7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/10 18:08 linux-5.15.y c61bd26ae81a 048c640a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/10 18:08 linux-5.15.y c61bd26ae81a 048c640a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/10 18:08 linux-5.15.y c61bd26ae81a 048c640a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/10 18:08 linux-5.15.y c61bd26ae81a 048c640a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/09 23:08 linux-5.15.y c61bd26ae81a 82c05ab8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/08 22:00 linux-5.15.y c61bd26ae81a 82c05ab8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/07 18:40 linux-5.15.y c61bd26ae81a 82c05ab8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/07 18:39 linux-5.15.y c61bd26ae81a 82c05ab8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/07 10:33 linux-5.15.y c61bd26ae81a 121701b6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/07 08:31 linux-5.15.y c61bd26ae81a 121701b6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/07 04:14 linux-5.15.y c61bd26ae81a 121701b6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/07 02:57 linux-5.15.y c61bd26ae81a 121701b6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/07 02:26 linux-5.15.y c61bd26ae81a 121701b6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/06 19:23 linux-5.15.y c61bd26ae81a 121701b6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/06 11:17 linux-5.15.y c61bd26ae81a 121701b6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/06 11:17 linux-5.15.y c61bd26ae81a 121701b6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/06 10:50 linux-5.15.y c61bd26ae81a 121701b6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/06 10:08 linux-5.15.y c61bd26ae81a 121701b6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/06 08:59 linux-5.15.y c61bd26ae81a 121701b6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/06 08:58 linux-5.15.y c61bd26ae81a 121701b6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/06 08:54 linux-5.15.y c61bd26ae81a 121701b6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/06 08:54 linux-5.15.y c61bd26ae81a 121701b6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/05/31 22:51 linux-5.15.y c61bd26ae81a 3113787f .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/05/31 14:52 linux-5.15.y c61bd26ae81a 0c378259 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/05/31 14:52 linux-5.15.y c61bd26ae81a 0c378259 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/05/31 14:52 linux-5.15.y c61bd26ae81a 0c378259 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/05/31 14:52 linux-5.15.y c61bd26ae81a 0c378259 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/05/31 07:38 linux-5.15.y c61bd26ae81a 34889ee3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/05/31 07:37 linux-5.15.y c61bd26ae81a 34889ee3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/05/31 07:36 linux-5.15.y c61bd26ae81a 34889ee3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/05/31 07:20 linux-5.15.y c61bd26ae81a 34889ee3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/05/31 07:19 linux-5.15.y c61bd26ae81a 34889ee3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/12 07:43 linux-5.15.y c61bd26ae81a 4d75f4f7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: out-of-bounds Read in ext4_xattr_delete_inode
* Struck through repros no longer work on HEAD.