bisecting fixing commit since 4fccc2503536a564a4ba31a1d50439854201659f building syzkaller on 2c36e7a75f8689b3da20e1a81a2ee5391f3af6e5 testing commit 4fccc2503536a564a4ba31a1d50439854201659f with gcc (GCC) 8.1.0 kernel signature: a2c23bc0acb6023d38dcff913b6a8160ba7667bd29050fe56285f36e9c760056 all runs: crashed: KASAN: slab-out-of-bounds Write in decode_data testing current HEAD 015e94d0e37b6860e4354ce3cac56bd7c39c8992 testing commit 015e94d0e37b6860e4354ce3cac56bd7c39c8992 with gcc (GCC) 8.1.0 kernel signature: 195663910c5ec368660004fa07e6395d221fa7624f81b37dcbcff638f7e752b5 all runs: crashed: KASAN: slab-out-of-bounds Write in decode_data revisions tested: 2, total time: 23m5.163820779s (build: 16m41.929919289s, test: 5m50.630092055s) the crash still happens on HEAD commit msg: Linux 4.19.146 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 sp0: Synchronizing with TNC IPv6: ADDRCONF(NETDEV_UP): veth0_macvtap: link is not ready ================================================================== 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 ffff88808ee3348e by task kworker/u4:2/82 CPU: 0 PID: 82 Comm: kworker/u4:2 Not tainted 4.19.146-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 IPv6: ADDRCONF(NETDEV_UP): veth1_macvtap: link is not ready 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 device veth0_macvtap entered promiscuous mode kasan_report_error mm/kasan/report.c:354 [inline] kasan_report.cold.9+0x242/0x309 mm/kasan/report.c:412 __asan_report_store1_noabort+0x17/0x20 mm/kasan/report.c:435 IPv6: ADDRCONF(NETDEV_UP): macvtap0: link is not ready 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 device veth1_macvtap entered promiscuous mode 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 IPv6: ADDRCONF(NETDEV_UP): macsec0: link is not ready worker_thread+0x85/0xb60 kernel/workqueue.c:2298 kthread+0x347/0x410 kernel/kthread.c:259 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 IPv6: ADDRCONF(NETDEV_UP): veth0_to_batadv: link is not ready Allocated by task 7845: 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 IPv6: ADDRCONF(NETDEV_UP): veth1_to_batadv: link is not ready kvmalloc include/linux/mm.h:577 [inline] kvzalloc include/linux/mm.h:585 [inline] alloc_netdev_mqs+0x5d/0xc80 net/core/dev.c:9139 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 batman_adv: The newly added mac address (aa:aa:aa:aa:aa:3d) already exists on: batadv_slave_0 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 batman_adv: It is strongly recommended to keep mac addresses unique to avoid problems! entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 0: (stack is not available) The buggy address belongs to the object at ffff88808ee32100 which belongs to the cache kmalloc-4096 of size 4096 The buggy address is located 910 bytes to the right of 4096-byte region [ffff88808ee32100, ffff88808ee33100) batman_adv: The newly added mac address (aa:aa:aa:aa:aa:3d) already exists on: batadv_slave_0 The buggy address belongs to the page: page:ffffea00023b8c80 count:1 mapcount:0 mapping:ffff88812c29cdc0 index:0x0 compound_mapcount: 0 flags: 0xfffe0000008100(slab|head) raw: 00fffe0000008100 ffffea00023b5f88 ffffea00023c2308 ffff88812c29cdc0 batman_adv: It is strongly recommended to keep mac addresses unique to avoid problems! raw: 0000000000000000 ffff88808ee32100 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88808ee33380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88808ee33400: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88808ee33480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88808ee33500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88808ee33580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================