================================================================== BUG: KASAN: slab-out-of-bounds in vcs_read_buf drivers/tty/vt/vc_screen.c:357 [inline] BUG: KASAN: slab-out-of-bounds in vcs_read+0xaa7/0xb40 drivers/tty/vt/vc_screen.c:449 Write of size 2 at addr ffff888091e15000 by task syz-executor.4/27163 CPU: 0 PID: 27163 Comm: syz-executor.4 Not tainted 5.9.0-rc2-next-20200825-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/0x497 mm/kasan/report.c:383 __kasan_report mm/kasan/report.c:513 [inline] kasan_report.cold+0x1f/0x37 mm/kasan/report.c:530 vcs_read_buf drivers/tty/vt/vc_screen.c:357 [inline] vcs_read+0xaa7/0xb40 drivers/tty/vt/vc_screen.c:449 vfs_read+0x1df/0x5a0 fs/read_write.c:479 ksys_read+0x12d/0x250 fs/read_write.c:607 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x45d579 Code: 5d b4 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 2b b4 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007fe9e4311c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000000 RAX: ffffffffffffffda RBX: 0000000000025e80 RCX: 000000000045d579 RDX: 0000000000002020 RSI: 00000000200001c0 RDI: 0000000000000003 RBP: 000000000118cf80 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000118cf4c R13: 00007fff31b7ff9f R14: 00007fe9e43129c0 R15: 000000000118cf4c Allocated by task 23112: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:48 kasan_set_track mm/kasan/common.c:56 [inline] __kasan_kmalloc.constprop.0+0xbf/0xd0 mm/kasan/common.c:461 slab_post_alloc_hook mm/slab.h:517 [inline] slab_alloc mm/slab.c:3312 [inline] kmem_cache_alloc+0x138/0x3a0 mm/slab.c:3482 kmem_cache_zalloc include/linux/slab.h:656 [inline] __kernfs_new_node+0xd4/0x880 fs/kernfs/dir.c:627 kernfs_new_node fs/kernfs/dir.c:689 [inline] kernfs_create_dir_ns+0x9c/0x220 fs/kernfs/dir.c:1026 sysfs_create_dir_ns+0x127/0x290 fs/sysfs/dir.c:59 create_dir lib/kobject.c:89 [inline] kobject_add_internal+0x2c3/0x940 lib/kobject.c:255 kobject_add_varg lib/kobject.c:390 [inline] kobject_add+0x150/0x1c0 lib/kobject.c:442 kobject_create_and_add+0x73/0xb0 lib/kobject.c:813 batadv_sysfs_add_hardif+0x30/0x120 net/batman-adv/sysfs.c:1233 batadv_hardif_add_interface net/batman-adv/hard-interface.c:920 [inline] batadv_hard_if_event+0xbd0/0x1340 net/batman-adv/hard-interface.c:1036 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] register_netdevice+0x100f/0x1540 net/core/dev.c:9860 ieee80211_if_add+0xe85/0x16c0 net/mac80211/iface.c:1965 ieee80211_register_hw+0x342c/0x39a0 net/mac80211/main.c:1293 mac80211_hwsim_new_radio+0x2353/0x4540 drivers/net/wireless/mac80211_hwsim.c:3183 hwsim_new_radio_nl+0x93e/0xf8c drivers/net/wireless/mac80211_hwsim.c:3744 genl_family_rcv_msg_doit net/netlink/genetlink.c:669 [inline] genl_family_rcv_msg net/netlink/genetlink.c:714 [inline] genl_rcv_msg+0x61d/0x980 net/netlink/genetlink.c:731 netlink_rcv_skb+0x15a/0x430 net/netlink/af_netlink.c:2470 genl_rcv+0x24/0x40 net/netlink/genetlink.c:742 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_sendmsg+0x6e8/0x810 net/socket.c:2353 ___sys_sendmsg+0xf3/0x170 net/socket.c:2407 __sys_sendmsg+0xe5/0x1b0 net/socket.c:2440 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 ffff888091e15040 which belongs to the cache kernfs_node_cache of size 168 The buggy address is located 64 bytes to the left of 168-byte region [ffff888091e15040, ffff888091e150e8) The buggy address belongs to the page: page:00000000aeeae655 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x91e15 flags: 0xfffe0000000200(slab) raw: 00fffe0000000200 ffffea00025b3208 ffffea0002a26e08 ffff88821bc47d00 raw: 0000000000000000 ffff888091e15040 0000000100000011 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888091e14f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888091e14f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888091e15000: fc fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00 ^ ffff888091e15080: 00 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc ffff888091e15100: fc fc fc fc fc 00 00 00 00 00 00 00 00 00 00 00 ==================================================================