================================================================== BUG: KASAN: slab-out-of-bounds in memcpy include/linux/string.h:348 [inline] BUG: KASAN: slab-out-of-bounds in soft_cursor+0x439/0xa30 drivers/video/fbdev/core/softcursor.c:70 Read of size 4 at addr ffff8880952a1c34 by task syz-executor.1/18823 CPU: 0 PID: 18823 Comm: syz-executor.1 Not tainted 4.19.96-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+0x197/0x210 lib/dump_stack.c:118 print_address_description.cold+0x7c/0x20d mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report mm/kasan/report.c:412 [inline] kasan_report.cold+0x8c/0x2ba mm/kasan/report.c:396 check_memory_region_inline mm/kasan/kasan.c:260 [inline] check_memory_region+0x123/0x190 mm/kasan/kasan.c:267 memcpy+0x24/0x50 mm/kasan/kasan.c:302 memcpy include/linux/string.h:348 [inline] soft_cursor+0x439/0xa30 drivers/video/fbdev/core/softcursor.c:70 bit_cursor+0x12fc/0x1a60 drivers/video/fbdev/core/bitblit.c:386 fbcon_cursor+0x58a/0x7b0 drivers/video/fbdev/core/fbcon.c:1369 hide_cursor+0x9e/0x300 drivers/tty/vt/vt.c:895 putconsxy+0x1e/0xa0 drivers/tty/vt/vt.c:4609 vcs_write+0xba7/0xd50 drivers/tty/vt/vc_screen.c:547 __vfs_write+0x114/0x810 fs/read_write.c:485 vfs_write+0x20c/0x560 fs/read_write.c:549 ksys_write+0x14f/0x2d0 fs/read_write.c:599 __do_sys_write fs/read_write.c:611 [inline] __se_sys_write fs/read_write.c:608 [inline] __x64_sys_write+0x73/0xb0 fs/read_write.c:608 do_syscall_64+0xfd/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45aff9 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:00007f299e659c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f299e65a6d4 RCX: 000000000045aff9 RDX: 0000000000000005 RSI: 0000000020000080 RDI: 0000000000000003 RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 0000000000000c0f R14: 00000000004ccc11 R15: 000000000075bf2c Allocated by task 19234: save_stack+0x45/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc mm/kasan/kasan.c:553 [inline] kasan_kmalloc+0xce/0xf0 mm/kasan/kasan.c:531 __do_kmalloc mm/slab.c:3727 [inline] __kmalloc+0x15d/0x750 mm/slab.c:3736 kmalloc include/linux/slab.h:520 [inline] fbcon_set_font+0x32d/0x860 drivers/video/fbdev/core/fbcon.c:2641 con_font_set drivers/tty/vt/vt.c:4492 [inline] con_font_op+0xe18/0x1250 drivers/tty/vt/vt.c:4557 vt_ioctl+0xd2e/0x2530 drivers/tty/vt/vt_ioctl.c:913 tty_ioctl+0x7f3/0x1510 drivers/tty/tty_io.c:2669 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:501 [inline] do_vfs_ioctl+0xd5f/0x1380 fs/ioctl.c:688 ksys_ioctl+0xab/0xd0 fs/ioctl.c:705 __do_sys_ioctl fs/ioctl.c:712 [inline] __se_sys_ioctl fs/ioctl.c:710 [inline] __x64_sys_ioctl+0x73/0xb0 fs/ioctl.c:710 do_syscall_64+0xfd/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 18771: save_stack+0x45/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+0x99/0xc0 net/core/skbuff.c:554 skb_release_data+0x619/0x8d0 net/core/skbuff.c:574 skb_release_all+0x4d/0x60 net/core/skbuff.c:631 __kfree_skb net/core/skbuff.c:645 [inline] kfree_skb net/core/skbuff.c:663 [inline] kfree_skb+0xe8/0x390 net/core/skbuff.c:657 l2tp_ip6_recv+0x488/0xf00 net/l2tp/l2tp_ip6.c:225 ip6_input_finish+0x36f/0x17c0 net/ipv6/ip6_input.c:395 NF_HOOK include/linux/netfilter.h:289 [inline] NF_HOOK include/linux/netfilter.h:283 [inline] ip6_input+0xe4/0x3f0 net/ipv6/ip6_input.c:438 dst_input include/net/dst.h:453 [inline] ip6_rcv_finish+0x1de/0x2f0 net/ipv6/ip6_input.c:76 NF_HOOK include/linux/netfilter.h:289 [inline] NF_HOOK include/linux/netfilter.h:283 [inline] ipv6_rcv+0x119/0x430 net/ipv6/ip6_input.c:283 __netif_receive_skb_one_core+0x113/0x1a0 net/core/dev.c:4947 __netif_receive_skb+0x2c/0x1d0 net/core/dev.c:5059 process_backlog+0x23a/0x7a0 net/core/dev.c:5870 napi_poll net/core/dev.c:6293 [inline] net_rx_action+0x4f5/0x1070 net/core/dev.c:6359 __do_softirq+0x25c/0x921 kernel/softirq.c:292 The buggy address belongs to the object at ffff8880952a1a40 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 500 bytes inside of 512-byte region [ffff8880952a1a40, ffff8880952a1c40) The buggy address belongs to the page: page:ffffea000254a840 count:1 mapcount:0 mapping:ffff88812c31c940 index:0xffff8880952a1540 flags: 0xfffe0000000100(slab) raw: 00fffe0000000100 ffffea0001707a08 ffffea00024d9f08 ffff88812c31c940 raw: ffff8880952a1540 ffff8880952a1040 0000000100000003 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880952a1b00: 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc ffff8880952a1b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8880952a1c00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8880952a1c80: fc fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00 ffff8880952a1d00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================