bisecting fixing commit since 27ce4f2a6817e38ca74c643d47a96359f6cc0c1c building syzkaller on cca8798699baeeccbf80af23d234ac19a5d667aa testing commit 27ce4f2a6817e38ca74c643d47a96359f6cc0c1c with gcc (GCC) 8.1.0 kernel signature: 57b6bf77f797e75f28905c0db403e5c86df67fe20238a0d9ba258a5228eb29b3 all runs: crashed: KASAN: slab-out-of-bounds Read in squashfs_export_iget testing current HEAD 3f2ecb86cb909da0b9157fd2952ad79924cbe5ae testing commit 3f2ecb86cb909da0b9157fd2952ad79924cbe5ae with gcc (GCC) 8.1.0 kernel signature: a7ea048396ae07fb9e8fae3d4aa5efc139cbfc3c63afbefa0b02cc38cc570f89 all runs: crashed: KASAN: slab-out-of-bounds Read in squashfs_export_iget revisions tested: 2, total time: 25m13.8492316s (build: 18m35.876789548s, test: 5m52.660923636s) the crash still happens on HEAD commit msg: Linux 4.14.212 crash: KASAN: slab-out-of-bounds Read in squashfs_export_iget IPv6: ADDRCONF(NETDEV_CHANGE): batadv_slave_0: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): veth0_to_batadv: link becomes ready device veth0_macvtap entered promiscuous mode IPv6: ADDRCONF(NETDEV_UP): macvtap0: link is not ready ================================================================== BUG: KASAN: slab-out-of-bounds in squashfs_inode_lookup fs/squashfs/export.c:57 [inline] BUG: KASAN: slab-out-of-bounds in squashfs_export_iget+0x220/0x240 fs/squashfs/export.c:82 Read of size 8 at addr ffff8881f3cf0438 by task syz-executor.1/9108 CPU: 0 PID: 9108 Comm: syz-executor.1 Not tainted 4.14.212-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x14b/0x1f1 lib/dump_stack.c:58 batman_adv: The newly added mac address (aa:aa:aa:aa:aa:3e) already exists on: batadv_slave_1 print_address_description.cold.6+0x9/0x1ca mm/kasan/report.c:252 batman_adv: It is strongly recommended to keep mac addresses unique to avoid problems! kasan_report_error mm/kasan/report.c:351 [inline] kasan_report.cold.7+0x11a/0x2d4 mm/kasan/report.c:409 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:430 batman_adv: The newly added mac address (aa:aa:aa:aa:aa:3e) already exists on: batadv_slave_1 squashfs_inode_lookup fs/squashfs/export.c:57 [inline] squashfs_export_iget+0x220/0x240 fs/squashfs/export.c:82 batman_adv: It is strongly recommended to keep mac addresses unique to avoid problems! batman_adv: The newly added mac address (aa:aa:aa:aa:aa:3e) already exists on: batadv_slave_1 squashfs_fh_to_dentry+0x49/0x70 fs/squashfs/export.c:97 batman_adv: It is strongly recommended to keep mac addresses unique to avoid problems! exportfs_decode_fh+0x10a/0x6df fs/exportfs/expfs.c:433 batman_adv: The newly added mac address (aa:aa:aa:aa:aa:3e) already exists on: batadv_slave_1 batman_adv: It is strongly recommended to keep mac addresses unique to avoid problems! do_handle_to_path fs/fhandle.c:153 [inline] handle_to_path fs/fhandle.c:208 [inline] do_handle_open+0x25e/0x5c0 fs/fhandle.c:224 SYSC_open_by_handle_at fs/fhandle.c:266 [inline] SyS_open_by_handle_at+0xc/0x10 fs/fhandle.c:257 do_syscall_64+0x1c7/0x5b0 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb RIP: 0033:0x45deb9 RSP: 002b:00007fe661aedc78 EFLAGS: 00000246 ORIG_RAX: 0000000000000130 RAX: ffffffffffffffda RBX: 0000000000022240 RCX: 000000000045deb9 RDX: 0000000000490400 RSI: 0000000020000100 RDI: 0000000000000005 RBP: 000000000118bf60 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000118bf2c R13: 00007ffce0f01edf R14: 00007fe661aee9c0 R15: 000000000118bf2c Allocated by task 9108: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc.part.1+0x62/0xf0 mm/kasan/kasan.c:551 kasan_kmalloc+0xaf/0xc0 mm/kasan/kasan.c:536 __do_kmalloc mm/slab.c:3720 [inline] __kmalloc+0x15d/0x410 mm/slab.c:3729 kmalloc include/linux/slab.h:493 [inline] squashfs_read_table+0x36/0x164 fs/squashfs/cache.c:426 squashfs_read_fragment_index_table+0x3f/0x90 fs/squashfs/fragment.c:90 IPv6: ADDRCONF(NETDEV_UP): batadv_slave_1: link is not ready squashfs_fill_super+0xd2e/0x1a20 fs/squashfs/super.c:288 mount_bdev+0x26f/0x330 fs/super.c:1134 squashfs_mount+0x10/0x20 fs/squashfs/super.c:404 mount_fs+0x7f/0x269 fs/super.c:1237 vfs_kern_mount.part.9+0x58/0x3c0 fs/namespace.c:1046 vfs_kern_mount fs/namespace.c:1036 [inline] do_new_mount fs/namespace.c:2549 [inline] do_mount+0x352/0x2af0 fs/namespace.c:2879 SYSC_mount fs/namespace.c:3095 [inline] SyS_mount+0xb1/0xd0 fs/namespace.c:3072 do_syscall_64+0x1c7/0x5b0 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb Freed by task 5835: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0xab/0x190 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3496 [inline] kfree+0xcc/0x270 mm/slab.c:3815 batman_adv: batadv0: Interface activated: batadv_slave_1 kzfree+0x26/0x30 mm/slab_common.c:1453 aa_free_task_context+0xa5/0xe0 security/apparmor/context.c:54 apparmor_cred_free+0x34/0x70 security/apparmor/lsm.c:58 security_cred_free+0x66/0xa0 security/security.c:1003 put_cred_rcu+0xd0/0x2d0 kernel/cred.c:117 __put_cred+0x184/0x1e0 kernel/cred.c:151 put_cred include/linux/cred.h:271 [inline] SYSC_faccessat fs/open.c:444 [inline] SyS_faccessat+0x40f/0x630 fs/open.c:353 SYSC_access fs/open.c:450 [inline] SyS_access+0x13/0x20 fs/open.c:448 do_syscall_64+0x1c7/0x5b0 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb The buggy address belongs to the object at ffff8881f3cf0400 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 24 bytes to the right of 32-byte region [ffff8881f3cf0400, ffff8881f3cf0420) The buggy address belongs to the page: page:ffffea0007cf3c00 count:1 mapcount:0 mapping:ffff8881f3cf0000 index:0xffff8881f3cf0fc1 flags: 0x17ff00000000100(slab) raw: 017ff00000000100 ffff8881f3cf0000 ffff8881f3cf0fc1 000000010000003f raw: ffffea0007cf3860 ffffea00075ed9a0 ffff8881f60001c0 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8881f3cf0300: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ffff8881f3cf0380: fb fb fb fb fc fc fc fc 00 00 fc fc fc fc fc fc >ffff8881f3cf0400: 00 fc fc fc fc fc fc fc 00 fc fc fc fc fc fc fc ^ ffff8881f3cf0480: 00 fc fc fc fc fc fc fc fb fb fb fb fc fc fc fc ffff8881f3cf0500: 00 00 fc fc fc fc fc fc fb fb fb fb fc fc fc fc ==================================================================