syzbot


KASAN: use-after-free Read in ext4_xattr_delete_inode

Status: auto-obsoleted due to no activity on 2024/09/06 15:54
Reported-by: syzbot+ad53946c7d28ab357d8e@syzkaller.appspotmail.com
First crash: 206d, last: 181d
Similar bugs (5)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-54 KASAN: use-after-free Read in ext4_xattr_delete_inode C 212 74d 214d 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 102 16d 209d 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 205 6d18h 209d 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 16d 209d 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 error 48 114d 209d 0/3 upstream: reported C repro on 2024/05/31 07:20

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

CPU: 1 PID: 3982 Comm: syz-executor Not tainted 6.1.96-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106
 print_address_description mm/kasan/report.c:284 [inline]
 print_report+0x15f/0x4f0 mm/kasan/report.c:395
 kasan_report+0x136/0x160 mm/kasan/report.c:495
 ext4_xattr_delete_inode+0xcd0/0xce0 fs/ext4/xattr.c:2905
 ext4_evict_inode+0xc77/0x1150 fs/ext4/inode.c:296
 evict+0x2a4/0x620 fs/inode.c:666
 d_delete_notify include/linux/fsnotify.h:261 [inline]
 vfs_rmdir+0x381/0x4b0 fs/namei.c:4206
 do_rmdir+0x3a2/0x590 fs/namei.c:4254
 __do_sys_unlinkat fs/namei.c:4434 [inline]
 __se_sys_unlinkat fs/namei.c:4428 [inline]
 __x64_sys_unlinkat+0xdc/0xf0 fs/namei.c:4428
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f2895975217
Code: 73 01 c3 48 c7 c1 a8 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 07 01 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fff0c00b378 EFLAGS: 00000207 ORIG_RAX: 0000000000000107
RAX: ffffffffffffffda RBX: 0000000000000065 RCX: 00007f2895975217
RDX: 0000000000000200 RSI: 00007fff0c00c520 RDI: 00000000ffffff9c
RBP: 00007f28959e364a R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000100 R11: 0000000000000207 R12: 00007fff0c00c520
R13: 00007f28959e364a R14: 0000000000016a78 R15: 00007fff0c00e700
 </TASK>

The buggy address belongs to the physical page:
page:ffffea000145aa40 refcount:0 mapcount:-128 mapping:0000000000000000 index:0x1 pfn:0x516a9
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000000 ffffea00015792c8 ffffea0001562748 0000000000000000
raw: 0000000000000001 0000000000000000 00000000ffffff7f 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as freed
page last allocated via order 0, migratetype Movable, gfp_mask 0x140cca(GFP_HIGHUSER_MOVABLE|__GFP_COMP), pid 4330, tgid 4325 (syz.4.197), ts 91194012895, free_ts 93014244755
 set_page_owner include/linux/page_owner.h:31 [inline]
 post_alloc_hook+0x18d/0x1b0 mm/page_alloc.c:2513
 prep_new_page mm/page_alloc.c:2520 [inline]
 get_page_from_freelist+0x31a1/0x3320 mm/page_alloc.c:4279
 __alloc_pages+0x28d/0x770 mm/page_alloc.c:5547
 __folio_alloc+0xf/0x30 mm/page_alloc.c:5579
 vma_alloc_folio+0x486/0x990 mm/mempolicy.c:2243
 shmem_alloc_folio mm/shmem.c:1589 [inline]
 shmem_alloc_and_acct_folio+0x5a8/0xd50 mm/shmem.c:1613
 shmem_get_folio_gfp+0x13f0/0x3470 mm/shmem.c:1941
 shmem_get_folio mm/shmem.c:2072 [inline]
 shmem_write_begin+0x16e/0x4e0 mm/shmem.c:2559
 generic_perform_write+0x2fc/0x5e0 mm/filemap.c:3817
 __generic_file_write_iter+0x176/0x400 mm/filemap.c:3945
 generic_file_write_iter+0xab/0x310 mm/filemap.c:3977
 call_write_iter include/linux/fs.h:2265 [inline]
 new_sync_write fs/read_write.c:491 [inline]
 vfs_write+0x7ae/0xba0 fs/read_write.c:584
 ksys_write+0x19c/0x2c0 fs/read_write.c:637
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
page last free stack trace:
 reset_page_owner include/linux/page_owner.h:24 [inline]
 free_pages_prepare mm/page_alloc.c:1440 [inline]
 free_pcp_prepare mm/page_alloc.c:1490 [inline]
 free_unref_page_prepare+0xf63/0x1120 mm/page_alloc.c:3358
 free_unref_page_list+0x663/0x900 mm/page_alloc.c:3499
 release_pages+0x2836/0x2b40 mm/swap.c:1055
 __pagevec_release+0x80/0xf0 mm/swap.c:1075
 pagevec_release include/linux/pagevec.h:71 [inline]
 folio_batch_release include/linux/pagevec.h:135 [inline]
 shmem_undo_range+0x865/0x2390 mm/shmem.c:946
 shmem_truncate_range mm/shmem.c:1062 [inline]
 shmem_evict_inode+0x265/0xa60 mm/shmem.c:1171
 evict+0x2a4/0x620 fs/inode.c:666
 __dentry_kill+0x436/0x650 fs/dcache.c:607
 dentry_kill+0xbb/0x290
 dput+0xfb/0x1d0 fs/dcache.c:914
 __fput+0x5e4/0x890 fs/file_table.c:328
 task_work_run+0x246/0x300 kernel/task_work.c:179
 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
 exit_to_user_mode_loop+0xde/0x100 kernel/entry/common.c:177
 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:210
 __syscall_exit_to_user_mode_work kernel/entry/common.c:292 [inline]
 syscall_exit_to_user_mode+0x60/0x270 kernel/entry/common.c:303
 do_syscall_64+0x47/0xb0 arch/x86/entry/common.c:87

Memory state around the buggy address:
 ffff8880516a8f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff8880516a8f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff8880516a9000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
                   ^
 ffff8880516a9080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff8880516a9100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================

Crashes (50):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/06/28 15:53 linux-6.1.y 99e6a620de00 757f06b1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/27 21:26 linux-6.1.y 99e6a620de00 6ef39602 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/26 22:25 linux-6.1.y eb44d83053d6 c6d33a01 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/25 01:16 linux-6.1.y eb44d83053d6 215eef4a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/20 17:38 linux-6.1.y eb44d83053d6 dac2aa43 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/20 17:38 linux-6.1.y eb44d83053d6 dac2aa43 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/20 17:38 linux-6.1.y eb44d83053d6 dac2aa43 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/19 04:45 linux-6.1.y eb44d83053d6 41b7e219 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/18 17:49 linux-6.1.y eb44d83053d6 639d6cdf .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/18 17:49 linux-6.1.y eb44d83053d6 639d6cdf .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/17 23:45 linux-6.1.y eb44d83053d6 1f11cfd7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/17 19:21 linux-6.1.y eb44d83053d6 1f11cfd7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/17 19:21 linux-6.1.y eb44d83053d6 1f11cfd7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/17 18:43 linux-6.1.y eb44d83053d6 1f11cfd7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/17 14:17 linux-6.1.y eb44d83053d6 1f11cfd7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/17 14:17 linux-6.1.y eb44d83053d6 1f11cfd7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/17 06:06 linux-6.1.y eb44d83053d6 f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/16 20:34 linux-6.1.y eb44d83053d6 f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/16 15:19 linux-6.1.y eb44d83053d6 f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/16 09:02 linux-6.1.y ae9f2a70d69e f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/16 09:02 linux-6.1.y ae9f2a70d69e f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/15 03:48 linux-6.1.y ae9f2a70d69e f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/15 03:48 linux-6.1.y ae9f2a70d69e f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/15 03:48 linux-6.1.y ae9f2a70d69e f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/15 01:18 linux-6.1.y ae9f2a70d69e f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/15 01:17 linux-6.1.y ae9f2a70d69e f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/15 01:17 linux-6.1.y ae9f2a70d69e f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/14 21:52 linux-6.1.y ae9f2a70d69e f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/14 01:24 linux-6.1.y ae9f2a70d69e a9616ff5 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/12 14:24 linux-6.1.y ae9f2a70d69e f815599d .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/12 01:58 linux-6.1.y 88690811da69 4d75f4f7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/11 23:44 linux-6.1.y 88690811da69 4d75f4f7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/10 19:29 linux-6.1.y 88690811da69 048c640a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/08 21:57 linux-6.1.y 88690811da69 82c05ab8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/05 17:24 linux-6.1.y 88690811da69 5aa1a7c9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/05 05:13 linux-6.1.y 88690811da69 e1e2c66e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/05 05:13 linux-6.1.y 88690811da69 e1e2c66e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/04 13:54 linux-6.1.y 88690811da69 11f2afa5 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/04 13:54 linux-6.1.y 88690811da69 11f2afa5 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/04 13:54 linux-6.1.y 88690811da69 11f2afa5 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/04 02:47 linux-6.1.y 88690811da69 a1feae05 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/04 02:44 linux-6.1.y 88690811da69 a1feae05 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/04 02:44 linux-6.1.y 88690811da69 a1feae05 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/03 15:22 linux-6.1.y 88690811da69 0aba2352 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
2024/06/03 15:22 linux-6.1.y 88690811da69 0aba2352 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in ext4_xattr_delete_inode
* Struck through repros no longer work on HEAD.