bisecting fixing commit since b0d4beaa5a4b7d31070c41c2e50740304a3f1138 building syzkaller on 98b4ef2d37d8a54ac96f1b117764446945e46505 testing commit b0d4beaa5a4b7d31070c41c2e50740304a3f1138 with gcc (GCC) 8.1.0 kernel signature: d29a5ca12f76454fa3e8f58a205baba9633986d506f0d1522115cd1ec795083b run #0: crashed: KASAN: slab-out-of-bounds Read in soft_cursor run #1: crashed: KASAN: slab-out-of-bounds Read in bit_putcs 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: slab-out-of-bounds Read in bit_putcs run #8: crashed: KASAN: slab-out-of-bounds Read in bit_putcs run #9: crashed: KASAN: slab-out-of-bounds Read in soft_cursor testing current HEAD b0c3ba31be3e45a130e13b278cf3b90f69bda6f6 testing commit b0c3ba31be3e45a130e13b278cf3b90f69bda6f6 with gcc (GCC) 8.1.0 kernel signature: 624b331e75a0c8deaf036cc637e752222d1ccdb71dc7c386b8396ca3ec725d13 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 bit_putcs run #4: crashed: KASAN: slab-out-of-bounds Read in bit_putcs run #5: crashed: KASAN: use-after-free Read in soft_cursor run #6: crashed: KASAN: slab-out-of-bounds Read in bit_putcs 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 revisions tested: 2, total time: 20m30.446998664s (build: 12m7.03417649s, test: 7m9.506861454s) the crash still happens on HEAD commit msg: Merge tag 'fsnotify_for_v5.7-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs crash: KASAN: slab-out-of-bounds Read in soft_cursor ================================================================== BUG: KASAN: slab-out-of-bounds in memcpy include/linux/string.h:381 [inline] BUG: KASAN: slab-out-of-bounds in soft_cursor+0x430/0xc70 drivers/video/fbdev/core/softcursor.c:70 Read of size 9 at addr ffff8880a8518051 by task syz-executor.2/7963 CPU: 1 PID: 7963 Comm: syz-executor.2 Not tainted 5.7.0-rc7-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+0x12d/0x187 lib/dump_stack.c:118 print_address_description.constprop.8.cold.10+0x9/0x41c mm/kasan/report.c:382 __kasan_report.cold.11+0x23/0x3a mm/kasan/report.c:511 kasan_report+0x38/0x50 mm/kasan/common.c:625 check_memory_region_inline mm/kasan/generic.c:186 [inline] check_memory_region+0x1cc/0x1f0 mm/kasan/generic.c:192 memcpy+0x23/0x60 mm/kasan/common.c:106 memcpy include/linux/string.h:381 [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+0x3db/0x570 drivers/video/fbdev/core/fbcon.c:1411 hide_cursor+0x75/0x230 drivers/tty/vt/vt.c:902 redraw_screen+0x4ec/0x730 drivers/tty/vt/vt.c:1006 vc_do_resize+0xeec/0x12b0 drivers/tty/vt/vt.c:1314 vc_resize+0x3d/0x60 drivers/tty/vt/vt.c:1334 vt_ioctl+0x1010/0x24c0 drivers/tty/vt/vt_ioctl.c:901 tty_ioctl+0x45b/0x12f0 drivers/tty/tty_io.c:2656 vfs_ioctl fs/ioctl.c:47 [inline] ksys_ioctl+0xc1/0x110 fs/ioctl.c:771 __do_sys_ioctl fs/ioctl.c:780 [inline] __se_sys_ioctl fs/ioctl.c:778 [inline] __x64_sys_ioctl+0x6e/0xb0 fs/ioctl.c:778 do_syscall_64+0xca/0x630 arch/x86/entry/common.c:295 entry_SYSCALL_64_after_hwframe+0x49/0xb3 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:00007f599527ac78 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: 00007f599527b6d4 R13: 00000000004c6ce2 R14: 00000000004dd2d0 R15: 00000000ffffffff Allocated by task 7718: save_stack+0x21/0x50 mm/kasan/common.c:49 set_track mm/kasan/common.c:57 [inline] __kasan_kmalloc.constprop.17+0xc7/0xd0 mm/kasan/common.c:495 kasan_slab_alloc+0x12/0x20 mm/kasan/common.c:503 slab_post_alloc_hook mm/slab.h:586 [inline] slab_alloc mm/slab.c:3320 [inline] kmem_cache_alloc+0x121/0x760 mm/slab.c:3484 getname_kernel+0x4e/0x330 fs/namei.c:218 call_usermodehelper_exec_async+0x4f1/0x690 kernel/umh.c:112 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:351 Freed by task 7718: save_stack+0x21/0x50 mm/kasan/common.c:49 set_track mm/kasan/common.c:57 [inline] kasan_set_free_info mm/kasan/common.c:317 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/common.c:456 kasan_slab_free+0xe/0x10 mm/kasan/common.c:465 __cache_free mm/slab.c:3426 [inline] kmem_cache_free+0x83/0x320 mm/slab.c:3694 putname+0xa8/0xe0 fs/namei.c:259 __do_execve_file.isra.32+0x25f/0x2300 fs/exec.c:1918 do_execveat_common fs/exec.c:1927 [inline] do_execve+0x20/0x30 fs/exec.c:1944 call_usermodehelper_exec_async+0x4ff/0x690 kernel/umh.c:112 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:351 The buggy address belongs to the object at ffff8880a8518a00 which belongs to the cache names_cache of size 4096 The buggy address is located 2479 bytes to the left of 4096-byte region [ffff8880a8518a00, ffff8880a8519a00) The buggy address belongs to the page: page:ffffea0002a14600 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 head:ffffea0002a14600 order:1 compound_mapcount:0 flags: 0xfffe0000010200(slab|head) raw: 00fffe0000010200 ffffea0002271e88 ffffea000245ea08 ffff8880aa604700 raw: 0000000000000000 ffff8880a8518a00 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a8517f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880a8517f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8880a8518000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8880a8518080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880a8518100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================