================================================================== BUG: KASAN: slab-out-of-bounds in memcpy include/linux/string.h:406 [inline] BUG: KASAN: slab-out-of-bounds in soft_cursor+0x44b/0xa30 drivers/video/fbdev/core/softcursor.c:70 Read of size 2 at addr ffff88809566b140 by task syz-executor.3/19177 CPU: 0 PID: 19177 Comm: syz-executor.3 Not tainted 5.8.0-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+0x18f/0x20d lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xae/0x436 mm/kasan/report.c:383 __kasan_report mm/kasan/report.c:513 [inline] kasan_report.cold+0x1f/0x37 mm/kasan/report.c:530 check_memory_region_inline mm/kasan/generic.c:186 [inline] check_memory_region+0x13d/0x180 mm/kasan/generic.c:192 memcpy+0x20/0x60 mm/kasan/common.c:105 memcpy include/linux/string.h:406 [inline] soft_cursor+0x44b/0xa30 drivers/video/fbdev/core/softcursor.c:70 bit_cursor+0x1166/0x17d0 drivers/video/fbdev/core/bitblit.c:386 fbcon_cursor+0x537/0x660 drivers/video/fbdev/core/fbcon.c:1411 hide_cursor+0x85/0x280 drivers/tty/vt/vt.c:906 do_con_write+0x1843/0x1d70 drivers/tty/vt/vt.c:2881 con_write+0x22/0xb0 drivers/tty/vt/vt.c:3249 process_output_block drivers/tty/n_tty.c:595 [inline] n_tty_write+0x3ce/0xf80 drivers/tty/n_tty.c:2333 do_tty_write drivers/tty/tty_io.c:962 [inline] tty_write+0x4d9/0x870 drivers/tty/tty_io.c:1046 do_loop_readv_writev fs/read_write.c:737 [inline] do_loop_readv_writev fs/read_write.c:721 [inline] do_iter_write+0x489/0x670 fs/read_write.c:1020 vfs_writev+0x1aa/0x2e0 fs/read_write.c:1091 do_writev+0x139/0x300 fs/read_write.c:1134 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x45ce79 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:00007f6d95772c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000014 RAX: ffffffffffffffda RBX: 0000000000038d40 RCX: 000000000045ce79 RDX: 0000000000000001 RSI: 00000000200005c0 RDI: 0000000000000007 RBP: 000000000118bf60 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000118bf2c R13: 00007ffe936f890f R14: 00007f6d957739c0 R15: 000000000118bf2c Allocated by task 8266: save_stack+0x1b/0x40 mm/kasan/common.c:48 set_track mm/kasan/common.c:56 [inline] __kasan_kmalloc.constprop.0+0xc2/0xd0 mm/kasan/common.c:494 __do_kmalloc mm/slab.c:3656 [inline] __kmalloc+0x17a/0x340 mm/slab.c:3665 kmalloc include/linux/slab.h:560 [inline] fbcon_set_font+0x34f/0x8b0 drivers/video/fbdev/core/fbcon.c:2673 con_font_set drivers/tty/vt/vt.c:4662 [inline] con_font_op+0xd25/0x1110 drivers/tty/vt/vt.c:4727 vt_io_ioctl drivers/tty/vt/vt_ioctl.c:595 [inline] vt_ioctl+0x1be1/0x2c20 drivers/tty/vt/vt_ioctl.c:846 tty_ioctl+0x1019/0x15f0 drivers/tty/tty_io.c:2656 vfs_ioctl fs/ioctl.c:48 [inline] __do_sys_ioctl fs/ioctl.c:753 [inline] __se_sys_ioctl fs/ioctl.c:739 [inline] __x64_sys_ioctl+0x193/0x200 fs/ioctl.c:739 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Freed by task 7392: save_stack+0x1b/0x40 mm/kasan/common.c:48 set_track mm/kasan/common.c:56 [inline] kasan_set_free_info mm/kasan/common.c:316 [inline] __kasan_slab_free+0xf5/0x140 mm/kasan/common.c:455 __cache_free mm/slab.c:3426 [inline] kfree+0x103/0x2c0 mm/slab.c:3757 skb_free_head net/core/skbuff.c:590 [inline] skb_release_data+0x6d9/0x910 net/core/skbuff.c:610 skb_release_all net/core/skbuff.c:664 [inline] __kfree_skb net/core/skbuff.c:678 [inline] consume_skb net/core/skbuff.c:837 [inline] consume_skb+0xc2/0x160 net/core/skbuff.c:831 netlink_broadcast_filtered+0x35c/0xdc0 net/netlink/af_netlink.c:1514 netlink_broadcast net/netlink/af_netlink.c:1536 [inline] nlmsg_multicast include/net/netlink.h:1020 [inline] nlmsg_notify+0x90/0x250 net/netlink/af_netlink.c:2513 rtmsg_fib+0x3b7/0xdf0 net/ipv4/fib_semantics.c:531 fib_table_insert+0xaa5/0x1af0 net/ipv4/fib_trie.c:1352 fib_magic+0x3b9/0x520 net/ipv4/fib_frontend.c:1084 fib_add_ifaddr+0x493/0x520 net/ipv4/fib_frontend.c:1128 fib_netdev_event+0x488/0x670 net/ipv4/fib_frontend.c:1465 notifier_call_chain+0xb5/0x200 kernel/notifier.c:83 call_netdevice_notifiers_info+0xb5/0x130 net/core/dev.c:2033 call_netdevice_notifiers_extack net/core/dev.c:2045 [inline] call_netdevice_notifiers net/core/dev.c:2059 [inline] __dev_notify_flags+0x110/0x2b0 net/core/dev.c:8322 dev_change_flags+0x100/0x160 net/core/dev.c:8360 do_setlink+0x88b/0x3a70 net/core/rtnetlink.c:2706 __rtnl_newlink+0xc1c/0x1740 net/core/rtnetlink.c:3374 rtnl_newlink+0x64/0xa0 net/core/rtnetlink.c:3500 rtnetlink_rcv_msg+0x44e/0xad0 net/core/rtnetlink.c:5563 netlink_rcv_skb+0x15a/0x430 net/netlink/af_netlink.c:2470 netlink_unicast_kernel net/netlink/af_netlink.c:1304 [inline] netlink_unicast+0x533/0x7d0 net/netlink/af_netlink.c:1330 netlink_sendmsg+0x856/0xd90 net/netlink/af_netlink.c:1919 sock_sendmsg_nosec net/socket.c:651 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:671 __sys_sendto+0x21c/0x320 net/socket.c:1994 __do_sys_sendto net/socket.c:2006 [inline] __se_sys_sendto net/socket.c:2002 [inline] __x64_sys_sendto+0xdd/0x1b0 net/socket.c:2002 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 The buggy address belongs to the object at ffff88809566b000 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 320 bytes inside of 512-byte region [ffff88809566b000, ffff88809566b200) The buggy address belongs to the page: page:ffffea0002559ac0 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88809566bc00 flags: 0xfffe0000000200(slab) raw: 00fffe0000000200 ffffea0002876188 ffffea00027567c8 ffff8880aa040a80 raw: ffff88809566bc00 ffff88809566b000 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88809566b000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88809566b080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88809566b100: 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88809566b180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88809566b200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================