bisecting fixing commit since 174651bdf802a2139065e8e31ce950e2f3fc4a94 building syzkaller on 0ecb9746a701be4544b845514a31a21cce92cc79 testing commit 174651bdf802a2139065e8e31ce950e2f3fc4a94 with gcc (GCC) 8.1.0 kernel signature: a925e82077220225993bad5d5cb060e4e92b38d6778392fa0bd490fc92e6a229 run #0: crashed: KASAN: use-after-free Read in soft_cursor run #1: crashed: KASAN: slab-out-of-bounds Read in soft_cursor run #2: crashed: KASAN: slab-out-of-bounds Read in soft_cursor run #3: crashed: KASAN: slab-out-of-bounds 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: slab-out-of-bounds 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 3fc898571b974f9a05e4e5c1fe17b18548207091 testing commit 3fc898571b974f9a05e4e5c1fe17b18548207091 with gcc (GCC) 8.1.0 kernel signature: 4b80238930e71ded4e86ec25502ae90547dd69bb74760a98bda68e84b886233a 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: 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: 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 revisions tested: 2, total time: 25m38.210409698s (build: 18m16.049732735s, test: 6m31.670481654s) the crash still happens on HEAD commit msg: Linux 4.19.128 crash: KASAN: use-after-free Read in soft_cursor IPv6: ADDRCONF(NETDEV_UP): vxcan1: link is not ready IPv6: ADDRCONF(NETDEV_CHANGE): vxcan1: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): vxcan0: link becomes ready 8021q: adding VLAN 0 to HW filter on device batadv0 ================================================================== BUG: KASAN: use-after-free in memcpy include/linux/string.h:348 [inline] BUG: KASAN: use-after-free in soft_cursor+0x430/0xc70 drivers/video/fbdev/core/softcursor.c:70 Read of size 9 at addr ffff88809230f711 by task syz-executor.1/7444 CPU: 0 PID: 7444 Comm: syz-executor.1 Not tainted 4.19.128-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:348 [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+0xf35/0x1310 drivers/tty/vt/vt.c:1317 vc_resize+0x3d/0x60 drivers/tty/vt/vt.c:1337 vt_ioctl+0xfc0/0x2380 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:0x45a679 Code: ad 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 7b b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f758875ec78 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: 00007f758875f6d4 R13: 00000000004c6ce2 R14: 00000000004dd2d0 R15: 00000000ffffffff Allocated by task 6545: 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 __alloc_skb+0xd7/0x580 net/core/skbuff.c:205 alloc_skb include/linux/skbuff.h:995 [inline] alloc_uevent_skb+0x84/0x220 lib/kobject_uevent.c:288 uevent_net_broadcast_tagged lib/kobject_uevent.c:349 [inline] kobject_uevent_net_broadcast lib/kobject_uevent.c:409 [inline] kobject_uevent_env+0xbd5/0xec0 lib/kobject_uevent.c:590 kobject_uevent+0xb/0x10 lib/kobject_uevent.c:639 netdev_queue_add_kobject net/core/net-sysfs.c:1492 [inline] netdev_queue_update_kobjects+0x271/0x330 net/core/net-sysfs.c:1509 register_queue_kobjects net/core/net-sysfs.c:1551 [inline] netdev_register_kobject+0x261/0x360 net/core/net-sysfs.c:1769 register_netdevice+0x6e5/0x1130 net/core/dev.c:8722 bond_newlink+0x29/0x60 drivers/net/bonding/bond_netlink.c:453 rtnl_newlink+0xc78/0x1310 net/core/rtnetlink.c:3141 rtnetlink_rcv_msg+0x34f/0x8f0 net/core/rtnetlink.c:4777 netlink_rcv_skb+0x142/0x390 net/netlink/af_netlink.c:2455 rtnetlink_rcv+0x10/0x20 net/core/rtnetlink.c:4795 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 6545: 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+0xe/0x10 net/netlink/af_netlink.c:1542 uevent_net_broadcast_tagged lib/kobject_uevent.c:370 [inline] kobject_uevent_net_broadcast lib/kobject_uevent.c:409 [inline] kobject_uevent_env+0xc7f/0xec0 lib/kobject_uevent.c:590 kobject_uevent+0xb/0x10 lib/kobject_uevent.c:639 netdev_queue_add_kobject net/core/net-sysfs.c:1492 [inline] netdev_queue_update_kobjects+0x271/0x330 net/core/net-sysfs.c:1509 register_queue_kobjects net/core/net-sysfs.c:1551 [inline] netdev_register_kobject+0x261/0x360 net/core/net-sysfs.c:1769 register_netdevice+0x6e5/0x1130 net/core/dev.c:8722 bond_newlink+0x29/0x60 drivers/net/bonding/bond_netlink.c:453 rtnl_newlink+0xc78/0x1310 net/core/rtnetlink.c:3141 rtnetlink_rcv_msg+0x34f/0x8f0 net/core/rtnetlink.c:4777 netlink_rcv_skb+0x142/0x390 net/netlink/af_netlink.c:2455 rtnetlink_rcv+0x10/0x20 net/core/rtnetlink.c:4795 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 ffff88809230f540 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 465 bytes inside of 512-byte region [ffff88809230f540, ffff88809230f740) The buggy address belongs to the page: page:ffffea000248c3c0 count:1 mapcount:0 mapping:ffff88812c29c940 index:0x0 flags: 0xfffe0000000100(slab) raw: 00fffe0000000100 ffffea000251ccc8 ffffea000257acc8 ffff88812c29c940 raw: 0000000000000000 ffff88809230f040 0000000100000006 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88809230f600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88809230f680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88809230f700: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ^ ffff88809230f780: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ffff88809230f800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================