bisecting fixing commit since 174651bdf802a2139065e8e31ce950e2f3fc4a94 building syzkaller on 0ecb9746a701be4544b845514a31a21cce92cc79 testing commit 174651bdf802a2139065e8e31ce950e2f3fc4a94 with gcc (GCC) 8.1.0 kernel signature: 28ae21bb1aa8567f15e476068096df2a7470d68f9069e7a84e4f62342b44a329 run #0: crashed: KASAN: slab-out-of-bounds Read in soft_cursor run #1: crashed: KASAN: use-after-free Read in soft_cursor run #2: crashed: KASAN: use-after-free Read in soft_cursor run #3: crashed: KASAN: use-after-free Read in soft_cursor run #4: crashed: KASAN: slab-out-of-bounds Read in soft_cursor run #5: crashed: KASAN: use-after-free Read in soft_cursor run #6: crashed: KASAN: use-after-free Read in soft_cursor run #7: crashed: KASAN: use-after-free Read in soft_cursor run #8: crashed: KASAN: use-after-free Read in soft_cursor run #9: crashed: KASAN: use-after-free Read in soft_cursor testing current HEAD f6d5cb9e2c06f7d583dd9f4f7cca21d13d78c32a testing commit f6d5cb9e2c06f7d583dd9f4f7cca21d13d78c32a with gcc (GCC) 8.1.0 kernel signature: 448bd05657983b856590b186147465adf0bd46f2888d0c6e12cca49584747545 run #0: crashed: KASAN: use-after-free Read in soft_cursor run #1: crashed: KASAN: use-after-free Read in soft_cursor run #2: crashed: KASAN: use-after-free Read in soft_cursor run #3: crashed: KASAN: slab-out-of-bounds Read in soft_cursor run #4: crashed: KASAN: use-after-free Read in soft_cursor run #5: crashed: KASAN: slab-out-of-bounds Read in soft_cursor run #6: crashed: KASAN: use-after-free Read in soft_cursor run #7: crashed: KASAN: slab-out-of-bounds Read in soft_cursor run #8: crashed: KASAN: use-after-free Read in soft_cursor run #9: crashed: KASAN: use-after-free Read in soft_cursor revisions tested: 2, total time: 27m21.603067132s (build: 19m46.258574521s, test: 5m53.81545205s) the crash still happens on HEAD commit msg: Linux 4.19.142 crash: KASAN: use-after-free Read in soft_cursor IPv6: ADDRCONF(NETDEV_CHANGE): vxcan1: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): vxcan0: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): vxcan1: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): vxcan0: link becomes ready ================================================================== BUG: KASAN: use-after-free in memcpy include/linux/string.h:373 [inline] BUG: KASAN: use-after-free in soft_cursor+0x430/0xc70 drivers/video/fbdev/core/softcursor.c:70 Read of size 9 at addr ffff88808efd4711 by task syz-executor.2/7443 CPU: 1 PID: 7443 Comm: syz-executor.2 Not tainted 4.19.142-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 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 check_memory_region_inline mm/kasan/kasan.c:260 [inline] check_memory_region+0x13e/0x1b0 mm/kasan/kasan.c:267 memcpy+0x23/0x50 mm/kasan/kasan.c:302 memcpy include/linux/string.h:373 [inline] soft_cursor+0x430/0xc70 drivers/video/fbdev/core/softcursor.c:70 bit_cursor+0xcd6/0x2190 drivers/video/fbdev/core/bitblit.c:386 fbcon_cursor+0x3d8/0x6b0 drivers/video/fbdev/core/fbcon.c:1372 hide_cursor+0x73/0x2b0 drivers/tty/vt/vt.c:902 redraw_screen+0x287/0x820 drivers/tty/vt/vt.c:1006 vc_do_resize+0xf63/0x1350 drivers/tty/vt/vt.c:1323 vc_resize+0x3d/0x60 drivers/tty/vt/vt.c:1343 vt_ioctl+0xfc0/0x2310 drivers/tty/vt/vt_ioctl.c:901 tty_ioctl+0x452/0x1290 drivers/tty/tty_io.c:2669 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:0x45a6f9 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:00007fc5670fac78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 000000000045a6f9 RDX: 00000000200002c0 RSI: 000000000000560a RDI: 0000000000000004 RBP: 000000000075bfc8 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007fc5670fb6d4 R13: 00000000004c6d62 R14: 00000000004dd350 R15: 00000000ffffffff Allocated by task 6599: 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_track_caller+0x50/0x70 mm/slab.c:3703 __kmalloc_reserve.isra.41+0x2c/0xc0 net/core/skbuff.c:137 pskb_expand_head+0x111/0xd90 net/core/skbuff.c:1464 netlink_trim+0x1a7/0x200 net/netlink/af_netlink.c:1300 netlink_broadcast_filtered+0x57/0x920 net/netlink/af_netlink.c:1497 netlink_broadcast net/netlink/af_netlink.c:1542 [inline] nlmsg_multicast include/net/netlink.h:591 [inline] nlmsg_notify+0x77/0x120 net/netlink/af_netlink.c:2498 rtnl_notify+0x86/0xe0 net/core/rtnetlink.c:736 rtmsg_fib+0x2f2/0x460 net/ipv4/fib_semantics.c:428 fib_table_insert+0x691/0x16c0 net/ipv4/fib_trie.c:1287 fib_magic.isra.22+0x33f/0x4e0 net/ipv4/fib_frontend.c:890 fib_add_ifaddr+0x3c9/0x480 net/ipv4/fib_frontend.c:934 fib_netdev_event+0x192/0x310 net/ipv4/fib_frontend.c:1269 notifier_call_chain+0x8a/0x160 kernel/notifier.c:93 __raw_notifier_call_chain kernel/notifier.c:394 [inline] raw_notifier_call_chain+0x11/0x20 kernel/notifier.c:401 call_netdevice_notifiers_info+0x28/0x60 net/core/dev.c:1744 call_netdevice_notifiers net/core/dev.c:1762 [inline] __dev_notify_flags+0xda/0x240 net/core/dev.c:7708 dev_change_flags+0xe6/0x150 net/core/dev.c:7744 do_setlink+0x11e7/0x2e10 net/core/rtnetlink.c:2449 rtnl_newlink+0xa1d/0x1320 net/core/rtnetlink.c:3077 rtnetlink_rcv_msg+0x34f/0x8f0 net/core/rtnetlink.c:4778 netlink_rcv_skb+0x13e/0x3d0 net/netlink/af_netlink.c:2455 rtnetlink_rcv+0x10/0x20 net/core/rtnetlink.c:4796 netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline] netlink_unicast+0x443/0x650 net/netlink/af_netlink.c:1344 netlink_sendmsg+0x765/0xc40 net/netlink/af_netlink.c:1909 sock_sendmsg_nosec net/socket.c:622 [inline] sock_sendmsg+0xb5/0xf0 net/socket.c:632 __sys_sendto+0x1f2/0x2e0 net/socket.c:1787 __do_sys_sendto net/socket.c:1799 [inline] __se_sys_sendto net/socket.c:1795 [inline] __x64_sys_sendto+0xdc/0x1a0 net/socket.c:1795 do_syscall_64+0xd0/0x4e0 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 6599: 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] kfree+0xcf/0x220 mm/slab.c:3822 skb_free_head+0x74/0x90 net/core/skbuff.c:554 skb_release_data+0x50e/0x790 net/core/skbuff.c:574 skb_release_all+0x3d/0x50 net/core/skbuff.c:631 __kfree_skb net/core/skbuff.c:645 [inline] consume_skb+0x91/0x270 net/core/skbuff.c:705 netlink_broadcast_filtered+0x285/0x920 net/netlink/af_netlink.c:1520 netlink_broadcast net/netlink/af_netlink.c:1542 [inline] nlmsg_multicast include/net/netlink.h:591 [inline] nlmsg_notify+0x77/0x120 net/netlink/af_netlink.c:2498 rtnl_notify+0x86/0xe0 net/core/rtnetlink.c:736 rtmsg_fib+0x2f2/0x460 net/ipv4/fib_semantics.c:428 fib_table_insert+0x691/0x16c0 net/ipv4/fib_trie.c:1287 fib_magic.isra.22+0x33f/0x4e0 net/ipv4/fib_frontend.c:890 fib_add_ifaddr+0x3c9/0x480 net/ipv4/fib_frontend.c:934 fib_netdev_event+0x192/0x310 net/ipv4/fib_frontend.c:1269 notifier_call_chain+0x8a/0x160 kernel/notifier.c:93 __raw_notifier_call_chain kernel/notifier.c:394 [inline] raw_notifier_call_chain+0x11/0x20 kernel/notifier.c:401 call_netdevice_notifiers_info+0x28/0x60 net/core/dev.c:1744 call_netdevice_notifiers net/core/dev.c:1762 [inline] __dev_notify_flags+0xda/0x240 net/core/dev.c:7708 dev_change_flags+0xe6/0x150 net/core/dev.c:7744 do_setlink+0x11e7/0x2e10 net/core/rtnetlink.c:2449 rtnl_newlink+0xa1d/0x1320 net/core/rtnetlink.c:3077 rtnetlink_rcv_msg+0x34f/0x8f0 net/core/rtnetlink.c:4778 netlink_rcv_skb+0x13e/0x3d0 net/netlink/af_netlink.c:2455 rtnetlink_rcv+0x10/0x20 net/core/rtnetlink.c:4796 netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline] netlink_unicast+0x443/0x650 net/netlink/af_netlink.c:1344 netlink_sendmsg+0x765/0xc40 net/netlink/af_netlink.c:1909 sock_sendmsg_nosec net/socket.c:622 [inline] sock_sendmsg+0xb5/0xf0 net/socket.c:632 __sys_sendto+0x1f2/0x2e0 net/socket.c:1787 __do_sys_sendto net/socket.c:1799 [inline] __se_sys_sendto net/socket.c:1795 [inline] __x64_sys_sendto+0xdc/0x1a0 net/socket.c:1795 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 ffff88808efd4540 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 465 bytes inside of 512-byte region [ffff88808efd4540, ffff88808efd4740) The buggy address belongs to the page: page:ffffea00023bf500 count:1 mapcount:0 mapping:ffff88812c29c940 index:0x0 flags: 0xfffe0000000100(slab) raw: 00fffe0000000100 ffffea00022f1b08 ffffea000238f148 ffff88812c29c940 raw: 0000000000000000 ffff88808efd4040 0000000100000006 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88808efd4600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88808efd4680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88808efd4700: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ^ ffff88808efd4780: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ffff88808efd4800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================