bisecting fixing commit since 4fccc2503536a564a4ba31a1d50439854201659f building syzkaller on 2c36e7a75f8689b3da20e1a81a2ee5391f3af6e5 testing commit 4fccc2503536a564a4ba31a1d50439854201659f with gcc (GCC) 8.1.0 kernel signature: 689a29f890fce61580939087786320ff00ea435c580106041ddc40928e812eb5 run #0: crashed: KASAN: slab-out-of-bounds Write in decode_data run #1: crashed: KASAN: slab-out-of-bounds Write in decode_data run #2: crashed: KASAN: slab-out-of-bounds Write in decode_data run #3: crashed: KASAN: slab-out-of-bounds Write in decode_data run #4: crashed: KASAN: slab-out-of-bounds Write in decode_data run #5: crashed: KASAN: slab-out-of-bounds Write in decode_data run #6: crashed: KASAN: slab-out-of-bounds Write in decode_data run #7: crashed: KASAN: use-after-free Write in decode_data run #8: crashed: KASAN: slab-out-of-bounds Write in decode_data run #9: crashed: KASAN: slab-out-of-bounds Write in decode_data testing current HEAD 14cfdbd39e316efd91ae6e403ef8211f0b022603 testing commit 14cfdbd39e316efd91ae6e403ef8211f0b022603 with gcc (GCC) 8.1.0 kernel signature: d2bb98a5185e1cd4b6a4b5c5a981c3a0bbd70231515aa1775efccec2f44a6a8b run #0: crashed: KASAN: slab-out-of-bounds Write in decode_data run #1: crashed: KASAN: slab-out-of-bounds Write in decode_data run #2: crashed: KASAN: slab-out-of-bounds Write in decode_data run #3: crashed: KASAN: slab-out-of-bounds Write in decode_data run #4: crashed: KASAN: slab-out-of-bounds Write in decode_data run #5: crashed: KASAN: slab-out-of-bounds Write in decode_data run #6: crashed: KASAN: slab-out-of-bounds Write in decode_data run #7: crashed: KASAN: slab-out-of-bounds Write in decode_data run #8: crashed: KASAN: slab-out-of-bounds Write in decode_data run #9: crashed: KASAN: use-after-free Write in decode_data revisions tested: 2, total time: 27m16.965615287s (build: 19m53.512290737s, test: 6m28.61086582s) the crash still happens on HEAD commit msg: Linux 4.19.112 crash: KASAN: use-after-free Write in decode_data batman_adv: batadv0: Interface activated: batadv_slave_0 IPv6: ADDRCONF(NETDEV_CHANGE): batadv_slave_0: link becomes ready sp0: Synchronizing with TNC IPv6: ADDRCONF(NETDEV_CHANGE): veth0_to_batadv: link becomes ready ================================================================== BUG: KASAN: use-after-free in decode_data.part.2+0x23c/0x280 drivers/net/hamradio/6pack.c:863 batman_adv: The newly added mac address (aa:aa:aa:aa:aa:3e) already exists on: batadv_slave_1 Write of size 1 at addr ffff88808a9e218e by task kworker/u4:4/2356 CPU: 0 PID: 2356 Comm: kworker/u4:4 Not tainted 4.19.112-syzkaller #0 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 __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 batman_adv: It is strongly recommended to keep mac addresses unique to avoid problems! 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 6658: 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 kasan_slab_alloc+0x12/0x20 mm/kasan/kasan.c:490 kmem_cache_alloc+0x12e/0x730 mm/slab.c:3559 getname_flags+0xb8/0x520 fs/namei.c:140 user_path_at_empty+0x1e/0x40 fs/namei.c:2609 user_path_at include/linux/namei.h:57 [inline] vfs_statx+0xbe/0x150 fs/stat.c:185 vfs_stat include/linux/fs.h:3128 [inline] __do_sys_newstat+0x85/0xe0 fs/stat.c:337 __se_sys_newstat fs/stat.c:333 [inline] __x64_sys_newstat+0x4f/0x70 fs/stat.c:333 do_syscall_64+0xd0/0x4e0 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 6658: save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/kasan.c:521 kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:528 __cache_free mm/slab.c:3503 [inline] kmem_cache_free+0x83/0x290 mm/slab.c:3765 putname+0xa8/0xe0 fs/namei.c:261 filename_lookup.part.57+0x1ec/0x360 fs/namei.c:2358 filename_lookup fs/namei.c:2342 [inline] user_path_at_empty+0x39/0x40 fs/namei.c:2609 user_path_at include/linux/namei.h:57 [inline] vfs_statx+0xbe/0x150 fs/stat.c:185 vfs_stat include/linux/fs.h:3128 [inline] __do_sys_newstat+0x85/0xe0 fs/stat.c:337 __se_sys_newstat fs/stat.c:333 [inline] __x64_sys_newstat+0x4f/0x70 fs/stat.c:333 do_syscall_64+0xd0/0x4e0 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff88808a9e2080 which belongs to the cache names_cache of size 4096 The buggy address is located 270 bytes inside of 4096-byte region [ffff88808a9e2080, ffff88808a9e3080) The buggy address belongs to the page: page:ffffea00022a7880 count:1 mapcount:0 mapping:ffff88821bc47800 index:0x0 compound_mapcount: 0 flags: 0xfffe0000008100(slab|head) raw: 00fffe0000008100 ffffea0002633188 ffffea0002a52008 ffff88821bc47800 raw: 0000000000000000 ffff88808a9e2080 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88808a9e2080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88808a9e2100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88808a9e2180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88808a9e2200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88808a9e2280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================