==================================================================
BUG: KASAN: use-after-free in dev_map_generic_redirect+0xa0/0x6b0 kernel/bpf/devmap.c:667
Read of size 8 at addr ffff888105fa9c80 by task kworker/u4:5/455
CPU: 0 PID: 455 Comm: kworker/u4:5 Not tainted 5.15.180-syzkaller-00024-g88c4075c39ed #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/19/2025
Workqueue: tipc_send tipc_conn_send_work
Call Trace:
__dump_stack+0x21/0x30 lib/dump_stack.c:88
dump_stack_lvl+0xee/0x150 lib/dump_stack.c:106
print_address_description+0x7f/0x2c0 mm/kasan/report.c:248
__kasan_report mm/kasan/report.c:427 [inline]
kasan_report+0xf1/0x140 mm/kasan/report.c:444
__asan_report_load8_noabort+0x14/0x20 mm/kasan/report_generic.c:309
dev_map_generic_redirect+0xa0/0x6b0 kernel/bpf/devmap.c:667
xdp_do_generic_redirect_map net/core/filter.c:4177 [inline]
xdp_do_generic_redirect+0x40e/0xa80 net/core/filter.c:4236
do_xdp_generic+0x516/0x7a0 net/core/dev.c:4950
__netif_receive_skb_core+0x12ac/0x2f10 net/core/dev.c:5355
__netif_receive_skb_one_core net/core/dev.c:5530 [inline]
__netif_receive_skb+0x72/0x280 net/core/dev.c:5646
process_backlog+0x368/0x600 net/core/dev.c:6523
__napi_poll+0xbe/0x590 net/core/dev.c:7082
napi_poll net/core/dev.c:7149 [inline]
net_rx_action+0x371/0x8e0 net/core/dev.c:7239
handle_softirqs+0x250/0x560 kernel/softirq.c:565
__do_softirq+0xb/0xd kernel/softirq.c:603
do_softirq+0xc6/0x120 kernel/softirq.c:452
netif_rx_ni+0x61/0x2a0 net/core/dev.c:5041
tipc_clone_to_loopback+0x39e/0x480 net/tipc/bearer.c:776
tipc_loopback_trace net/tipc/bearer.h:253 [inline]
tipc_topsrv_kern_evt net/tipc/topsrv.c:624 [inline]
tipc_conn_send_to_sock net/tipc/topsrv.c:285 [inline]
tipc_conn_send_work+0x67d/0x7e0 net/tipc/topsrv.c:305
process_one_work+0x6be/0xba0 kernel/workqueue.c:2325
worker_thread+0xa59/0x1200 kernel/workqueue.c:2472
kthread+0x411/0x500 kernel/kthread.c:337
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287
Allocated by task 1396:
kasan_save_stack mm/kasan/common.c:38 [inline]
kasan_set_track mm/kasan/common.c:45 [inline]
set_alloc_info mm/kasan/common.c:433 [inline]
____kasan_kmalloc mm/kasan/common.c:512 [inline]
__kasan_kmalloc+0xda/0x110 mm/kasan/common.c:521
kasan_kmalloc include/linux/kasan.h:227 [inline]
__kmalloc+0x13d/0x2c0 mm/slub.c:4431
__kmalloc_node include/linux/slab.h:484 [inline]
kmalloc_node include/linux/slab.h:639 [inline]
bpf_map_kmalloc_node+0xb9/0x140 kernel/bpf/syscall.c:432
__dev_map_alloc_node+0x5a/0x4d0 kernel/bpf/devmap.c:850
__dev_map_hash_update_elem kernel/bpf/devmap.c:959 [inline]
dev_map_hash_update_elem+0x2cd/0x710 kernel/bpf/devmap.c:993
bpf_map_update_value+0x30e/0x3e0 kernel/bpf/syscall.c:223
map_update_elem+0x5bb/0x740 kernel/bpf/syscall.c:1165
__sys_bpf+0x40c/0x730 kernel/bpf/syscall.c:4618
__do_sys_bpf kernel/bpf/syscall.c:4734 [inline]
__se_sys_bpf kernel/bpf/syscall.c:4732 [inline]
__x64_sys_bpf+0x7c/0x90 kernel/bpf/syscall.c:4732
x64_sys_call+0x4b9/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:322
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x66/0xd0
Freed by task 305:
kasan_save_stack mm/kasan/common.c:38 [inline]
kasan_set_track+0x4a/0x70 mm/kasan/common.c:45
kasan_set_free_info+0x23/0x40 mm/kasan/generic.c:370
____kasan_slab_free+0x125/0x160 mm/kasan/common.c:365
__kasan_slab_free+0x11/0x20 mm/kasan/common.c:373
kasan_slab_free include/linux/kasan.h:193 [inline]
slab_free_hook mm/slub.c:1723 [inline]
slab_free_freelist_hook+0xc2/0x190 mm/slub.c:1749
slab_free mm/slub.c:3521 [inline]
kfree+0xc4/0x270 mm/slub.c:4583
dev_map_free+0x397/0x6b0 kernel/bpf/devmap.c:221
bpf_map_free_deferred+0x10e/0x1e0 kernel/bpf/syscall.c:481
process_one_work+0x6be/0xba0 kernel/workqueue.c:2325
worker_thread+0xa59/0x1200 kernel/workqueue.c:2472
kthread+0x411/0x500 kernel/kthread.c:337
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287
The buggy address belongs to the object at ffff888105fa9c80
which belongs to the cache kmalloc-96 of size 96
The buggy address is located 0 bytes inside of
96-byte region [ffff888105fa9c80, ffff888105fa9ce0)
The buggy address belongs to the page:
page:ffffea000417ea40 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105fa9
flags: 0x4000000000000200(slab|zone=1)
raw: 4000000000000200 ffffea000453ec00 0000001a0000001a ffff888100042900
raw: 0000000000000000 0000000000200020 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x12cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY), pid 1, ts 1411700953, free_ts 0
set_page_owner include/linux/page_owner.h:33 [inline]
post_alloc_hook+0x192/0x1b0 mm/page_alloc.c:2605
prep_new_page+0x1c/0x110 mm/page_alloc.c:2611
get_page_from_freelist+0x2cc5/0x2d50 mm/page_alloc.c:4485
__alloc_pages+0x18f/0x440 mm/page_alloc.c:5781
alloc_slab_page mm/slub.c:-1 [inline]
allocate_slab mm/slub.c:1932 [inline]
new_slab+0xa1/0x4d0 mm/slub.c:1995
___slab_alloc+0x381/0x810 mm/slub.c:3028
__slab_alloc+0x49/0x90 mm/slub.c:3115
slab_alloc_node mm/slub.c:3206 [inline]
slab_alloc mm/slub.c:3250 [inline]
kmem_cache_alloc_trace+0x146/0x270 mm/slub.c:3267
kmalloc include/linux/slab.h:616 [inline]
kzalloc include/linux/slab.h:747 [inline]
acpi_os_allocate_zeroed include/acpi/platform/aclinuxex.h:57 [inline]
acpi_ut_evaluate_object+0xd8/0x4b0 drivers/acpi/acpica/uteval.c:50
acpi_ut_execute_power_methods+0x9b/0x1c0 drivers/acpi/acpica/uteval.c:288
acpi_get_object_info+0x523/0xfa0 drivers/acpi/acpica/nsxfname.c:356
acpi_set_pnp_ids drivers/acpi/scan.c:1326 [inline]
acpi_init_device_object+0x569/0x2580 drivers/acpi/scan.c:1751
acpi_add_single_object+0xee/0x16f0 drivers/acpi/scan.c:1797
acpi_bus_check_add+0x314/0x790 drivers/acpi/scan.c:2056
acpi_bus_check_add_1+0x22/0x30 drivers/acpi/scan.c:2072
acpi_ns_walk_namespace+0x23e/0x680 drivers/acpi/acpica/nswalk.c:-1
page_owner free stack trace missing
Memory state around the buggy address:
ffff888105fa9b80: fa fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc
ffff888105fa9c00: 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc
>ffff888105fa9c80: fa fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc
^
ffff888105fa9d00: fa fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc
ffff888105fa9d80: fa fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc
==================================================================