bisecting fixing commit since fbc5fe7a54d02e11972e3b2a5ddb6ffc88162c8f building syzkaller on 0ecb9746a701be4544b845514a31a21cce92cc79 testing commit fbc5fe7a54d02e11972e3b2a5ddb6ffc88162c8f with gcc (GCC) 8.1.0 kernel signature: 969dfc0d25164d837b53c1ad5ed387a6a30f60d3 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: 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: slab-out-of-bounds Read in bit_putcs testing current HEAD b0cdffaa546e24acf92ab3b0d4e917a51aff6a82 testing commit b0cdffaa546e24acf92ab3b0d4e917a51aff6a82 with gcc (GCC) 8.1.0 kernel signature: c9a2032f2090cafeeeb02c90929869f9db141946 all runs: crashed: KASAN: use-after-free Read in soft_cursor revisions tested: 2, total time: 24m39.478135018s (build: 17m43.790509597s, test: 6m22.659170046s) the crash still happens on HEAD commit msg: Linux 4.14.163 crash: KASAN: use-after-free Read in soft_cursor IPv6: ADDRCONF(NETDEV_CHANGE): veth1_to_hsr: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): hsr_slave_1: link becomes ready IPv6: ADDRCONF(NETDEV_UP): veth0_to_bond: link is not ready IPv6: ADDRCONF(NETDEV_UP): veth1_to_bond: link is not ready ================================================================== BUG: KASAN: use-after-free in memcpy include/linux/string.h:347 [inline] BUG: KASAN: use-after-free in soft_cursor+0x430/0xc70 drivers/video/fbdev/core/softcursor.c:70 Read of size 9 at addr ffff8880a55dd111 by task syz-executor.5/6875 CPU: 1 PID: 6875 Comm: syz-executor.5 Not tainted 4.14.163-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 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 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:347 [inline] soft_cursor+0x430/0xc70 drivers/video/fbdev/core/softcursor.c:70 bit_cursor+0xe3b/0x1ce0 drivers/video/fbdev/core/bitblit.c:386 fbcon_cursor+0x3d8/0x6c0 drivers/video/fbdev/core/fbcon.c:1347 hide_cursor+0x95/0x2e0 drivers/tty/vt/vt.c:589 redraw_screen+0x272/0x7f0 drivers/tty/vt/vt.c:679 vc_do_resize+0xc95/0x1010 drivers/tty/vt/vt.c:954 vc_resize+0x3d/0x60 drivers/tty/vt/vt.c:974 vt_ioctl+0xfc1/0x21d0 drivers/tty/vt/vt_ioctl.c:901 tty_ioctl+0x434/0x1260 drivers/tty/tty_io.c:2661 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+0x42/0xb7 RIP: 0033:0x45a679 RSP: 002b:00007fc9dcfb5c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 000000000045a679 RDX: 00000000200002c0 RSI: 000000000000560a RDI: 0000000000000004 RBP: 000000000075bfc8 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007fc9dcfb66d4 R13: 00000000004c6ce2 R14: 00000000004dd2d0 R15: 00000000ffffffff Allocated by task 6841: 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 kasan_slab_alloc+0x12/0x20 mm/kasan/kasan.c:489 kmem_cache_alloc+0x12e/0x790 mm/slab.c:3552 dst_alloc+0xa1/0x190 net/core/dst.c:107 __ip6_dst_alloc+0x22/0x40 net/ipv6/route.c:357 ip6_dst_alloc+0x16/0x1a0 net/ipv6/route.c:370 ip6_route_info_create+0x2d9/0x2460 net/ipv6/route.c:1964 ip6_route_add+0x6b/0x110 net/ipv6/route.c:2201 addrconf_add_mroute+0x1af/0x250 net/ipv6/addrconf.c:2363 addrconf_add_dev+0xd1/0x130 net/ipv6/addrconf.c:2381 addrconf_dev_config+0x92/0x170 net/ipv6/addrconf.c:3229 addrconf_notify+0x2e1/0x1b10 net/ipv6/addrconf.c:3464 notifier_call_chain+0xd6/0x150 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+0x4b/0x60 net/core/dev.c:1671 call_netdevice_notifiers net/core/dev.c:1687 [inline] __dev_notify_flags+0xca/0x210 net/core/dev.c:6834 dev_change_flags+0xe6/0x150 net/core/dev.c:6867 do_setlink+0x96f/0x2c50 net/core/rtnetlink.c:2092 rtnl_newlink+0xe0c/0x1390 net/core/rtnetlink.c:2651 rtnetlink_rcv_msg+0x34c/0x9e0 net/core/rtnetlink.c:4306 netlink_rcv_skb+0x133/0x370 net/netlink/af_netlink.c:2432 rtnetlink_rcv+0x10/0x20 net/core/rtnetlink.c:4318 netlink_unicast_kernel net/netlink/af_netlink.c:1286 [inline] netlink_unicast+0x40b/0x600 net/netlink/af_netlink.c:1312 netlink_sendmsg+0x730/0xbd0 net/netlink/af_netlink.c:1877 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xb5/0xf0 net/socket.c:656 SYSC_sendto+0x1e3/0x2c0 net/socket.c:1763 SyS_sendto+0x9/0x10 net/socket.c:1731 do_syscall_64+0x1c7/0x5b0 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 Freed by task 6841: 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_slab_free+0x71/0xc0 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3496 [inline] kmem_cache_free+0x80/0x2d0 mm/slab.c:3758 dst_destroy+0x1ce/0x2d0 net/core/dst.c:138 dst_release_immediate+0x30/0x4f net/core/dst.c:203 fib6_add+0xbc9/0x2d00 net/ipv6/ip6_fib.c:1233 __ip6_ins_rt+0x69/0xa0 net/ipv6/route.c:947 ip6_route_add+0xe7/0x110 net/ipv6/route.c:2212 addrconf_add_mroute+0x1af/0x250 net/ipv6/addrconf.c:2363 addrconf_add_dev+0xd1/0x130 net/ipv6/addrconf.c:2381 addrconf_dev_config+0x92/0x170 net/ipv6/addrconf.c:3229 addrconf_notify+0x2e1/0x1b10 net/ipv6/addrconf.c:3464 notifier_call_chain+0xd6/0x150 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+0x4b/0x60 net/core/dev.c:1671 call_netdevice_notifiers net/core/dev.c:1687 [inline] __dev_notify_flags+0xca/0x210 net/core/dev.c:6834 dev_change_flags+0xe6/0x150 net/core/dev.c:6867 do_setlink+0x96f/0x2c50 net/core/rtnetlink.c:2092 rtnl_newlink+0xe0c/0x1390 net/core/rtnetlink.c:2651 rtnetlink_rcv_msg+0x34c/0x9e0 net/core/rtnetlink.c:4306 netlink_rcv_skb+0x133/0x370 net/netlink/af_netlink.c:2432 rtnetlink_rcv+0x10/0x20 net/core/rtnetlink.c:4318 netlink_unicast_kernel net/netlink/af_netlink.c:1286 [inline] netlink_unicast+0x40b/0x600 net/netlink/af_netlink.c:1312 netlink_sendmsg+0x730/0xbd0 net/netlink/af_netlink.c:1877 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xb5/0xf0 net/socket.c:656 SYSC_sendto+0x1e3/0x2c0 net/socket.c:1763 SyS_sendto+0x9/0x10 net/socket.c:1731 do_syscall_64+0x1c7/0x5b0 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 The buggy address belongs to the object at ffff8880a55dd000 which belongs to the cache ip6_dst_cache of size 384 The buggy address is located 273 bytes inside of 384-byte region [ffff8880a55dd000, ffff8880a55dd180) The buggy address belongs to the page: page:ffffea0002957740 count:1 mapcount:0 mapping:ffff8880a55dd000 index:0x0 flags: 0xfffe0000000100(slab) raw: 00fffe0000000100 ffff8880a55dd000 0000000000000000 0000000100000009 raw: ffffea0001e8cce0 ffffea00020d37e0 ffff8880a3b3f540 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: IPv6: ADDRCONF(NETDEV_UP): veth0_to_team: link is not ready ffff8880a55dd000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880a55dd080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880a55dd100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880a55dd180: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ffff8880a55dd200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================