bisecting cause commit starting from 6f2f486d57c4d562cdf4932320b66fbb878ab1c4 building syzkaller on 93817d892548db363431ebb7f31518df0d8582ec testing commit 6f2f486d57c4d562cdf4932320b66fbb878ab1c4 with gcc (GCC) 8.1.0 kernel signature: 0550101130c0b286999768390158b3a978149f9126fb08f0fcfe52dce244aac1 all runs: crashed: UBSAN: array-index-out-of-bounds in init_sb testing release v5.8 testing commit bcf876870b95592b52519ed4aafcf9d95999bc9c with gcc (GCC) 8.1.0 kernel signature: c8e76bd576d17a3da7d4c04675d695d50c50a29d2841a6f17b484f81b639c306 run #0: crashed: UBSAN: array-index-out-of-bounds in init_sb run #1: crashed: UBSAN: array-index-out-of-bounds in init_sb run #2: crashed: UBSAN: array-index-out-of-bounds in init_sb run #3: crashed: UBSAN: array-index-out-of-bounds in corrupted run #4: crashed: UBSAN: array-index-out-of-bounds in init_sb run #5: crashed: UBSAN: array-index-out-of-bounds in init_sb run #6: crashed: UBSAN: array-index-out-of-bounds in init_sb run #7: crashed: UBSAN: array-index-out-of-bounds in init_sb run #8: crashed: UBSAN: array-index-out-of-bounds in init_sb run #9: crashed: UBSAN: array-index-out-of-bounds in init_sb testing release v5.7 testing commit 3d77e6a8804abcc0504c904bd6e5cdf3a5cf8162 with gcc (GCC) 8.1.0 kernel signature: 6c79a1274846e1dd35e051f11e5da60649d2f713717c461e4116c55f65b7924c all runs: crashed: UBSAN: array-index-out-of-bounds in init_sb testing release v5.6 testing commit 7111951b8d4973bda27ff663f2cf18b663d15b48 with gcc (GCC) 8.1.0 kernel signature: 31cb6ec86e01e8d2d4c6c243fb9d4b5e3a51b51fb0a78db6365b00d2381e9dc2 all runs: crashed: UBSAN: undefined-behaviour in init_sb testing release v5.5 testing commit d5226fa6dbae0569ee43ecfc08bdcd6770fc4755 with gcc (GCC) 8.1.0 kernel signature: ee6d31c410c6a9c95c364337774192866a3f8e6eb95d2e0a8e905e81ddddb9a3 all runs: crashed: UBSAN: undefined-behaviour in init_sb testing release v5.4 testing commit 219d54332a09e8d8741c1e1982f5eae56099de85 with gcc (GCC) 8.1.0 kernel signature: c884ac6ac81875c7ea10781f22397d722e91708db5eed37129946e0cfe28bc72 all runs: crashed: UBSAN: undefined-behaviour in init_sb testing release v5.3 testing commit 4d856f72c10ecb060868ed10ff1b1453943fc6c8 with gcc (GCC) 8.1.0 kernel signature: 65d2cbf91e25155d7a7b2b15f0c9e9a7fd39b232e78d8edb58ea3e8cc3e3d4c3 all runs: crashed: UBSAN: undefined-behaviour in init_sb testing release v5.2 testing commit 0ecfebd2b52404ae0c54a878c872bb93363ada36 with gcc (GCC) 8.1.0 kernel signature: acfbe3f2a17e328a185a3e5d3df112e857a8808e3bd5bf95db1a2be729f32f18 all runs: crashed: KASAN: slab-out-of-bounds Write in init_sb testing release v5.1 testing commit e93c9c99a629c61837d5a7fc2120cd2b6c70dbdd with gcc (GCC) 8.1.0 kernel signature: 59332160b7da194918fe53ffdc2361c99cf48832e7ac230e54d6370c11f4172d all runs: crashed: KASAN: slab-out-of-bounds Write in init_sb testing release v5.0 testing commit 1c163f4c7b3f621efff9b28a47abb36f7378d783 with gcc (GCC) 8.1.0 kernel signature: 4fc42aede2b52d2b5b0f69fbcc1068668bf2ad0a0a4f8856982df3c479026d9d run #0: crashed: KASAN: slab-out-of-bounds Write in init_sb run #1: crashed: KASAN: slab-out-of-bounds Write in init_sb run #2: crashed: KASAN: slab-out-of-bounds Write in init_sb run #3: crashed: KASAN: slab-out-of-b[ 46.ADDR] BUG: unable to handle kernel NULL pointer dereference at ADDR run #4: crashed: KASAN: slab-out-of-bounds Write in init_sb run #5: crashed: KASAN: slab-out-of-bounds Write in init_sb run #6: crashed: KASAN: slab-out-of-bounds Write in init_sb run #7: crashed: KASAN: slab-out-of-bounds Write in init_sb run #8: crashed: KASAN: slab-out-of-bounds Write in init_sb run #9: crashed: KASAN: slab-out-of-bounds Write in init_sb testing release v4.20 testing commit 8fe28cb58bcb235034b64cbbb7550a8a43fd88be with gcc (GCC) 8.1.0 certs/signing_key.pem: Permission denied testing release v4.19 testing commit 84df9525b0c27f3ebc2ebb1864fa62a97fdedb7d with gcc (GCC) 8.1.0 certs/signing_key.pem: Permission denied testing release v4.18 testing commit 94710cac0ef4ee177a63b5227664b38c95bbf703 with gcc (GCC) 8.1.0 certs/signing_key.pem: Permission denied testing release v4.17 testing commit 29dcea88779c856c7dc92040a0c01233263101d4 with gcc (GCC) 8.1.0 certs/signing_key.pem: Permission denied testing release v4.16 testing commit 0adb32858b0bddf4ada5f364a84ed60b196dbcda with gcc (GCC) 8.1.0 certs/signing_key.pem: Permission denied testing release v4.15 testing commit d8a5b80568a9cb66810e75b182018e9edb68e8ff with gcc (GCC) 8.1.0 certs/signing_key.pem: Permission denied testing release v4.14 testing commit bebc6082da0a9f5d47a1ea2edc099bf671058bd4 with gcc (GCC) 8.1.0 certs/signing_key.pem: Permission denied testing release v4.13 testing commit 569dbb88e80deb68974ef6fdd6a13edb9d686261 with gcc (GCC) 8.1.0 certs/signing_key.pem: Permission denied testing release v4.12 testing commit 6f7da290413ba713f0cdd9ff1a2a9bb129ef4f6c with gcc (GCC) 8.1.0 certs/signing_key.pem: Permission denied testing release v4.11 testing commit a351e9b9fc24e982ec2f0e76379a49826036da12 with gcc (GCC) 7.3.0 certs/signing_key.pem: Permission denied testing release v4.10 testing commit c470abd4fde40ea6a0846a2beab642a578c0b8cd with gcc (GCC) 5.5.0 certs/signing_key.pem: Permission denied testing release v4.9 testing commit 69973b830859bc6529a7a0468ba0d80ee5117826 with gcc (GCC) 5.5.0 certs/signing_key.pem: Permission denied testing release v4.8 testing commit c8d2bc9bc39ebea8437fd974fdbc21847bb897a3 with gcc (GCC) 5.5.0 certs/signing_key.pem: Permission denied testing release v4.7 testing commit 523d939ef98fd712632d93a5a2b588e477a7565e with gcc (GCC) 5.5.0 certs/signing_key.pem: Permission denied testing release v4.6 testing commit 2dcd0af568b0cf583645c8a317dd12e344b1c72a with gcc (GCC) 5.5.0 certs/signing_key.pem: Permission denied revisions tested: 25, total time: 2h0m20.420166844s (build: 1h25m10.772220293s, test: 31m33.39202507s) the crash already happened on the oldest tested release commit msg: Linux 5.0 crash: KASAN: slab-out-of-bounds Write in init_sb gfs2: fsid=loop2: Trying to join cluster "lock_nolock", "loop2" gfs2: fsid=loop5: Now mounting FS... wlan1: Created IBSS using preconfigured BSSID 50:50:50:50:50:50 ================================================================== BUG: KASAN: slab-out-of-bounds in gfs2_read_sb fs/gfs2/ops_fstype.c:332 [inline] BUG: KASAN: slab-out-of-bounds in init_sb+0xbf2/0xd30 fs/gfs2/ops_fstype.c:469 wlan1: Creating new IBSS network, BSSID 50:50:50:50:50:50 Write of size 8 at addr ffff8880a9611720 by task syz-executor.5/8172 CPU: 0 PID: 8172 Comm: syz-executor.5 Not tainted 5.0.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x165/0x21a lib/dump_stack.c:113 print_address_description.cold.3+0x9/0x211 mm/kasan/report.c:187 gfs2: fsid=loop2: Now mounting FS... kasan_report.cold.4+0x1b/0x37 mm/kasan/report.c:317 IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready __asan_report_store8_noabort+0x17/0x20 mm/kasan/generic_report.c:140 gfs2_read_sb fs/gfs2/ops_fstype.c:332 [inline] init_sb+0xbf2/0xd30 fs/gfs2/ops_fstype.c:469 fill_super+0x1560/0x23d0 fs/gfs2/ops_fstype.c:1120 gfs2_mount+0x406/0x4d1 fs/gfs2/ops_fstype.c:1302 gfs2: fsid=loop4: Trying to join cluster "lock_nolock", "loop4" mount_fs+0xce/0x33c fs/super.c:1258 vfs_kern_mount.part.11+0x58/0x3d0 fs/namespace.c:959 vfs_kern_mount fs/namespace.c:949 [inline] do_new_mount fs/namespace.c:2513 [inline] do_mount+0x3ba/0x29e0 fs/namespace.c:2845 ksys_mount+0xba/0xe0 fs/namespace.c:3061 __do_sys_mount fs/namespace.c:3075 [inline] __se_sys_mount fs/namespace.c:3072 [inline] __x64_sys_mount+0xb9/0x150 fs/namespace.c:3072 do_syscall_64+0xd0/0x4d0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x4608aa Code: b8 a6 00 00 00 0f 05 48 3d 01 f0 ff ff 0f 83 ad 89 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 0f 83 8a 89 fb ff c3 66 0f 1f 84 00 00 00 00 00 RSP: 002b:00007f92a5668a88 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007f92a5668b20 RCX: 00000000004608aa RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007f92a5668ae0 RBP: 00007f92a5668ae0 R08: 00007f92a5668b20 R09: 0000000020000000 R10: 0000000002200000 R11: 0000000000000246 R12: 0000000020000000 R13: 0000000020000100 R14: 0000000020000200 R15: 0000000020000080 Allocated by task 8172: save_stack mm/kasan/common.c:73 [inline] set_track mm/kasan/common.c:85 [inline] __kasan_kmalloc.part.0+0x66/0x100 mm/kasan/common.c:495 __kasan_kmalloc.constprop.1+0xb5/0xc0 mm/kasan/common.c:476 kasan_kmalloc+0x9/0x10 mm/kasan/common.c:509 kmem_cache_alloc_trace+0x15b/0x3d0 mm/slab.c:3615 kmalloc include/linux/slab.h:545 [inline] kzalloc include/linux/slab.h:740 [inline] init_sbd fs/gfs2/ops_fstype.c:71 [inline] fill_super+0xc7/0x23d0 fs/gfs2/ops_fstype.c:1041 gfs2_mount+0x406/0x4d1 fs/gfs2/ops_fstype.c:1302 mount_fs+0xce/0x33c fs/super.c:1258 vfs_kern_mount.part.11+0x58/0x3d0 fs/namespace.c:959 vfs_kern_mount fs/namespace.c:949 [inline] do_new_mount fs/namespace.c:2513 [inline] do_mount+0x3ba/0x29e0 fs/namespace.c:2845 ksys_mount+0xba/0xe0 fs/namespace.c:3061 __do_sys_mount fs/namespace.c:3075 [inline] __se_sys_mount fs/namespace.c:3072 [inline] __x64_sys_mount+0xb9/0x150 fs/namespace.c:3072 do_syscall_64+0xd0/0x4d0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 0: (stack is not available) The buggy address belongs to the object at ffff8880a96103c0 which belongs to the cache kmalloc-8k of size 8192 The buggy address is located 4960 bytes inside of 8192-byte region [ffff8880a96103c0, ffff8880a96123c0) The buggy address belongs to the page: page:ffffea0002a58400 count:1 mapcount:0 mapping:ffff88812c3f5080 index:0x0 compound_mapcount: 0 flags: 0xfffe0000010200(slab|head) gfs2: fsid=loop4: Now mounting FS... raw: 00fffe0000010200 ffffea00022ee808 ffffea0002084308 ffff88812c3f5080 raw: 0000000000000000 ffff8880a96103c0 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a9611600: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880a9611680: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8880a9611700: 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8880a9611780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880a9611800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== ------------[ cut here ]------------ kernel BUG at arch/x86/mm/physaddr.c:27! invalid opcode: 0000 [#1] PREEMPT SMP KASAN CPU: 1 PID: 8198 Comm: syz-executor.4 Tainted: G B 5.0.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:__phys_addr+0x6b/0xc0 arch/x86/mm/physaddr.c:27 Code: b6 14 11 48 89 f9 83 e1 07 38 ca 7f 04 84 d2 75 1b 0f b6 0d 30 10 39 08 48 89 c2 48 d3 ea 48 85 d2 75 07 48 83 c4 08 5b 5d c3 <0f> 0b 48 89 45 f0 e8 3a ff 67 00 48 8b 45 f0 eb d6 48 c7 c7 10 90 RSP: 0018:ffff88809134f538 EFLAGS: 00010087 RAX: 0000778000000000 RBX: 0000000080000000 RCX: ffffed10152fa987 RDX: 1ffff1101159fa52 RSI: ffffffff87ab46a0 RDI: 0000000000000000 RBP: ffff88809134f548 R08: ffff8880ae92dad0 R09: ffffed1015d25bdf R10: ffffed1015d25bdf R11: ffff8880ae92defb R12: ffff88809542c7c0 R13: ffff88808acfd240 R14: 0000000000000001 R15: ffff888086a4c400 FS: 00007fbb585ec700(0000) GS:ffff8880ae900000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fc1a30b6020 CR3: 00000000a5032000 CR4: 00000000001406e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: build_cr3 arch/x86/include/asm/tlbflush.h:127 [inline] switch_mm_irqs_off+0x389/0x1420 arch/x86/mm/tlb.c:308 context_switch kernel/sched/core.c:2832 [inline] __schedule+0x8cc/0x1f30 kernel/sched/core.c:3485 preempt_schedule_irq+0xb9/0x140 kernel/sched/core.c:3712 retint_kernel+0x1b/0x2d RIP: 0010:kasan_report+0x48/0x164 mm/kasan/report.c:292 Code: 25 40 ee 01 00 8b 80 c0 12 00 00 85 c0 75 1d 48 8b 05 fc f1 c6 08 48 89 fb 49 89 f4 a8 02 75 28 f0 48 0f ba 2d e8 f1 c6 08 00 <73> 1c 48 8b 45 e8 65 48 33 04 25 28 00 00 00 0f 85 02 01 00 00 48 RSP: 0018:ffff88809134f778 EFLAGS: 00000247 ORIG_RAX: ffffffffffffff13 RAX: 0000000000000001 RBX: ffff88808ad16238 RCX: ffffffff82eb43d2 RDX: 0000000000000001 RSI: 0000000000000008 RDI: ffff88808ad16238 RBP: ffff88809134f7d0 R08: 000000000009e32e R09: 0000000000000000 R10: dffffc0000000000 R11: 0000000000000000 R12: 0000000000000008 R13: 1ffff11012269f08 R14: ffff88808b2eee40 R15: 0000000000000000 __asan_report_store8_noabort+0x17/0x20 mm/kasan/generic_report.c:140 gfs2_read_sb fs/gfs2/ops_fstype.c:332 [inline] init_sb+0xbf2/0xd30 fs/gfs2/ops_fstype.c:469 fill_super+0x1560/0x23d0 fs/gfs2/ops_fstype.c:1120 gfs2_mount+0x406/0x4d1 fs/gfs2/ops_fstype.c:1302 mount_fs+0xce/0x33c fs/super.c:1258 vfs_kern_mount.part.11+0x58/0x3d0 fs/namespace.c:959 vfs_kern_mount fs/namespace.c:949 [inline] do_new_mount fs/namespace.c:2513 [inline] do_mount+0x3ba/0x29e0 fs/namespace.c:2845 ksys_mount+0xba/0xe0 fs/namespace.c:3061 __do_sys_mount fs/namespace.c:3075 [inline] __se_sys_mount fs/namespace.c:3072 [inline] __x64_sys_mount+0xb9/0x150 fs/namespace.c:3072 do_syscall_64+0xd0/0x4d0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x4608aa Code: b8 a6 00 00 00 0f 05 48 3d 01 f0 ff ff 0f 83 ad 89 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 0f 83 8a 89 fb ff c3 66 0f 1f 84 00 00 00 00 00 RSP: 002b:00007fbb585eba88 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007fbb585ebb20 RCX: 00000000004608aa RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007fbb585ebae0 RBP: 00007fbb585ebae0 R08: 00007fbb585ebb20 R09: 0000000020000000 R10: 0000000002200000 R11: 0000000000000246 R12: 0000000020000000 R13: 0000000020000100 R14: 0000000020000200 R15: 0000000020000080 Modules linked in: ======================================================