================================================================== BUG: KASAN: slab-out-of-bounds in eth_header_parse_protocol+0xad/0xd0 net/ethernet/eth.c:282 Read of size 2 at addr ffff8881e9a0080b by task syz-executor.5/895 CPU: 0 PID: 895 Comm: syz-executor.5 Not tainted 5.4.111-syzkaller-00141-gce6a5172613f #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+0x1d8/0x24e lib/dump_stack.c:118 print_address_description+0x9b/0x650 mm/kasan/report.c:384 __kasan_report+0x182/0x260 mm/kasan/report.c:516 kasan_report+0x30/0x60 mm/kasan/common.c:641 eth_header_parse_protocol+0xad/0xd0 net/ethernet/eth.c:282 dev_parse_header_protocol include/linux/netdevice.h:3016 [inline] virtio_net_hdr_to_skb+0x6de/0xd70 include/linux/virtio_net.h:83 packet_snd net/packet/af_packet.c:2976 [inline] packet_sendmsg+0x483a/0x6780 net/packet/af_packet.c:3013 sock_sendmsg_nosec net/socket.c:638 [inline] sock_sendmsg net/socket.c:658 [inline] sock_write_iter+0x330/0x450 net/socket.c:990 vfs_write+0x212/0x4e0 fs/read_write.c:558 do_syscall_64+0xcb/0x1e0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x44/0xa9 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 RAX: ffffffffffffffda RBX: 000000000056bf60 RCX: 0000000000466459 RDX: 0000000000000122 RSI: 0000000020000400 RDI: 0000000000000003 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf60 R13: 00007fff2f22d9bf R14: 00007f6dbb967300 R15: 0000000000022000 save_stack mm/kasan/common.c:70 [inline] set_track mm/kasan/common.c:78 [inline] __kasan_kmalloc+0x137/0x1e0 mm/kasan/common.c:517 slab_post_alloc_hook mm/slab.h:584 [inline] slab_alloc_node mm/slub.c:2821 [inline] slab_alloc mm/slub.c:2829 [inline] kmem_cache_alloc+0x115/0x290 mm/slub.c:2834 kmem_cache_zalloc include/linux/slab.h:680 [inline] __kernfs_new_node+0xdb/0x6d0 fs/kernfs/dir.c:631 kernfs_new_node+0x95/0x160 fs/kernfs/dir.c:697 __kernfs_create_file+0x45/0x260 fs/kernfs/file.c:1001 sysfs_add_file_mode_ns+0x293/0x340 fs/sysfs/file.c:306 create_files fs/sysfs/group.c:63 [inline] internal_create_group+0x560/0xf10 fs/sysfs/group.c:148 internal_create_groups fs/sysfs/group.c:188 [inline] sysfs_create_groups+0x5d/0x130 fs/sysfs/group.c:214 device_add_groups drivers/base/core.c:1995 [inline] device_add_attrs drivers/base/core.c:2154 [inline] device_add+0xae5/0x18a0 drivers/base/core.c:2850 netdev_register_kobject+0x178/0x310 net/core/net-sysfs.c:1796 register_netdevice+0xbc7/0x1480 net/core/dev.c:9138 veth_newlink+0x678/0xaf0 drivers/net/veth.c:1301 __rtnl_newlink net/core/rtnetlink.c:3227 [inline] rtnl_newlink+0x1558/0x1ce0 net/core/rtnetlink.c:3286 rtnetlink_rcv_msg+0xb74/0xd00 net/core/rtnetlink.c:5255 netlink_rcv_skb+0x200/0x480 net/netlink/af_netlink.c:2478 netlink_unicast_kernel net/netlink/af_netlink.c:1303 [inline] netlink_unicast+0x865/0x9f0 net/netlink/af_netlink.c:1329 netlink_sendmsg+0x9ab/0xd40 net/netlink/af_netlink.c:1918 sock_sendmsg_nosec net/socket.c:638 [inline] sock_sendmsg net/socket.c:658 [inline] __sys_sendto+0x4f1/0x6c0 net/socket.c:1953 __do_sys_sendto net/socket.c:1965 [inline] __se_sys_sendto net/socket.c:1961 [inline] __x64_sys_sendto+0xda/0xf0 net/socket.c:1961 do_syscall_64+0xcb/0x1e0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Freed by task 0: (stack is not available) The buggy address belongs to the object at ffff8881e9a00780 which belongs to the cache kernfs_node_cache of size 128 The buggy address is located 11 bytes to the right of 128-byte region [ffff8881e9a00780, ffff8881e9a00800) The buggy address belongs to the page: page:ffffea0007a68000 refcount:1 mapcount:0 mapping:ffff8881f5cfa280 index:0x0 flags: 0x8000000000000200(slab) raw: 8000000000000200 dead000000000100 dead000000000122 ffff8881f5cfa280 raw: 0000000000000000 0000000000150015 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8881e9a00700: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc ffff8881e9a00780: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8881e9a00800: fc fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00 ^ ffff8881e9a00880: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc ffff8881e9a00900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================