bisecting fixing commit since fbc5fe7a54d02e11972e3b2a5ddb6ffc88162c8f building syzkaller on 0ecb9746a701be4544b845514a31a21cce92cc79 testing commit fbc5fe7a54d02e11972e3b2a5ddb6ffc88162c8f with gcc (GCC) 8.1.0 kernel signature: 6de6eb877d3b3787b89e0e39f3919a849863f24fe64cad91e44cf1127bebab92 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: 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 testing current HEAD e0f8b8a65a473a8baa439cf865a694bbeb83fe90 testing commit e0f8b8a65a473a8baa439cf865a694bbeb83fe90 with gcc (GCC) 8.1.0 kernel signature: 473fb23b81422831893abf8d33b6a4eb1589bcf47bf855f85d6adf3e60edfc25 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: 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: 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: 24m6.17544137s (build: 16m56.167062694s, test: 6m18.468152929s) the crash still happens on HEAD commit msg: Linux 4.14.170 crash: KASAN: use-after-free Read in soft_cursor IPv6: ADDRCONF(NETDEV_CHANGE): veth1_to_team: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): team_slave_1: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): veth1_to_hsr: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): hsr_slave_1: link becomes 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 ffff88809b7fc451 by task syz-executor.2/7356 CPU: 0 PID: 7356 Comm: syz-executor.2 Not tainted 4.14.170-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:00007f5d69222c78 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: 00007f5d692236d4 R13: 00000000004c6ce2 R14: 00000000004dd2d0 R15: 00000000ffffffff Allocated by task 7324: 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 __do_kmalloc_node mm/slab.c:3682 [inline] __kmalloc_node_track_caller+0x50/0x70 mm/slab.c:3696 __kmalloc_reserve.isra.38+0x2c/0xc0 net/core/skbuff.c:137 __alloc_skb+0xc1/0x500 net/core/skbuff.c:205 alloc_skb include/linux/skbuff.h:980 [inline] netlink_alloc_large_skb net/netlink/af_netlink.c:1158 [inline] netlink_sendmsg+0x7c4/0xbd0 net/netlink/af_netlink.c:1852 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 7324: 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] kfree+0xcc/0x270 mm/slab.c:3815 skb_free_head+0x74/0x90 net/core/skbuff.c:554 skb_release_data+0x4d3/0x860 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+0x84/0x2a0 net/core/skbuff.c:705 netlink_unicast_kernel net/netlink/af_netlink.c:1287 [inline] netlink_unicast+0x413/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 ffff88809b7fc280 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 465 bytes inside of 512-byte region [ffff88809b7fc280, ffff88809b7fc480) The buggy address belongs to the page: page:ffffea00026dff00 count:1 mapcount:0 mapping:ffff88809b7fc000 index:0x0 flags: 0xfffe0000000100(slab) raw: 00fffe0000000100 ffff88809b7fc000 0000000000000000 0000000100000006 raw: ffffea000263eea0 ffffea00025b7120 ffff8880aa800940 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88809b7fc300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88809b7fc380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88809b7fc400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88809b7fc480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88809b7fc500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================