bisecting fixing commit since 1752938529c614a8ed4432ecce6ebc95d3b87207 building syzkaller on 0fa352f2d664766b3115daecc56ab8608986864b testing commit 1752938529c614a8ed4432ecce6ebc95d3b87207 with gcc (GCC) 8.4.1 20210217 kernel signature: b74be7f384059e159c8d3674db1b2ddb5dcb9b353bd7e4f128dacd0149b7be92 all runs: crashed: KASAN: slab-out-of-bounds Read in squashfs_get_id testing current HEAD 29c52025152bab4c557d8174da58f1a4c8e70438 testing commit 29c52025152bab4c557d8174da58f1a4c8e70438 with gcc (GCC) 8.4.1 20210217 kernel signature: e498b054bf688caeb39c9bd52a5943acfecd7222ba7dca75939ad06e0c1fe381 all runs: crashed: KASAN: slab-out-of-bounds Read in squashfs_get_id revisions tested: 2, total time: 21m44.853015253s (build: 14m8.923198504s, test: 6m42.472579085s) the crash still happens on HEAD commit msg: Linux 4.14.221 crash: KASAN: slab-out-of-bounds Read in squashfs_get_id IPv6: ADDRCONF(NETDEV_UP): vlan1: link is not ready IPv6: ADDRCONF(NETDEV_UP): veth1_vlan: link is not ready IPv6: ADDRCONF(NETDEV_UP): veth0_virt_wifi: link is not ready IPv6: ADDRCONF(NETDEV_CHANGE): batadv_slave_1: link becomes ready ================================================================== BUG: KASAN: slab-out-of-bounds in squashfs_get_id+0x1af/0x1f0 fs/squashfs/id.c:51 IPv6: ADDRCONF(NETDEV_CHANGE): veth1_to_batadv: link becomes ready Read of size 8 at addr ffff8880a2711f18 by task syz-executor.0/9634 CPU: 0 PID: 9634 Comm: syz-executor.0 Not tainted 4.14.221-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/0x1e7 lib/dump_stack.c:58 print_address_description.cold.6+0x9/0x1ca mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report mm/kasan/report.c:409 [inline] kasan_report.cold.7+0x11a/0x2d3 mm/kasan/report.c:393 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:430 squashfs_get_id+0x1af/0x1f0 fs/squashfs/id.c:51 IPv6: ADDRCONF(NETDEV_CHANGE): veth1_vlan: link becomes ready squashfs_new_inode fs/squashfs/inode.c:68 [inline] squashfs_read_inode+0x223/0x1cd0 fs/squashfs/inode.c:133 IPv6: ADDRCONF(NETDEV_CHANGE): veth0_vlan: link becomes ready squashfs_fill_super+0x135d/0x1a20 fs/squashfs/super.c:318 mount_bdev+0x26f/0x330 fs/super.c:1134 squashfs_mount+0x10/0x20 fs/squashfs/super.c:404 mount_fs+0x7f/0x270 fs/super.c:1237 IPv6: ADDRCONF(NETDEV_UP): veth1_vlan: link is not ready 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 device veth0_vlan entered promiscuous mode 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 RIP: 0033:0x46708a RSP: 002b:00007f49ced37fa8 EFLAGS: 00000246 device veth1_vlan entered promiscuous mode ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 0000000020000200 RCX: 000000000046708a RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007f49ced38000 RBP: 00007f49ced38040 R08: 00007f49ced38040 R09: 0000000020000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000020000000 R13: 0000000020000100 R14: 00007f49ced38000 R15: 0000000020010300 IPv6: ADDRCONF(NETDEV_UP): veth0_macvtap: link is not ready Allocated by task 9634: 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 IPv6: ADDRCONF(NETDEV_UP): veth1_macvtap: link is not ready kmalloc include/linux/slab.h:493 [inline] squashfs_read_table+0x36/0x170 fs/squashfs/cache.c:426 squashfs_read_id_index_table+0x67/0xd0 fs/squashfs/id.c:90 squashfs_fill_super+0xb23/0x1a20 fs/squashfs/super.c:246 mount_bdev+0x26f/0x330 fs/super.c:1134 device veth0_macvtap entered promiscuous mode squashfs_mount+0x10/0x20 fs/squashfs/super.c:404 mount_fs+0x7f/0x270 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 IPv6: ADDRCONF(NETDEV_UP): macvtap0: link is not ready 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 6124: 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 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 device veth1_macvtap entered promiscuous mode 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 ffff8880a2711f00 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 24 bytes inside of 32-byte region [ffff8880a2711f00, ffff8880a2711f20) The buggy address belongs to the page: page:ffffea000289c440 count:1 mapcount:0 mapping:ffff8880a2711000 index:0xffff8880a2711fc1 flags: 0xfff00000000100(slab) IPv6: ADDRCONF(NETDEV_UP): macsec0: link is not ready raw: 00fff00000000100 ffff8880a2711000 ffff8880a2711fc1 000000010000003f raw: ffffea000285ba60 ffffea000280e1e0 ffff88813fe641c0 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a2711e00: 00 00 06 fc fc fc fc fc 05 fc fc fc fc fc fc fc IPv6: ADDRCONF(NETDEV_UP): veth0_to_batadv: link is not ready ffff8880a2711e80: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc >ffff8880a2711f00: 00 fc fc fc fc fc fc fc 00 04 fc fc fc fc fc fc ^ ffff8880a2711f80: 00 05 fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880a2712000: 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc ================================================================== IPv6: ADDRCONF(NETDEV_UP): veth1_to_batadv: link is not ready