bisecting fixing commit since 4fccc2503536a564a4ba31a1d50439854201659f building syzkaller on 2c36e7a75f8689b3da20e1a81a2ee5391f3af6e5 testing commit 4fccc2503536a564a4ba31a1d50439854201659f with gcc (GCC) 8.1.0 kernel signature: 6b483ea26be05ba0f73f4ac660587d931ff9334ce5aabd8c0827fc7491d207eb all runs: crashed: KASAN: slab-out-of-bounds Write in decode_data testing current HEAD 20b3a3dfdf6c55b50bbdc8e231a3dbf6bf965dc7 testing commit 20b3a3dfdf6c55b50bbdc8e231a3dbf6bf965dc7 with gcc (GCC) 8.1.0 kernel signature: 8dcd632d30ff8ea2d68cc01f3a26bad0ed63f001e84d13241464449f71ac970e all runs: crashed: KASAN: slab-out-of-bounds Write in decode_data revisions tested: 2, total time: 26m2.815144549s (build: 18m43.763171874s, test: 6m5.496156573s) the crash still happens on HEAD commit msg: Linux 4.19.134 crash: KASAN: slab-out-of-bounds Write in decode_data IPv6: ADDRCONF(NETDEV_CHANGE): batadv_slave_1: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): veth1_to_batadv: link becomes ready sp1: Synchronizing with TNC sp0: Synchronizing with TNC ================================================================== BUG: KASAN: slab-out-of-bounds in decode_data.part.2+0x23c/0x280 drivers/net/hamradio/6pack.c:863 Write of size 1 at addr ffff88808d82760e by task kworker/u4:4/335 CPU: 0 PID: 335 Comm: kworker/u4:4 Not tainted 4.19.134-syzkaller #0 sp2: Synchronizing with TNC Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: events_unbound flush_to_ldisc Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x123/0x177 lib/dump_stack.c:118 print_address_description.cold.8+0x9/0x1ff mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report.cold.9+0x242/0x309 mm/kasan/report.c:412 sp3: Synchronizing with TNC __asan_report_store1_noabort+0x17/0x20 mm/kasan/report.c:435 decode_data.part.2+0x23c/0x280 drivers/net/hamradio/6pack.c:863 decode_data drivers/net/hamradio/6pack.c:985 [inline] sixpack_decode drivers/net/hamradio/6pack.c:988 [inline] sixpack_receive_buf+0x722/0x1120 drivers/net/hamradio/6pack.c:458 tty_ldisc_receive_buf+0xff/0x1b0 drivers/tty/tty_buffer.c:460 tty_port_default_receive_buf+0x5f/0x90 drivers/tty/tty_port.c:38 receive_buf drivers/tty/tty_buffer.c:476 [inline] flush_to_ldisc+0x1aa/0x3a0 drivers/tty/tty_buffer.c:528 process_one_work+0x830/0x1670 kernel/workqueue.c:2155 worker_thread+0x85/0xb60 kernel/workqueue.c:2298 kthread+0x324/0x3e0 kernel/kthread.c:246 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 Allocated by task 7895: save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc+0xc7/0xe0 mm/kasan/kasan.c:553 __do_kmalloc_node mm/slab.c:3689 [inline] __kmalloc_node+0x50/0x70 mm/slab.c:3696 kmalloc_node include/linux/slab.h:557 [inline] kvmalloc_node+0x68/0x70 mm/util.c:423 kvmalloc include/linux/mm.h:577 [inline] kvzalloc include/linux/mm.h:585 [inline] alloc_netdev_mqs+0x5d/0xc80 net/core/dev.c:9138 sixpack_open+0xe7/0xbc2 drivers/net/hamradio/6pack.c:563 tty_ldisc_open.isra.3+0x65/0xa0 drivers/tty/tty_ldisc.c:469 tty_set_ldisc+0x249/0x5a0 drivers/tty/tty_ldisc.c:594 tiocsetd drivers/tty/tty_io.c:2359 [inline] tty_ioctl+0x31e/0x1290 drivers/tty/tty_io.c:2603 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:501 [inline] do_vfs_ioctl+0x196/0x10c0 fs/ioctl.c:688 ksys_ioctl+0x62/0x90 fs/ioctl.c:705 __do_sys_ioctl fs/ioctl.c:712 [inline] __se_sys_ioctl fs/ioctl.c:710 [inline] __x64_sys_ioctl+0x6e/0xb0 fs/ioctl.c:710 do_syscall_64+0xd0/0x4e0 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 0: (stack is not available) The buggy address belongs to the object at ffff88808d826280 which belongs to the cache kmalloc-4096 of size 4096 The buggy address is located 910 bytes to the right of 4096-byte region [ffff88808d826280, ffff88808d827280) The buggy address belongs to the page: page:ffffea0002360980 count:1 mapcount:0 mapping:ffff88812c29cdc0 index:0x0 compound_mapcount: 0 flags: 0xfffe0000008100(slab|head) raw: 00fffe0000008100 ffffea0002a47e08 ffffea0002a4cf88 ffff88812c29cdc0 raw: 0000000000000000 ffff88808d826280 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88808d827500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88808d827580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88808d827600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88808d827680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88808d827700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== page:ffffea0002a48040 count:1 mapcount:0 mapping:0000000000000000 index:0x0 flags: 0xfffe0000000000() raw: 00fffe0000000000 dead000000000100 ffffea0002a5ef40 0000000000000000 sp0: Synchronizing with TNC sp0: Synchronizing with TNC raw: 0000000000000000 ffff88808be2b6e0 00000001ffffffff 0000000000000000 sp2: Synchronizing with TNC kasan: CONFIG_KASAN_INLINE enabled kasan: GPF could be caused by NULL-ptr deref or user memory access page dumped because: VM_BUG_ON_PAGE(page->pmd_huge_pte) general protection fault: 0000 [#1] PREEMPT SMP KASAN CPU: 0 PID: 7950 Comm: syz-executor.3 Tainted: G B 4.19.134-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:fib6_backtrack+0xd1/0x160 net/ipv6/route.c:1019 Code: 85 8c 00 00 00 4c 8b 33 e8 ac de 5c fb 85 c0 74 09 80 3d 6e 9c 28 03 00 74 2c e8 9a de 5c fb 49 8d 7e 18 48 89 f8 48 c1 e8 03 <42> 80 3c 20 00 75 77 49 8b 7e 18 48 85 ff 0f 85 6a ff ff ff 4c 89 ------------[ cut here ]------------ RSP: 0018:ffff8880aea06e70 EFLAGS: 00010206 kernel BUG at include/linux/mm.h:1997! RAX: 0000000000000003 RBX: ffff88808a2902d0 RCX: 0000000000000000 RDX: 0000000000000004 RSI: ffff8880aea07610 RDI: 0000000000000018 kasan: CONFIG_KASAN_INLINE enabled RBP: ffff8880aea06e90 R08: 0000000000000002 R09: 0000000000000000 R10: ffffed1015d40ec5 R11: 0000000000000000 R12: dffffc0000000000 R13: ffff8880aea07610 R14: 0000000000000000 R15: ffff8880a7a90c80 FS: 00007f70b62de700(0000) GS:ffff8880aea00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fb5b809f5e0 CR3: 000000008f931000 CR4: 00000000001406f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 kasan: GPF could be caused by NULL-ptr deref or user memory access DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: fib6_table_lookup+0x2ae/0x960 net/ipv6/route.c:1878 ip6_pol_route+0x15a/0xa80 net/ipv6/route.c:1909 ip6_pol_route_output+0x3c/0x70 net/ipv6/route.c:2135 fib6_rule_lookup+0x104/0x480 net/ipv6/fib6_rules.c:118 ip6_route_output_flags+0x22a/0x2c0 net/ipv6/route.c:2163 ip6_route_output include/net/ip6_route.h:88 [inline] ip6_dst_lookup_tail+0xd4b/0x1610 net/ipv6/ip6_output.c:952 ip6_dst_lookup_flow+0x83/0x170 net/ipv6/ip6_output.c:1080 geneve_get_v6_dst+0x36a/0x920 drivers/net/geneve.c:804 geneve6_xmit_skb drivers/net/geneve.c:878 [inline] geneve_xmit+0x231/0x2d30 drivers/net/geneve.c:926 __netdev_start_xmit include/linux/netdevice.h:4333 [inline] netdev_start_xmit include/linux/netdevice.h:4347 [inline] xmit_one net/core/dev.c:3256 [inline] dev_hard_start_xmit+0x160/0x6f0 net/core/dev.c:3272 __dev_queue_xmit+0x1cdb/0x2a80 net/core/dev.c:3838 dev_queue_xmit+0xb/0x10 net/core/dev.c:3871 neigh_hh_output include/net/neighbour.h:491 [inline] neigh_output include/net/neighbour.h:499 [inline] ip6_finish_output2+0xe7d/0x2200 net/ipv6/ip6_output.c:120 ip6_finish_output+0x3c6/0xa90 net/ipv6/ip6_output.c:154 NF_HOOK_COND include/linux/netfilter.h:278 [inline] ip6_output+0x1bf/0x660 net/ipv6/ip6_output.c:171 dst_output include/net/dst.h:455 [inline] NF_HOOK include/linux/netfilter.h:289 [inline] mld_sendpack+0x87c/0xcd0 net/ipv6/mcast.c:1684 mld_send_cr net/ipv6/mcast.c:1980 [inline] mld_ifc_timer_expire+0x372/0x740 net/ipv6/mcast.c:2479 call_timer_fn+0x14c/0x510 kernel/time/timer.c:1337 expire_timers kernel/time/timer.c:1374 [inline] __run_timers kernel/time/timer.c:1695 [inline] run_timer_softirq+0xb63/0x1180 kernel/time/timer.c:1708 __do_softirq+0x260/0x92d kernel/softirq.c:292 invoke_softirq kernel/softirq.c:372 [inline] irq_exit+0x17f/0x1c0 kernel/softirq.c:412 exiting_irq arch/x86/include/asm/apic.h:544 [inline] smp_apic_timer_interrupt+0x13e/0x540 arch/x86/kernel/apic/apic.c:1094 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:894 RIP: 0010:find_stack lib/stackdepot.c:192 [inline] RIP: 0010:depot_save_stack+0x101/0x466 lib/stackdepot.c:242 Code: b4 00 00 00 41 83 f8 03 0f 84 a7 00 00 00 41 83 f8 01 0f 84 a3 00 00 00 41 89 de 41 81 e6 ff ff 0f 00 4e 8b 24 f5 80 d0 3a 8a <4d> 85 e4 0f 84 d4 00 00 00 44 8d 47 ff 49 c1 e0 03 eb 0d 4d 8b 24 RSP: 0018:ffff88808de57420 EFLAGS: 00000206 ORIG_RAX: ffffffffffffff13 RAX: 00000000a16d30fc RBX: 00000000341556d2 RCX: ffff88808de57480 RDX: 000000008b27b6fb RSI: 00000000006080c0 RDI: 0000000000000013 RBP: ffff88808de57458 R08: 0000000000000002 R09: 000000007add1843 R10: 000000006e4c568f R11: 0000000000000000 R12: ffff8880a908b480 R13: ffff88808de57468 R14: 00000000000556d2 R15: ffff8880a0599727 save_stack+0xa9/0xd0 mm/kasan/kasan.c:454 set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc+0xc7/0xe0 mm/kasan/kasan.c:553 __do_kmalloc mm/slab.c:3727 [inline] __kmalloc+0x15b/0x770 mm/slab.c:3736 kmalloc include/linux/slab.h:520 [inline] kzalloc include/linux/slab.h:709 [inline] kobject_get_path+0xa0/0x1a0 lib/kobject.c:171 kobject_uevent_env+0x1df/0xf20 lib/kobject_uevent.c:526 kobject_uevent+0xb/0x10 lib/kobject_uevent.c:639 rx_queue_add_kobject net/core/net-sysfs.c:948 [inline] net_rx_queue_update_kobjects+0xaf/0x3a0 net/core/net-sysfs.c:970 register_queue_kobjects net/core/net-sysfs.c:1546 [inline] netdev_register_kobject+0x24d/0x360 net/core/net-sysfs.c:1769 register_netdevice+0x6f4/0xfb0 net/core/dev.c:8716 register_netdev+0x19/0x30 net/core/dev.c:8845 sixpack_open+0x89d/0xbc2 drivers/net/hamradio/6pack.c:628 tty_ldisc_open.isra.3+0x65/0xa0 drivers/tty/tty_ldisc.c:469 tty_set_ldisc+0x249/0x5a0 drivers/tty/tty_ldisc.c:594 tiocsetd drivers/tty/tty_io.c:2359 [inline] tty_ioctl+0x31e/0x1290 drivers/tty/tty_io.c:2603 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:501 [inline] do_vfs_ioctl+0x196/0x10c0 fs/ioctl.c:688 ksys_ioctl+0x62/0x90 fs/ioctl.c:705 __do_sys_ioctl fs/ioctl.c:712 [inline] __se_sys_ioctl fs/ioctl.c:710 [inline] __x64_sys_ioctl+0x6e/0xb0 fs/ioctl.c:710 do_syscall_64+0xd0/0x4e0 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45c4a9 Code: 2d b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 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 0f 83 fb b5 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f70b62ddc78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f70b62de6d4 RCX: 000000000045c4a9 RDX: 0000000020fd0ffc RSI: 0000000000005423 RDI: 0000000000000004 RBP: 000000000076bf20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 0000000000000583 R14: 00000000004c7dd1 R15: 000000000076bf2c Modules linked in: general protection fault: 0000 [#2] PREEMPT SMP KASAN ---[ end trace 67da58b7e81cc309 ]--- CPU: 1 PID: 18 Comm: ksoftirqd/1 Tainted: G B D 4.19.134-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:fib6_backtrack+0xd1/0x160 net/ipv6/route.c:1019 Code: 85 8c 00 00 00 4c 8b 33 e8 ac de 5c fb 85 c0 74 09 80 3d 6e 9c 28 03 00 74 2c e8 9a de 5c fb 49 8d 7e 18 48 89 f8 48 c1 e8 03 <42> 80 3c 20 00 75 77 49 8b 7e 18 48 85 ff 0f 85 6a ff ff ff 4c 89 RIP: 0010:fib6_backtrack+0xd1/0x160 net/ipv6/route.c:1019 RSP: 0018:ffff8880a9867428 EFLAGS: 00010206 RAX: 0000000000000003 RBX: ffff88808a2902d0 RCX: 0000000000000000 RDX: 0000000000000004 RSI: ffff8880a9867940 RDI: 0000000000000018 RBP: ffff8880a9867448 R08: 0000000000000003 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: dffffc0000000000 R13: ffff8880a9867940 R14: 0000000000000000 R15: ffff8880a7a90c80 Code: 85 8c 00 00 00 4c 8b 33 e8 ac de 5c fb 85 c0 74 09 80 3d 6e 9c 28 03 00 74 2c e8 9a de 5c fb 49 8d 7e 18 48 89 f8 48 c1 e8 03 <42> 80 3c 20 00 75 77 49 8b 7e 18 48 85 ff 0f 85 6a ff ff ff 4c 89 FS: 0000000000000000(0000) GS:ffff8880aeb00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007ffefcef3038 CR3: 0000000084150000 CR4: 00000000001406e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 RSP: 0018:ffff8880aea06e70 EFLAGS: 00010206 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: fib6_table_lookup+0x2ae/0x960 net/ipv6/route.c:1878 RAX: 0000000000000003 RBX: ffff88808a2902d0 RCX: 0000000000000000 ip6_pol_route+0x15a/0xa80 net/ipv6/route.c:1909 RDX: 0000000000000004 RSI: ffff8880aea07610 RDI: 0000000000000018 RBP: ffff8880aea06e90 R08: 0000000000000002 R09: 0000000000000000 R10: ffffed1015d40ec5 R11: 0000000000000000 R12: dffffc0000000000 ip6_pol_route_input+0x4f/0x80 net/ipv6/route.c:1978 fib6_rule_lookup+0x104/0x480 net/ipv6/fib6_rules.c:118 R13: ffff8880aea07610 R14: 0000000000000000 R15: ffff8880a7a90c80 FS: 00007f70b62de700(0000) GS:ffff8880aea00000(0000) knlGS:0000000000000000 ip6_route_input_lookup+0x7e/0x90 net/ipv6/route.c:1990 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 ip6_route_input+0x4f2/0x830 net/ipv6/route.c:2125 CR2: 00007fb5b809f5e0 CR3: 000000008f931000 CR4: 00000000001406f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400