syzbot


KASAN: slab-out-of-bounds Read in ext4_search_dir

Status: upstream: reported C repro on 2023/11/17 09:38
Reported-by: syzbot+ac107c9fba66d9b8ad08@syzkaller.appspotmail.com
First crash: 370d, last: 6d02h
Fix bisection: failed (error log, bisect log)
  
Similar bugs (7)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-5-15 KASAN: slab-out-of-bounds Read in ext4_search_dir origin:upstream missing-backport C 6 10d 370d 0/2 upstream: reported C repro on 2023/11/17 09:38
upstream KASAN: use-after-free Read in ext4_search_dir prio:low ext4 C error done 20 319d 560d 25/28 fixed on 2024/02/21 18:23
linux-5.15 KASAN: use-after-free Read in ext4_search_dir C done 5 46d 524d 3/3 fixed on 2024/11/08 17:20
android-54 KASAN: use-after-free Read in ext4_search_dir C 17 51d 220d 0/2 upstream: reported C repro on 2024/04/15 06:47
android-6-1 KASAN: use-after-free Read in ext4_search_dir origin:upstream missing-backport C error 26 9d18h 396d 0/2 upstream: reported C repro on 2023/10/22 16:55
linux-6.1 KASAN: use-after-free Read in ext4_search_dir origin:upstream missing-backport C done 1 60d 521d 0/3 upstream: reported C repro on 2023/06/18 19:29
upstream KASAN: use-after-free Read in ext4_search_dir (2) ext4 C 5 70d 94d 28/28 fixed on 2024/10/22 11:57
Last patch testing requests (10)
Created Duration User Patch Repo Result
2024/11/15 09:53 18m retest repro android13-5.10-lts report log
2024/11/15 09:53 18m retest repro android13-5.10-lts report log
2024/11/15 09:53 36m retest repro android13-5.10-lts report log
2024/11/15 09:53 58m retest repro android13-5.10-lts report log
2024/11/15 09:53 15m retest repro android13-5.10-lts report log
2024/09/24 23:03 6m retest repro android13-5.10-lts report log
2024/08/22 08:13 28m retest repro android13-5.10-lts report log
2024/08/08 07:59 10m retest repro android13-5.10-lts report log
2024/07/08 13:46 8m retest repro android13-5.10-lts report log
2024/04/29 09:09 8m retest repro android13-5.10-lts report log
Fix bisection attempts (5)
Created Duration User Patch Repo Result
2024/05/30 18:28 6m bisect fix android13-5.10-lts error job log
2024/04/06 20:03 1h02m bisect fix android13-5.10-lts OK (0) job log log
2024/03/06 22:56 37m bisect fix android13-5.10-lts OK (0) job log log
2024/02/03 06:35 36m bisect fix android13-5.10-lts OK (0) job log log
2023/12/31 11:12 35m bisect fix android13-5.10-lts OK (0) job log log

Sample crash report:
EXT4-fs (loop0): mounted filesystem without journal. Opts: nogrpid,resuid=0x000000000000ee01,debug_want_extra_isize=0x0000000000000068,debug,nombcache,quota,,errors=continue
==================================================================
BUG: KASAN: slab-out-of-bounds in ext4_search_dir+0xf7/0x1b0 fs/ext4/namei.c:1516
Read of size 1 at addr ffff888110100900 by task syz-executor697/324

CPU: 0 PID: 324 Comm: syz-executor697 Not tainted 5.10.226-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack_lvl+0x1e2/0x24b lib/dump_stack.c:118
 print_address_description+0x81/0x3b0 mm/kasan/report.c:248
 __kasan_report mm/kasan/report.c:435 [inline]
 kasan_report+0x179/0x1c0 mm/kasan/report.c:452
 __asan_report_load1_noabort+0x14/0x20 mm/kasan/report_generic.c:306
 ext4_search_dir+0xf7/0x1b0 fs/ext4/namei.c:1516
 ext4_find_inline_entry+0x4b6/0x5e0 fs/ext4/inline.c:1700
 __ext4_find_entry+0x2b0/0x1990 fs/ext4/namei.c:1589
 ext4_lookup_entry fs/ext4/namei.c:1744 [inline]
 ext4_lookup+0x3c6/0xaa0 fs/ext4/namei.c:1812
 __lookup_hash+0x143/0x290 fs/namei.c:1541
 filename_create+0x202/0x750 fs/namei.c:3608
 user_path_create fs/namei.c:3665 [inline]
 do_mknodat+0x187/0x450 fs/namei.c:3729
 __do_sys_mknod fs/namei.c:3768 [inline]
 __se_sys_mknod fs/namei.c:3766 [inline]
 __x64_sys_mknod+0x80/0x90 fs/namei.c:3766
 do_syscall_64+0x34/0x70
 entry_SYSCALL_64_after_hwframe+0x61/0xcb
RIP: 0033:0x7f3c0185cf99
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 c1 1f 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 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffdd7be8628 EFLAGS: 00000246 ORIG_RAX: 0000000000000085
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007f3c0185cf99
RDX: 0000000000000701 RSI: 0000000000000000 RDI: 0000000020000000
RBP: 00007f3c018d3488 R08: 0000000000001501 R09: 0000000000000000
R10: 0000000000001505 R11: 0000000000000246 R12: 00007ffdd7be86b0
R13: 00007ffdd7be8670 R14: 0000000000000003 R15: 0000000000000000

Allocated by task 0:
(stack is not available)

Freed by task 24:
 kasan_save_stack mm/kasan/common.c:38 [inline]
 kasan_set_track+0x4b/0x70 mm/kasan/common.c:45
 kasan_set_free_info+0x23/0x40 mm/kasan/generic.c:370
 ____kasan_slab_free+0x121/0x160 mm/kasan/common.c:362
 __kasan_slab_free+0x11/0x20 mm/kasan/common.c:370
 kasan_slab_free include/linux/kasan.h:220 [inline]
 slab_free_hook mm/slub.c:1595 [inline]
 slab_free_freelist_hook+0xc0/0x190 mm/slub.c:1621
 slab_free mm/slub.c:3203 [inline]
 kfree+0xc3/0x270 mm/slub.c:4191
 skb_free_head net/core/skbuff.c:606 [inline]
 skb_release_data+0x5c6/0x6f0 net/core/skbuff.c:626
 skb_release_all net/core/skbuff.c:680 [inline]
 __kfree_skb net/core/skbuff.c:694 [inline]
 kfree_skb+0xb9/0x320 net/core/skbuff.c:713
 kauditd_hold_skb+0x115/0x200 kernel/audit.c:614
 kauditd_send_queue+0x28d/0x2e0 kernel/audit.c:769
 kauditd_thread+0x523/0x890 kernel/audit.c:893
 kthread+0x34b/0x3d0 kernel/kthread.c:313
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298

The buggy address belongs to the object at ffff888110100000
 which belongs to the cache kmalloc-2k of size 2048
The buggy address is located 256 bytes to the right of
 2048-byte region [ffff888110100000, ffff888110100800)
The buggy address belongs to the page:
page:ffffea0004404000 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x110100
head:ffffea0004404000 order:3 compound_mapcount:0 compound_pincount:0
flags: 0x4000000000010200(slab|head)
raw: 4000000000010200 dead000000000100 dead000000000122 ffff888100042d80
raw: 0000000000000000 0000000000080008 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 3, migratetype Unmovable, gfp_mask 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 299, ts 33857556654, free_ts 33834060065
 set_page_owner include/linux/page_owner.h:35 [inline]
 post_alloc_hook mm/page_alloc.c:2456 [inline]
 prep_new_page+0x166/0x180 mm/page_alloc.c:2462
 get_page_from_freelist+0x2d8c/0x2f30 mm/page_alloc.c:4254
 __alloc_pages_nodemask+0x435/0xaf0 mm/page_alloc.c:5348
 allocate_slab mm/slub.c:1808 [inline]
 new_slab+0x80/0x400 mm/slub.c:1869
 new_slab_objects mm/slub.c:2627 [inline]
 ___slab_alloc+0x302/0x4b0 mm/slub.c:2791
 __slab_alloc+0x63/0xa0 mm/slub.c:2831
 slab_alloc_node mm/slub.c:2913 [inline]
 slab_alloc mm/slub.c:2955 [inline]
 __kmalloc+0x204/0x330 mm/slub.c:4029
 __kmalloc_node include/linux/slab.h:418 [inline]
 kmalloc_node include/linux/slab.h:575 [inline]
 kvmalloc_node+0x82/0x130 mm/util.c:612
 kvmalloc include/linux/mm.h:822 [inline]
 xt_alloc_table_info+0x42/0xb0 net/netfilter/x_tables.c:1172
 ip6t_register_table+0xbe/0x4a0 net/ipv6/netfilter/ip6_tables.c:1745
 ip6table_mangle_table_init+0x7b/0xa0 net/ipv6/netfilter/ip6table_mangle.c:90
 xt_find_table_lock+0x24a/0x3e0 net/netfilter/x_tables.c:1219
 xt_request_find_table_lock+0x27/0xf0 net/netfilter/x_tables.c:1249
 get_info net/ipv6/netfilter/ip6_tables.c:981 [inline]
 do_ip6t_get_ctl+0x86c/0x1890 net/ipv6/netfilter/ip6_tables.c:1670
 nf_getsockopt+0x26c/0x290 net/netfilter/nf_sockopt.c:116
 ipv6_getsockopt+0x1dc1/0x3010 net/ipv6/ipv6_sockglue.c:1492
page last free stack trace:
 reset_page_owner include/linux/page_owner.h:28 [inline]
 free_pages_prepare mm/page_alloc.c:1349 [inline]
 __free_pages_ok+0x82c/0x850 mm/page_alloc.c:1629
 free_the_page+0x76/0x370 mm/page_alloc.c:5409
 __free_pages+0x67/0xc0 mm/page_alloc.c:5418
 __free_slab+0xcf/0x190 mm/slub.c:1894
 free_slab mm/slub.c:1909 [inline]
 discard_slab mm/slub.c:1915 [inline]
 unfreeze_partials+0x15e/0x190 mm/slub.c:2410
 put_cpu_partial+0xbf/0x180 mm/slub.c:2446
 __slab_free+0x2c8/0x3a0 mm/slub.c:3095
 do_slab_free mm/slub.c:3191 [inline]
 ___cache_free+0x111/0x130 mm/slub.c:3210
 qlink_free+0x50/0x90 mm/kasan/quarantine.c:157
 qlist_free_all+0x47/0xb0 mm/kasan/quarantine.c:176
 kasan_quarantine_reduce+0x15a/0x170 mm/kasan/quarantine.c:283
 __kasan_slab_alloc+0x2f/0xe0 mm/kasan/common.c:440
 kasan_slab_alloc include/linux/kasan.h:244 [inline]
 slab_post_alloc_hook+0x61/0x2f0 mm/slab.h:583
 slab_alloc_node mm/slub.c:2947 [inline]
 slab_alloc mm/slub.c:2955 [inline]
 kmem_cache_alloc_trace+0x163/0x2e0 mm/slub.c:2972
 kmalloc include/linux/slab.h:552 [inline]
 kzalloc include/linux/slab.h:664 [inline]
 ____ip_mc_inc_group+0x1fb/0x890 net/ipv4/igmp.c:1452
 __ip_mc_inc_group net/ipv4/igmp.c:1487 [inline]
 ip_mc_inc_group net/ipv4/igmp.c:1493 [inline]
 ip_mc_up+0x10f/0x1e0 net/ipv4/igmp.c:1792

Memory state around the buggy address:
 ffff888110100800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff888110100880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff888110100900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
                   ^
 ffff888110100980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff888110100a00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================
EXT4-fs error (device loop0): ext4_find_dest_de:2077: inode #12: block 7: comm syz-executor697: bad entry in directory: directory entry overrun - offset=0, inode=1793120026, rec_len=34652, size=56 fake=0

Crashes (21):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/10/27 11:18 android13-5.10-lts e5e5644ea27f 65e8686b .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro #1] [mounted in repro #2] ci2-android-5-10 KASAN: slab-out-of-bounds Read in ext4_search_dir
2023/11/17 09:36 android13-5.10-lts d30b996835c0 cb976f63 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro #1] [mounted in repro #2] ci2-android-5-10 KASAN: slab-out-of-bounds Read in ext4_search_dir
2024/10/27 15:46 android13-5.10-lts e5e5644ea27f 65e8686b .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro #1] [mounted in repro #2] ci2-android-5-10 KASAN: use-after-free Read in ext4_search_dir
2024/10/27 05:13 android13-5.10-lts e5e5644ea27f 65e8686b .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro #1] [mounted in repro #2] ci2-android-5-10 KASAN: use-after-free Read in ext4_search_dir
2024/10/27 04:15 android13-5.10-lts e5e5644ea27f 65e8686b .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro #1] [mounted in repro #2] ci2-android-5-10 KASAN: use-after-free Read in ext4_search_dir
2024/10/27 03:07 android13-5.10-lts e5e5644ea27f 65e8686b .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro #1] [mounted in repro #2] ci2-android-5-10 KASAN: use-after-free Read in ext4_search_dir
2024/10/18 12:48 android13-5.10-lts e5e5644ea27f 666f77ed .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-android-5-10 KASAN: use-after-free Read in ext4_search_dir
2024/10/18 12:06 android13-5.10-lts e5e5644ea27f 666f77ed .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-android-5-10 KASAN: use-after-free Read in ext4_search_dir
2024/10/18 11:44 android13-5.10-lts e5e5644ea27f 666f77ed .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-android-5-10 KASAN: use-after-free Read in ext4_search_dir
2024/10/05 18:58 android13-5.10-lts e5e5644ea27f d7906eff .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-android-5-10 KASAN: use-after-free Read in ext4_search_dir
2024/10/05 18:12 android13-5.10-lts e5e5644ea27f d7906eff .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-android-5-10 KASAN: use-after-free Read in ext4_search_dir
2024/07/25 06:41 android13-5.10-lts fd58936f3c1f d1a1b0ca .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro #1] [mounted in repro #2] ci2-android-5-10 KASAN: use-after-free Read in ext4_search_dir
2024/04/15 07:06 android13-5.10-lts 4e1bc8d8e8ae c8349e48 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-android-5-10 KASAN: use-after-free Read in ext4_search_dir
2024/10/05 18:34 android13-5.10-lts e5e5644ea27f d7906eff .config console log report syz / log [disk image] [vmlinux] [kernel image] [mounted in repro #1] [mounted in repro #2] ci2-android-5-10 KASAN: slab-out-of-bounds Read in ext4_search_dir
2024/11/15 14:25 android13-5.10-lts 6a01908517df f6ede3a3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: use-after-free Read in ext4_search_dir
2024/11/01 06:55 android13-5.10-lts e5e5644ea27f 96eb609f .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: use-after-free Read in ext4_search_dir
2024/10/30 20:11 android13-5.10-lts e5e5644ea27f fb888278 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: use-after-free Read in ext4_search_dir
2024/10/08 00:14 android13-5.10-lts e5e5644ea27f d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: use-after-free Read in ext4_search_dir
2024/09/10 21:33 android13-5.10-lts 1c5354a314ea 86aa7bd7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: use-after-free Read in ext4_search_dir
2024/09/02 00:25 android13-5.10-lts 1c5354a314ea 1eda0d14 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: use-after-free Read in ext4_search_dir
2024/07/25 06:11 android13-5.10-lts fd58936f3c1f d1a1b0ca .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: use-after-free Read in ext4_search_dir
* Struck through repros no longer work on HEAD.