================================================================== BUG: KASAN: use-after-free in eth_header_parse_protocol+0xad/0xd0 net/ethernet/eth.c:282 Read of size 2 at addr ffff8881e134d00b by task syz-executor.4/11579 CPU: 0 PID: 11579 Comm: syz-executor.4 Not tainted 5.4.110-syzkaller-00108-g2c6775a89bc1 #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:2984 [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:00007f0cf8afe188 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 000000000056bf60 RCX: 0000000000466459 RDX: 000000000000fdef RSI: 0000000020000840 RDI: 0000000000000005 RBP: 00000000004bf9fb R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf60 R13: 00007ffd8204065f R14: 00007f0cf8afe300 R15: 0000000000022000 Allocated by task 10625: 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 __kmalloc+0x174/0x2f0 mm/slub.c:3903 kmalloc include/linux/slab.h:561 [inline] kzalloc+0x16/0x20 include/linux/slab.h:690 ops_init+0x81/0x340 net/core/net_namespace.c:127 setup_net+0x21b/0xa70 net/core/net_namespace.c:335 copy_net_ns+0x2cf/0x470 net/core/net_namespace.c:476 create_new_namespaces+0x442/0x610 kernel/nsproxy.c:103 unshare_nsproxy_namespaces+0x11e/0x180 kernel/nsproxy.c:202 ksys_unshare+0x52b/0xa20 kernel/fork.c:2896 __do_sys_unshare kernel/fork.c:2964 [inline] __se_sys_unshare kernel/fork.c:2962 [inline] __x64_sys_unshare+0x34/0x40 kernel/fork.c:2962 do_syscall_64+0xcb/0x1e0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Freed by task 4408: save_stack mm/kasan/common.c:70 [inline] set_track mm/kasan/common.c:78 [inline] kasan_set_free_info mm/kasan/common.c:333 [inline] __kasan_slab_free+0x18a/0x240 mm/kasan/common.c:475 slab_free_hook mm/slub.c:1454 [inline] slab_free_freelist_hook+0x7b/0x150 mm/slub.c:1492 slab_free mm/slub.c:3072 [inline] kfree+0xe0/0x660 mm/slub.c:4061 ops_free net/core/net_namespace.c:151 [inline] ops_free_list net/core/net_namespace.c:184 [inline] cleanup_net+0x948/0xd20 net/core/net_namespace.c:601 process_one_work+0x679/0x1030 kernel/workqueue.c:2277 worker_thread+0xa6f/0x1400 kernel/workqueue.c:2423 kthread+0x30f/0x330 kernel/kthread.c:268 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:352 The buggy address belongs to the object at ffff8881e134c000 which belongs to the cache kmalloc-8k of size 8192 The buggy address is located 4107 bytes inside of 8192-byte region [ffff8881e134c000, ffff8881e134e000) The buggy address belongs to the page: page:ffffea000784d200 refcount:1 mapcount:0 mapping:ffff8881f5c0c500 index:0xffff8881e134c000 compound_mapcount: 0 flags: 0x8000000000010200(slab|head) raw: 8000000000010200 ffffea00077ee008 ffffea000688c408 ffff8881f5c0c500 raw: ffff8881e134c000 0000000000020001 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8881e134cf00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8881e134cf80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8881e134d000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8881e134d080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8881e134d100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================