================================================================== BUG: KASAN: use-after-free in eth_header_parse_protocol+0xad/0xd0 net/ethernet/eth.c:282 Read of size 2 at addr ffff8881f528000b by task syz-executor538/340 CPU: 0 PID: 340 Comm: syz-executor538 Not tainted 5.4.107-syzkaller-00750-g543ec4541c0e #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:0x43fbf9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 b1 14 00 00 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 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffeabe05138 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 0000000000400488 RCX: 000000000043fbf9 RDX: 000000000000054a RSI: 0000000020000200 RDI: 0000000000000003 RBP: 0000000000000000 R08: 00007ffeabe052d8 R09: 00007ffeabe052d8 R10: 00007ffeabe052d8 R11: 0000000000000246 R12: 0000000000403480 R13: 431bde82d7b634db R14: 00000000004ad018 R15: 0000000000400488 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] acpi_os_allocate_zeroed include/acpi/platform/aclinuxex.h:57 [inline] acpi_ds_create_walk_state+0xfc/0x2b0 drivers/acpi/acpica/dswstate.c:518 acpi_ds_call_control_method+0x137/0x684 drivers/acpi/acpica/dsmethod.c:498 acpi_ps_parse_aml+0x2ab/0x955 drivers/acpi/acpica/psparse.c:503 acpi_ps_execute_method+0x5a4/0x6e4 drivers/acpi/acpica/psxface.c:190 acpi_ns_evaluate+0x616/0x9c0 drivers/acpi/acpica/nseval.c:205 acpi_evaluate_object+0x590/0xac9 drivers/acpi/acpica/nsxfeval.c:354 acpi_evaluate_integer+0x124/0x240 drivers/acpi/utils.c:283 acpi_bus_get_status_handle drivers/acpi/bus.c:83 [inline] acpi_bus_get_status+0x13c/0x240 drivers/acpi/bus.c:112 acpi_add_single_object+0x14b/0x18c0 drivers/acpi/scan.c:1652 acpi_bus_check_add+0x454/0xeb0 drivers/acpi/scan.c:1898 acpi_ns_walk_namespace+0x246/0x4ab drivers/acpi/acpica/nswalk.c:230 acpi_walk_namespace+0xe8/0x117 drivers/acpi/acpica/nsxfeval.c:606 acpi_bus_scan+0xd1/0x150 drivers/acpi/scan.c:2079 acpi_scan_init+0x248/0x7e5 drivers/acpi/scan.c:2243 acpi_init+0x159/0x20c drivers/acpi/bus.c:1249 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 1: 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 acpi_ps_parse_aml+0x7c3/0x955 drivers/acpi/acpica/psparse.c:677 acpi_ps_execute_method+0x5a4/0x6e4 drivers/acpi/acpica/psxface.c:190 acpi_ns_evaluate+0x616/0x9c0 drivers/acpi/acpica/nseval.c:205 acpi_evaluate_object+0x590/0xac9 drivers/acpi/acpica/nsxfeval.c:354 acpi_evaluate_integer+0x124/0x240 drivers/acpi/utils.c:283 acpi_bus_get_status_handle drivers/acpi/bus.c:83 [inline] acpi_bus_get_status+0x13c/0x240 drivers/acpi/bus.c:112 acpi_add_single_object+0x14b/0x18c0 drivers/acpi/scan.c:1652 acpi_bus_check_add+0x454/0xeb0 drivers/acpi/scan.c:1898 acpi_ns_walk_namespace+0x246/0x4ab drivers/acpi/acpica/nswalk.c:230 acpi_walk_namespace+0xe8/0x117 drivers/acpi/acpica/nsxfeval.c:606 acpi_bus_scan+0xd1/0x150 drivers/acpi/scan.c:2079 acpi_scan_init+0x248/0x7e5 drivers/acpi/scan.c:2243 acpi_init+0x159/0x20c drivers/acpi/bus.c:1249 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 The buggy address belongs to the object at ffff8881f5280000 which belongs to the cache kmalloc-2k of size 2048 The buggy address is located 11 bytes inside of 2048-byte region [ffff8881f5280000, ffff8881f5280800) The buggy address belongs to the page: page:ffffea0007d4a000 refcount:1 mapcount:0 mapping:ffff8881f5c0c000 index:0x0 compound_mapcount: 0 flags: 0x8000000000010200(slab|head) raw: 8000000000010200 dead000000000100 dead000000000122 ffff8881f5c0c000 raw: 0000000000000000 0000000080080008 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8881f527ff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8881f527ff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8881f5280000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8881f5280080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8881f5280100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================