================================================================== BUG: KASAN: slab-out-of-bounds in eth_header_parse_protocol+0xad/0xd0 net/ethernet/eth.c:282 Read of size 2 at addr ffff8881f4d2f40b by task syz-executor.1/6714 CPU: 1 PID: 6714 Comm: syz-executor.1 Not tainted 5.4.111-syzkaller-00139-ga5dcde058bc3 #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 call_write_iter include/linux/fs.h:1971 [inline] new_sync_write fs/read_write.c:483 [inline] __vfs_write+0x5ec/0x780 fs/read_write.c:496 vfs_write+0x212/0x4e0 fs/read_write.c:558 ksys_write+0x186/0x2b0 fs/read_write.c:611 do_syscall_64+0xcb/0x1e0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x44/0xa9 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:00007fc6a0204188 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 000000000056bf60 RCX: 0000000000466459 RDX: 0000000000000033 RSI: 0000000020000100 RDI: 0000000000000003 RBP: 00000000004bf9fb R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf60 R13: 00007ffcfd81fdff R14: 00007fc6a0204300 R15: 0000000000022000 Allocated by task 1: 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 kmem_cache_alloc_trace+0x139/0x2b0 mm/slub.c:2848 kmalloc include/linux/slab.h:556 [inline] kzalloc include/linux/slab.h:690 [inline] __class_register+0x53/0x310 drivers/base/class.c:159 __class_create+0xb9/0x100 drivers/base/class.c:241 bt_sysfs_init+0x1d/0x2f net/bluetooth/hci_sysfs.c:108 bt_init+0x36/0x11a net/bluetooth/af_bluetooth.c:736 do_one_initcall+0x1d3/0x6b0 init/main.c:1203 do_initcall_level+0x101/0x256 init/main.c:1270 do_initcalls+0x4b/0x8c init/main.c:1286 kernel_init_freeable+0x260/0x3eb init/main.c:1467 kernel_init+0xd/0x3a0 init/main.c:1384 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:352 Freed by task 0: (stack is not available) The buggy address belongs to the object at ffff8881f4d2f000 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 11 bytes to the right of 1024-byte region [ffff8881f4d2f000, ffff8881f4d2f400) The buggy address belongs to the page: page:ffffea0007d34a00 refcount:1 mapcount:0 mapping:ffff8881f5c02280 index:0xffff8881f4d2c000 compound_mapcount: 0 flags: 0x8000000000010200(slab|head) raw: 8000000000010200 ffffea0007b56808 ffffea0007d7dc08 ffff8881f5c02280 raw: ffff8881f4d2c000 000000000010000f 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8881f4d2f300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8881f4d2f380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8881f4d2f400: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8881f4d2f480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8881f4d2f500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================