bisecting fixing commit since 4fccc2503536a564a4ba31a1d50439854201659f building syzkaller on 2c36e7a75f8689b3da20e1a81a2ee5391f3af6e5 testing commit 4fccc2503536a564a4ba31a1d50439854201659f with gcc (GCC) 8.4.1 20210217 kernel signature: 79ee60e6b197cf964ae31795326936c99a2065dd57336263e510c6f6723ae85d all runs: crashed: KASAN: slab-out-of-bounds Write in decode_data testing current HEAD eb575cd5d7f60241d016fdd13a9e86d962093c9b testing commit eb575cd5d7f60241d016fdd13a9e86d962093c9b with gcc (GCC) 8.4.1 20210217 kernel signature: 729f98385775c1e1b71f18ce28391f17d870f8a4451b4f83b55e62dc535c830d all runs: crashed: KASAN: slab-out-of-bounds Write in decode_data revisions tested: 2, total time: 22m55.551317119s (build: 16m21.255166597s, test: 6m13.802754408s) the crash still happens on HEAD commit msg: Linux 4.19.195 crash: KASAN: slab-out-of-bounds Write in decode_data batman_adv: batadv0: Interface activated: batadv_slave_0 sp0: Synchronizing with TNC IPv6: ADDRCONF(NETDEV_CHANGE): batadv_slave_0: link becomes ready ================================================================== IPv6: ADDRCONF(NETDEV_CHANGE): veth0_to_batadv: link becomes 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 ffff8881dc1e210e by task kworker/u4:2/48 CPU: 1 PID: 48 Comm: kworker/u4:2 Not tainted 4.19.195-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/0x171 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 mm/kasan/report.c:412 [inline] kasan_report.cold.9+0x242/0x2fe mm/kasan/report.c:396 __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 drivers/net/hamradio/6pack.c:458 [inline] sixpack_receive_buf+0x722/0x1110 drivers/net/hamradio/6pack.c:435 sp1: Synchronizing with TNC 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:2153 worker_thread+0x85/0xb60 kernel/workqueue.c:2296 kthread+0x347/0x410 kernel/kthread.c:259 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 Allocated by task 3396: save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc mm/kasan/kasan.c:553 [inline] kasan_kmalloc+0xc7/0xe0 mm/kasan/kasan.c:531 kasan_slab_alloc+0x12/0x20 mm/kasan/kasan.c:490 kmem_cache_alloc+0x12e/0x720 mm/slab.c:3559 getname_flags fs/namei.c:140 [inline] getname_flags+0xb8/0x520 fs/namei.c:129 getname+0xd/0x10 fs/namei.c:211 do_sys_open+0x14b/0x350 fs/open.c:1079 __do_sys_open fs/open.c:1103 [inline] __se_sys_open fs/open.c:1098 [inline] __x64_sys_open+0x79/0xb0 fs/open.c:1098 do_syscall_64+0xd0/0x4e0 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 3396: 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 do_sys_open+0x16d/0x350 fs/open.c:1094 __do_sys_open fs/open.c:1103 [inline] __se_sys_open fs/open.c:1098 [inline] __x64_sys_open+0x79/0xb0 fs/open.c:1098 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 ffff8881dc1e2c80 which belongs to the cache names_cache of size 4096 The buggy address is located 2930 bytes to the left of 4096-byte region [ffff8881dc1e2c80, ffff8881dc1e3c80) The buggy address belongs to the page: page:ffffea0007707880 count:1 mapcount:0 mapping:ffff8881f655ed80 index:0x0 compound_mapcount: 0 flags: 0x17ffe0000008100(slab|head) raw: 017ffe0000008100 ffffea0007663b88 ffffea0007707988 ffff8881f655ed80 raw: 0000000000000000 ffff8881dc1e2c80 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8881dc1e2000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8881dc1e2080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8881dc1e2100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8881dc1e2180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8881dc1e2200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== 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! 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! 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! 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! 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! IPv6: ADDRCONF(NETDEV_UP): batadv_slave_1: link is not ready batman_adv: batadv0: Interface activated: batadv_slave_1 IPv6: ADDRCONF(NETDEV_CHANGE): batadv_slave_1: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): veth1_to_batadv: link becomes ready sp0: Synchronizing with TNC kasan: CONFIG_KASAN_INLINE enabled kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: 0000 [#1] PREEMPT SMP KASAN CPU: 1 PID: 78 Comm: kworker/u4:3 Tainted: G B 4.19.195-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: events_unbound call_usermodehelper_exec_work RIP: 0010:__rb_insert lib/rbtree.c:131 [inline] RIP: 0010:rb_insert_color_cached+0xa5/0xce0 lib/rbtree.c:469 Code: 0f 85 31 07 00 00 48 8b 1b f6 c3 01 0f 85 a6 01 00 00 49 bf 00 00 00 00 00 fc ff df 48 8d 43 08 48 89 d9 48 89 c2 48 c1 ea 03 <42> 80 3c 3a 00 0f 85 dd 06 00 00 4c 8b 73 08 4d 39 e6 0f 84 85 01 RSP: 0018:ffff8881f4c67958 EFLAGS: 00010002 RAX: 0000000000000008 RBX: 0000000000000000 RCX: 0000000000000000 RDX: 0000000000000001 RSI: ffff8881f682c4b0 RDI: ffff8881d7a6a1d8 RBP: ffff8881f4c67998 R08: ffff8881d7a6a218 R09: 0000000000000001 R10: 00000009c61ea55d R11: 0000000000000000 R12: ffff8881db786698 R13: ffff8881d7a6a1d8 R14: ffff8881d7a6a1c0 R15: dffffc0000000000 FS: 0000000000000000(0000) GS:ffff8881f6900000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000055d58a952250 CR3: 000000000846d005 CR4: 00000000001606e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: __enqueue_entity+0x10d/0x1f0 kernel/sched/fair.c:585 enqueue_entity+0x2a8/0x1130 kernel/sched/fair.c:3986 enqueue_task_fair+0x16a/0xd30 kernel/sched/fair.c:5177 enqueue_task kernel/sched/core.c:728 [inline] activate_task+0x11e/0x2e0 kernel/sched/core.c:747 wake_up_new_task+0x534/0xd20 kernel/sched/core.c:2420 _do_fork+0x1ef/0xcb0 kernel/fork.c:2243 kernel_thread+0x24/0x30 kernel/fork.c:2277 call_usermodehelper_exec_work kernel/umh.c:199 [inline] call_usermodehelper_exec_work+0x186/0x200 kernel/umh.c:185 process_one_work+0x830/0x1670 kernel/workqueue.c:2153 worker_thread+0x85/0xb60 kernel/workqueue.c:2296 kthread+0x347/0x410 kernel/kthread.c:259 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 Modules linked in: ---[ end trace 5c1779ed4e3a9a38 ]--- RIP: 0010:__rb_insert lib/rbtree.c:131 [inline] RIP: 0010:rb_insert_color_cached+0xa5/0xce0 lib/rbtree.c:469 Code: 0f 85 31 07 00 00 48 8b 1b f6 c3 01 0f 85 a6 01 00 00 49 bf 00 00 00 00 00 fc ff df 48 8d 43 08 48 89 d9 48 89 c2 48 c1 ea 03 <42> 80 3c 3a 00 0f 85 dd 06 00 00 4c 8b 73 08 4d 39 e6 0f 84 85 01 RSP: 0018:ffff8881f4c67958 EFLAGS: 00010002 RAX: 0000000000000008 RBX: 0000000000000000 RCX: 0000000000000000 RDX: 0000000000000001 RSI: ffff8881f682c4b0 RDI: ffff8881d7a6a1d8 RBP: ffff8881f4c67998 R08: ffff8881d7a6a218 R09: 0000000000000001 R10: 00000009c61ea55d R11: 0000000000000000 R12: ffff8881db786698 R13: ffff8881d7a6a1d8 R14: ffff8881d7a6a1c0 R15: dffffc0000000000 FS: 0000000000000000(0000) GS:ffff8881f6900000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000055d58a952250 CR3: 000000000846d005 CR4: 00000000001606e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400