================================================================== BUG: KASAN: slab-out-of-bounds in eth_header_parse_protocol+0xdc/0xe0 net/ethernet/eth.c:282 Read of size 2 at addr ffff88801331180b by task syz-executor.5/23971 CPU: 0 PID: 23971 Comm: syz-executor.5 Not tainted 5.12.0-rc6-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:79 [inline] dump_stack+0x141/0x1d7 lib/dump_stack.c:120 print_address_description.constprop.0.cold+0x5b/0x2f8 mm/kasan/report.c:232 __kasan_report mm/kasan/report.c:399 [inline] kasan_report.cold+0x7c/0xd8 mm/kasan/report.c:416 eth_header_parse_protocol+0xdc/0xe0 net/ethernet/eth.c:282 dev_parse_header_protocol include/linux/netdevice.h:3179 [inline] virtio_net_hdr_to_skb.constprop.0+0x99d/0xcd0 include/linux/virtio_net.h:83 packet_snd net/packet/af_packet.c:2994 [inline] packet_sendmsg+0x2325/0x52b0 net/packet/af_packet.c:3031 sock_sendmsg_nosec net/socket.c:654 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:674 sock_write_iter+0x289/0x3c0 net/socket.c:1001 call_write_iter include/linux/fs.h:1977 [inline] new_sync_write+0x426/0x650 fs/read_write.c:518 vfs_write+0x796/0xa30 fs/read_write.c:605 ksys_write+0x1ee/0x250 fs/read_write.c:658 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x466459 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fd39a185188 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 000000000056bf60 RCX: 0000000000466459 RDX: 000000000000fdef RSI: 0000000020000040 RDI: 0000000000000004 RBP: 00000000004bf9fb R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf60 R13: 00007fff7c670b1f R14: 00007fd39a185300 R15: 0000000000022000 Allocated by task 8411: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:427 [inline] __kasan_slab_alloc+0x75/0x90 mm/kasan/common.c:460 kasan_slab_alloc include/linux/kasan.h:223 [inline] slab_post_alloc_hook mm/slab.h:516 [inline] slab_alloc_node mm/slub.c:2907 [inline] slab_alloc mm/slub.c:2915 [inline] kmem_cache_alloc+0x155/0x370 mm/slub.c:2920 kmem_cache_zalloc include/linux/slab.h:674 [inline] __kernfs_new_node+0xd4/0x8b0 fs/kernfs/dir.c:626 kernfs_new_node+0x93/0x120 fs/kernfs/dir.c:688 __kernfs_create_file+0x51/0x350 fs/kernfs/file.c:985 sysfs_add_file_mode_ns+0x226/0x540 fs/sysfs/file.c:317 create_files fs/sysfs/group.c:64 [inline] internal_create_group+0x328/0xb20 fs/sysfs/group.c:149 internal_create_groups.part.0+0x90/0x140 fs/sysfs/group.c:189 internal_create_groups fs/sysfs/group.c:185 [inline] sysfs_create_groups+0x25/0x50 fs/sysfs/group.c:215 device_add_groups drivers/base/core.c:2332 [inline] device_add_attrs drivers/base/core.c:2480 [inline] device_add+0x824/0x1db0 drivers/base/core.c:3193 netdev_register_kobject+0x181/0x430 net/core/net-sysfs.c:1986 register_netdevice+0xd33/0x14a0 net/core/dev.c:10207 veth_newlink+0x53c/0xa00 drivers/net/veth.c:1411 __rtnl_newlink+0x1062/0x1710 net/core/rtnetlink.c:3443 rtnl_newlink+0x64/0xa0 net/core/rtnetlink.c:3491 rtnetlink_rcv_msg+0x44e/0xad0 net/core/rtnetlink.c:5553 netlink_rcv_skb+0x153/0x420 net/netlink/af_netlink.c:2502 netlink_unicast_kernel net/netlink/af_netlink.c:1312 [inline] netlink_unicast+0x533/0x7d0 net/netlink/af_netlink.c:1338 netlink_sendmsg+0x856/0xd90 net/netlink/af_netlink.c:1927 sock_sendmsg_nosec net/socket.c:654 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:674 __sys_sendto+0x21c/0x320 net/socket.c:1977 __do_sys_sendto net/socket.c:1989 [inline] __se_sys_sendto net/socket.c:1985 [inline] __x64_sys_sendto+0xdd/0x1b0 net/socket.c:1985 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xae The buggy address belongs to the object at ffff888013311740 which belongs to the cache kernfs_node_cache of size 168 The buggy address is located 35 bytes to the right of 168-byte region [ffff888013311740, ffff8880133117e8) The buggy address belongs to the page: page:ffffea00004cc440 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x13311 flags: 0xfff00000000200(slab) raw: 00fff00000000200 dead000000000100 dead000000000122 ffff8880105bd780 raw: 0000000000000000 0000000000110011 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888013311700: fc fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00 ffff888013311780: 00 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc >ffff888013311800: fc fc fc fc fc 00 00 00 00 00 00 00 00 00 00 00 ^ ffff888013311880: 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc ffff888013311900: fc fc 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================