bisecting fixing commit since 98db2bf27b9ed2d5ed0b6c9c8a4bfcb127a19796 building syzkaller on 2ffa6679c4790a83f26a1b674ed34800e028fe2e testing commit 98db2bf27b9ed2d5ed0b6c9c8a4bfcb127a19796 with gcc (GCC) 8.1.0 kernel signature: 58c802216fe192a4c74df83da9590c8abc45c7ba0c7ea693f44880882431cc4e all runs: crashed: KASAN: slab-out-of-bounds Write in decode_data testing current HEAD a41ba30d9df20fe141c92aacbb56b6b077f19716 testing commit a41ba30d9df20fe141c92aacbb56b6b077f19716 with gcc (GCC) 8.1.0 kernel signature: 784eee06945bf698c2f7f4f576e88878656bf2687bfbf138156e109c8a89ec70 all runs: crashed: KASAN: slab-out-of-bounds Write in decode_data revisions tested: 2, total time: 23m16.486465868s (build: 16m37.216479211s, test: 6m6.377988125s) the crash still happens on HEAD commit msg: Linux 4.14.181 crash: KASAN: slab-out-of-bounds Write in decode_data IPv6: ADDRCONF(NETDEV_UP): macvtap0: link is not ready sp0: Synchronizing with TNC 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! BUG: KASAN: slab-out-of-bounds in decode_data.part.2+0x23c/0x280 drivers/net/hamradio/6pack.c:874 Write of size 1 at addr ffff8880a51e3a4e by task kworker/u4:1/22 CPU: 1 PID: 22 Comm: kworker/u4:1 Not tainted 4.14.181-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: events_unbound flush_to_ldisc batman_adv: The newly added mac address (aa:aa:aa:aa:aa:3e) already exists on: batadv_slave_1 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0xf7/0x13b lib/dump_stack.c:58 print_address_description.cold.7+0x9/0x1c9 mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report.cold.8+0x11a/0x2d3 mm/kasan/report.c:409 __asan_report_store1_noabort+0x17/0x20 mm/kasan/report.c:432 decode_data.part.2+0x23c/0x280 drivers/net/hamradio/6pack.c:874 decode_data drivers/net/hamradio/6pack.c:1004 [inline] sixpack_decode drivers/net/hamradio/6pack.c:1007 [inline] sixpack_receive_buf+0x722/0x1180 drivers/net/hamradio/6pack.c:458 tty_ldisc_receive_buf+0xff/0x1b0 drivers/tty/tty_buffer.c:459 tty_port_default_receive_buf+0x5f/0x90 drivers/tty/tty_port.c:37 receive_buf drivers/tty/tty_buffer.c:475 [inline] flush_to_ldisc+0x197/0x390 drivers/tty/tty_buffer.c:527 process_one_work+0x79e/0x16c0 kernel/workqueue.c:2116 worker_thread+0xcc/0xee0 kernel/workqueue.c:2250 kthread+0x338/0x400 kernel/kthread.c:232 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404 Allocated by task 7765: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc+0xc7/0xe0 mm/kasan/kasan.c:551 __do_kmalloc_node mm/slab.c:3682 [inline] __kmalloc_node+0x50/0x70 mm/slab.c:3689 kmalloc_node include/linux/slab.h:530 [inline] kvmalloc_node+0x70/0x80 mm/util.c:397 kvmalloc include/linux/mm.h:531 [inline] kvzalloc include/linux/mm.h:539 [inline] alloc_netdev_mqs+0x60/0xb40 net/core/dev.c:8100 sixpack_open+0xda/0xc7e drivers/net/hamradio/6pack.c:572 tty_ldisc_open.isra.1+0x61/0xa0 drivers/tty/tty_ldisc.c:481 tty_set_ldisc+0x249/0x5a0 drivers/tty/tty_ldisc.c:606 tiocsetd drivers/tty/tty_io.c:2351 [inline] tty_ioctl+0x300/0x1260 drivers/tty/tty_io.c:2595 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:500 [inline] do_vfs_ioctl+0x180/0xfb0 fs/ioctl.c:684 SYSC_ioctl fs/ioctl.c:701 [inline] SyS_ioctl+0x74/0x80 fs/ioctl.c:692 do_syscall_64+0x1c7/0x5b0 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb Freed by task 0: (stack is not available) The buggy address belongs to the object at ffff8880a51e26c0 which belongs to the cache kmalloc-4096 of size 4096 The buggy address is located 910 bytes to the right of 4096-byte region [ffff8880a51e26c0, ffff8880a51e36c0) The buggy address belongs to the page: page:ffffea0002947880 count:1 mapcount:0 mapping:ffff8880a51e26c0 index:0x0 compound_mapcount: 0 flags: 0xfffe0000008100(slab|head) raw: 00fffe0000008100 ffff8880a51e26c0 0000000000000000 0000000100000001 raw: ffffea00029444a0 ffffea000294b120 ffff8880aa800dc0 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a51e3900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880a51e3980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8880a51e3a00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8880a51e3a80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880a51e3b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================