syzbot


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

Status: upstream: reported C repro on 2020/09/20 22:54
Subsystems: bfs
[Documentation on labels]
Reported-by: syzbot+f9c5c220be1661763989@syzkaller.appspotmail.com
First crash: 1370d, last: 473d
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.19 KASAN: slab-out-of-bounds Read in find_first_zero_bit bfs C 1755 474d 1370d 0/1 upstream: reported C repro on 2020/09/20 23:06
upstream KASAN: slab-out-of-bounds Read in find_first_zero_bit bfs C done 1 2274d 2274d 13/27 fixed on 2019/11/08 08:43
Fix bisection attempts (4)
Created Duration User Patch Repo Result
2022/01/06 14:17 30m bisect fix linux-4.14.y job log (0) log
2021/08/20 03:20 31m bisect fix linux-4.14.y job log (0) log
2021/07/21 02:53 27m bisect fix linux-4.14.y job log (0) log
2020/12/23 10:13 23m bisect fix linux-4.14.y job log (0) log

Sample crash report:
BFS-fs: bfs_fill_super(): loop0 is unclean, continuing
==================================================================
BUG: KASAN: slab-out-of-bounds in find_first_zero_bit+0x84/0x90 lib/find_bit.c:105
Read of size 8 at addr ffff8880b07797c0 by task syz-executor795/7971

CPU: 1 PID: 7971 Comm: syz-executor795 Not tainted 4.14.296-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/11/2022
Call Trace:
 __dump_stack lib/dump_stack.c:17 [inline]
 dump_stack+0x1b2/0x281 lib/dump_stack.c:58
 print_address_description.cold+0x54/0x1d3 mm/kasan/report.c:252
 kasan_report_error.cold+0x8a/0x191 mm/kasan/report.c:351
 kasan_report mm/kasan/report.c:409 [inline]
 __asan_report_load8_noabort+0x68/0x70 mm/kasan/report.c:430
 find_first_zero_bit+0x84/0x90 lib/find_bit.c:105
 bfs_create+0xfb/0x620 fs/bfs/dir.c:92
 vfs_create+0x3e3/0x620 fs/namei.c:2935
 SYSC_mknodat fs/namei.c:3806 [inline]
 SyS_mknodat+0x2f4/0x470 fs/namei.c:3783
 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x46/0xbb
RIP: 0033:0x7fab5e059d79
RSP: 002b:00007ffd73ab32e8 EFLAGS: 00000246 ORIG_RAX: 0000000000000085
RAX: ffffffffffffffda RBX: 0030656c69662f2e RCX: 00007fab5e059d79
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000020000040
RBP: 00007fab5e0195e0 R08: 00005555570062c0 R09: 0000000000000000
R10: 00007ffd73ab31b0 R11: 0000000000000246 R12: 00007fab5e019670
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000

Allocated by task 7971:
 save_stack mm/kasan/kasan.c:447 [inline]
 set_track mm/kasan/kasan.c:459 [inline]
 kasan_kmalloc+0xeb/0x160 mm/kasan/kasan.c:551
 __do_kmalloc mm/slab.c:3720 [inline]
 __kmalloc+0x15a/0x400 mm/slab.c:3729
 kmalloc include/linux/slab.h:493 [inline]
 kzalloc include/linux/slab.h:661 [inline]
 bfs_fill_super+0x3d5/0xd80 fs/bfs/inode.c:363
 mount_bdev+0x2b3/0x360 fs/super.c:1134
 mount_fs+0x92/0x2a0 fs/super.c:1237
 vfs_kern_mount.part.0+0x5b/0x470 fs/namespace.c:1046
 vfs_kern_mount fs/namespace.c:1036 [inline]
 do_new_mount fs/namespace.c:2572 [inline]
 do_mount+0xe65/0x2a30 fs/namespace.c:2905
 SYSC_mount fs/namespace.c:3121 [inline]
 SyS_mount+0xa8/0x120 fs/namespace.c:3098
 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x46/0xbb

Freed by task 1:
 save_stack mm/kasan/kasan.c:447 [inline]
 set_track mm/kasan/kasan.c:459 [inline]
 kasan_slab_free+0xc3/0x1a0 mm/kasan/kasan.c:524
 __cache_free mm/slab.c:3496 [inline]
 kfree+0xc9/0x250 mm/slab.c:3815
 kfree_const+0x33/0x40 mm/util.c:39
 kernfs_put.part.0+0x131/0x490 fs/kernfs/dir.c:540
 kernfs_put fs/kernfs/dir.c:523 [inline]
 __kernfs_remove+0x417/0x920 fs/kernfs/dir.c:1322
 kernfs_remove_by_name_ns+0x55/0x90 fs/kernfs/dir.c:1494
 kernfs_remove_by_name include/linux/kernfs.h:529 [inline]
 cgroup_rm_file kernel/cgroup/cgroup.c:1534 [inline]
 cgroup_addrm_files+0x548/0x840 kernel/cgroup/cgroup.c:3600
 css_clear_dir+0xf8/0x190 kernel/cgroup/cgroup.c:1552
 kill_css+0xa3/0x2d0 kernel/cgroup/cgroup.c:5063
 cgroup_destroy_locked+0x271/0x5b0 kernel/cgroup/cgroup.c:5148
 cgroup_rmdir+0x34/0x280 kernel/cgroup/cgroup.c:5183
 kernfs_iop_rmdir+0x14e/0x1d0 fs/kernfs/dir.c:1122
 vfs_rmdir.part.0+0x144/0x390 fs/namei.c:3910
 vfs_rmdir fs/namei.c:3895 [inline]
 do_rmdir+0x334/0x3c0 fs/namei.c:3970
 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x46/0xbb

The buggy address belongs to the object at ffff8880b07797c0
 which belongs to the cache kmalloc-32 of size 32
The buggy address is located 0 bytes inside of
 32-byte region [ffff8880b07797c0, ffff8880b07797e0)
The buggy address belongs to the page:
page:ffffea0002c1de40 count:1 mapcount:0 mapping:ffff8880b0779000 index:0xffff8880b0779fc1
flags: 0xfff00000000100(slab)
raw: 00fff00000000100 ffff8880b0779000 ffff8880b0779fc1 000000010000003f
raw: ffffea0002c28760 ffffea0002c1aca0 ffff88813fe741c0 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff8880b0779680: fb fb fb fb fc fc fc fc 00 00 00 00 fc fc fc fc
 ffff8880b0779700: fb fb fb fb fc fc fc fc 00 00 fc fc fc fc fc fc
>ffff8880b0779780: fb fb fb fb fc fc fc fc 07 fc fc fc fc fc fc fc
                                           ^
 ffff8880b0779800: 00 03 fc fc fc fc fc fc fb fb fb fb fc fc fc fc
 ffff8880b0779880: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc
==================================================================

Crashes (1400):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/10/31 16:33 linux-4.14.y 41f36d7859a7 2a71366b .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-4-14 KASAN: slab-out-of-bounds Read in find_first_zero_bit
2022/10/22 01:31 linux-4.14.y 9d5c0b3a8e1a 63e790dd .config console log report syz C [disk image] [vmlinux] [mounted in repro] ci2-linux-4-14 KASAN: slab-out-of-bounds Read in find_first_zero_bit
2022/08/21 19:47 linux-4.14.y b641242202ed 26a13b38 .config console log report syz C ci2-linux-4-14 KASAN: slab-out-of-bounds Read in find_first_zero_bit
2022/05/13 02:07 linux-4.14.y 569d1abf9402 9ad6612a .config console log report syz C ci2-linux-4-14 KASAN: slab-out-of-bounds Read in find_first_zero_bit
2020/09/24 00:02 linux-4.14.y cbfa1702aaf6 54289b08 .config console log report syz C ci2-linux-4-14
2020/09/20 23:08 linux-4.14.y cbfa1702aaf6 9564d2e9 .config console log report syz C ci2-linux-4-14
2023/03/06 17:31 linux-4.14.y 7878a41b6cc1 f8902b57 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: slab-out-of-bounds Read in find_first_zero_bit
2023/03/06 02:21 linux-4.14.y 7878a41b6cc1 f8902b57 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: slab-out-of-bounds Read in find_first_zero_bit
2023/03/05 18:59 linux-4.14.y 7878a41b6cc1 f8902b57 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: slab-out-of-bounds Read in find_first_zero_bit
2023/03/05 13:04 linux-4.14.y 7878a41b6cc1 f8902b57 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: slab-out-of-bounds Read in find_first_zero_bit
2023/03/05 11:37 linux-4.14.y 7878a41b6cc1 f8902b57 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: slab-out-of-bounds Read in find_first_zero_bit
2023/03/04 13:35 linux-4.14.y 7878a41b6cc1 f8902b57 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: slab-out-of-bounds Read in find_first_zero_bit
2023/03/04 07:11 linux-4.14.y 7878a41b6cc1 f8902b57 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: slab-out-of-bounds Read in find_first_zero_bit
2023/03/04 05:07 linux-4.14.y 7878a41b6cc1 f8902b57 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: slab-out-of-bounds Read in find_first_zero_bit
2023/03/04 03:48 linux-4.14.y 7878a41b6cc1 f8902b57 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: slab-out-of-bounds Read in find_first_zero_bit
2023/03/04 02:47 linux-4.14.y 7878a41b6cc1 f8902b57 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: slab-out-of-bounds Read in find_first_zero_bit
2023/03/04 01:47 linux-4.14.y 7878a41b6cc1 f8902b57 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: slab-out-of-bounds Read in find_first_zero_bit
2023/03/03 18:12 linux-4.14.y 7878a41b6cc1 f8902b57 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: slab-out-of-bounds Read in find_first_zero_bit
2023/03/03 15:35 linux-4.14.y 7878a41b6cc1 f8902b57 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: slab-out-of-bounds Read in find_first_zero_bit
2023/03/03 13:22 linux-4.14.y 7878a41b6cc1 f8902b57 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: slab-out-of-bounds Read in find_first_zero_bit
2023/03/03 05:57 linux-4.14.y 7878a41b6cc1 f8902b57 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: slab-out-of-bounds Read in find_first_zero_bit
2023/03/03 04:49 linux-4.14.y 7878a41b6cc1 f8902b57 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: slab-out-of-bounds Read in find_first_zero_bit
2023/03/02 16:40 linux-4.14.y 7878a41b6cc1 f8902b57 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: slab-out-of-bounds Read in find_first_zero_bit
2023/03/02 07:27 linux-4.14.y 7878a41b6cc1 f8902b57 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: slab-out-of-bounds Read in find_first_zero_bit
2023/03/02 04:15 linux-4.14.y 7878a41b6cc1 f8902b57 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: slab-out-of-bounds Read in find_first_zero_bit
2023/03/01 17:19 linux-4.14.y 7878a41b6cc1 ef65e6cb .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: slab-out-of-bounds Read in find_first_zero_bit
2023/03/01 00:23 linux-4.14.y 7878a41b6cc1 95aee97a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: slab-out-of-bounds Read in find_first_zero_bit
2023/02/28 20:14 linux-4.14.y 7878a41b6cc1 95aee97a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: slab-out-of-bounds Read in find_first_zero_bit
2023/02/28 14:57 linux-4.14.y 7878a41b6cc1 95aee97a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: slab-out-of-bounds Read in find_first_zero_bit
2023/02/28 06:46 linux-4.14.y 7878a41b6cc1 95aee97a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: slab-out-of-bounds Read in find_first_zero_bit
2023/02/28 05:46 linux-4.14.y 7878a41b6cc1 95aee97a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: slab-out-of-bounds Read in find_first_zero_bit
2023/02/27 20:12 linux-4.14.y 7878a41b6cc1 9189cb53 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: slab-out-of-bounds Read in find_first_zero_bit
2023/02/27 18:50 linux-4.14.y 7878a41b6cc1 9189cb53 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: slab-out-of-bounds Read in find_first_zero_bit
2023/02/27 17:00 linux-4.14.y 7878a41b6cc1 9189cb53 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: slab-out-of-bounds Read in find_first_zero_bit
2023/02/27 07:24 linux-4.14.y 7878a41b6cc1 ee50e71c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: slab-out-of-bounds Read in find_first_zero_bit
2023/02/26 08:17 linux-4.14.y 7878a41b6cc1 ee50e71c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: slab-out-of-bounds Read in find_first_zero_bit
2023/02/26 06:04 linux-4.14.y 7878a41b6cc1 ee50e71c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: slab-out-of-bounds Read in find_first_zero_bit
2023/02/26 04:19 linux-4.14.y 7878a41b6cc1 ee50e71c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: slab-out-of-bounds Read in find_first_zero_bit
2023/02/25 10:54 linux-4.14.y 1e61bd26fa2c ee50e71c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: slab-out-of-bounds Read in find_first_zero_bit
2023/02/25 07:30 linux-4.14.y 1e61bd26fa2c ee50e71c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: slab-out-of-bounds Read in find_first_zero_bit
2023/02/24 21:56 linux-4.14.y 1e61bd26fa2c ee50e71c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: slab-out-of-bounds Read in find_first_zero_bit
2023/02/24 19:43 linux-4.14.y 1e61bd26fa2c ee50e71c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: slab-out-of-bounds Read in find_first_zero_bit
2023/02/23 02:16 linux-4.14.y 1e61bd26fa2c 9f1e2cb3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: slab-out-of-bounds Read in find_first_zero_bit
2023/02/23 02:04 linux-4.14.y 1e61bd26fa2c 9f1e2cb3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: slab-out-of-bounds Read in find_first_zero_bit
2023/02/23 00:45 linux-4.14.y 1e61bd26fa2c 9f1e2cb3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: slab-out-of-bounds Read in find_first_zero_bit
2023/02/22 22:29 linux-4.14.y 1e61bd26fa2c 9f1e2cb3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: slab-out-of-bounds Read in find_first_zero_bit
2023/02/22 03:45 linux-4.14.y a8ad60f2af58 42a4d508 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: slab-out-of-bounds Read in find_first_zero_bit
2023/02/20 10:36 linux-4.14.y a8ad60f2af58 bcdf85f8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: slab-out-of-bounds Read in find_first_zero_bit
2023/02/20 09:34 linux-4.14.y a8ad60f2af58 bcdf85f8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: slab-out-of-bounds Read in find_first_zero_bit
2023/02/20 09:29 linux-4.14.y a8ad60f2af58 bcdf85f8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: slab-out-of-bounds Read in find_first_zero_bit
2023/02/19 11:44 linux-4.14.y a8ad60f2af58 bcdf85f8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: slab-out-of-bounds Read in find_first_zero_bit
2023/02/18 12:04 linux-4.14.y a8ad60f2af58 d02e9a70 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: slab-out-of-bounds Read in find_first_zero_bit
2023/02/18 03:08 linux-4.14.y a8ad60f2af58 cf8c2d39 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: slab-out-of-bounds Read in find_first_zero_bit
2023/02/17 23:54 linux-4.14.y a8ad60f2af58 cf8c2d39 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: slab-out-of-bounds Read in find_first_zero_bit
2021/01/12 23:36 linux-4.14.y f79dc86058bc 0cdd6185 .config console log report info ci2-linux-4-14
2020/09/20 22:53 linux-4.14.y cbfa1702aaf6 9564d2e9 .config console log report info ci2-linux-4-14
* Struck through repros no longer work on HEAD.