bisecting fixing commit since 174651bdf802a2139065e8e31ce950e2f3fc4a94 building syzkaller on 0ecb9746a701be4544b845514a31a21cce92cc79 testing commit 174651bdf802a2139065e8e31ce950e2f3fc4a94 with gcc (GCC) 8.1.0 kernel signature: 0900950cd907400773c18a260ec88a32787eb206ce91f8bc6b70059eb6d9e933 run #0: crashed: KASAN: slab-out-of-bounds Read in bit_putcs 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: 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 soft_cursor testing current HEAD 17a87580a8856170d59aab302226811a4ae69149 testing commit 17a87580a8856170d59aab302226811a4ae69149 with gcc (GCC) 8.1.0 kernel signature: a25d7b2d17b7972be40f6d91a5d6233f1ea234ce43eb524842b5e5be93537ef0 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: slab-out-of-bounds 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: use-after-free Read in soft_cursor run #6: crashed: KASAN: slab-out-of-bounds Read in soft_cursor run #7: crashed: KASAN: slab-out-of-bounds Read in soft_cursor run #8: crashed: KASAN: slab-out-of-bounds Read in soft_cursor run #9: crashed: KASAN: use-after-free Read in soft_cursor revisions tested: 2, total time: 26m14.327363518s (build: 19m9.57217917s, test: 6m0.480126712s) the crash still happens on HEAD commit msg: Linux 4.19.133 crash: KASAN: use-after-free Read in soft_cursor IPv6: ADDRCONF(NETDEV_CHANGE): vxcan0: link becomes 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: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 ffff888094ba8751 by task syz-executor.2/7456 CPU: 0 PID: 7456 Comm: syz-executor.2 Not tainted 4.19.133-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+0xf60/0x1340 drivers/tty/vt/vt.c:1317 vc_resize+0x3d/0x60 drivers/tty/vt/vt.c:1337 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:00007fb242d53c78 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: 00007fb242d546d4 R13: 00000000004c6d62 R14: 00000000004dd350 R15: 00000000ffffffff Allocated by task 6561: 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] nlmsg_new include/net/netlink.h:511 [inline] netlink_ack+0x212/0xa50 net/netlink/af_netlink.c:2389 netlink_rcv_skb+0x2a8/0x3d0 net/netlink/af_netlink.c:2461 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 6561: 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 skb_free_datagram+0x12/0xc0 net/core/datagram.c:329 netlink_recvmsg+0x5e3/0xe60 net/netlink/af_netlink.c:1988 sock_recvmsg_nosec net/socket.c:795 [inline] sock_recvmsg+0xb7/0xf0 net/socket.c:802 __sys_recvfrom+0x327/0x3f0 net/socket.c:1844 __do_sys_recvfrom net/socket.c:1862 [inline] __se_sys_recvfrom net/socket.c:1858 [inline] __x64_sys_recvfrom+0xdc/0x1a0 net/socket.c:1858 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 ffff888094ba8580 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 465 bytes inside of 512-byte region [ffff888094ba8580, ffff888094ba8780) The buggy address belongs to the page: page:ffffea000252ea00 count:1 mapcount:0 mapping:ffff88812c29c940 index:0x0 flags: 0xfffe0000000100(slab) raw: 00fffe0000000100 ffffea000258f248 ffffea00027f2a48 ffff88812c29c940 raw: 0000000000000000 ffff888094ba8080 0000000100000006 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888094ba8600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888094ba8680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888094ba8700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888094ba8780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888094ba8800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================