================================================================== BUG: KASAN: slab-out-of-bounds in __xdp_enqueue kernel/bpf/devmap.c:481 [inline] BUG: KASAN: slab-out-of-bounds in dev_map_enqueue+0x80/0x320 kernel/bpf/devmap.c:534 Read of size 8 at addr ffff0000c40200d0 by task ksoftirqd/0/15 CPU: 0 PID: 15 Comm: ksoftirqd/0 Not tainted 6.1.128-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/27/2024 Call trace: dump_backtrace+0x1c8/0x1f4 arch/arm64/kernel/stacktrace.c:158 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:316 [inline] print_report+0x174/0x4c0 mm/kasan/report.c:427 kasan_report+0xd4/0x130 mm/kasan/report.c:531 __asan_report_load8_noabort+0x2c/0x38 mm/kasan/report_generic.c:351 __xdp_enqueue kernel/bpf/devmap.c:481 [inline] dev_map_enqueue+0x80/0x320 kernel/bpf/devmap.c:534 __xdp_do_redirect_frame net/core/filter.c:4320 [inline] xdp_do_redirect+0x580/0x9d8 net/core/filter.c:4368 veth_xdp_rcv_skb drivers/net/veth.c:837 [inline] veth_xdp_rcv drivers/net/veth.c:931 [inline] veth_poll+0x1b68/0x3b48 drivers/net/veth.c:967 __napi_poll+0xb4/0x3f0 net/core/dev.c:6547 napi_poll net/core/dev.c:6614 [inline] net_rx_action+0x5cc/0xd3c net/core/dev.c:6728 handle_softirqs+0x318/0xd58 kernel/softirq.c:578 run_ksoftirqd+0x6c/0x29c kernel/softirq.c:945 smpboot_thread_fn+0x4b0/0x96c kernel/smpboot.c:164 kthread+0x250/0x2d8 kernel/kthread.c:376 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:864 Allocated by task 7565: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4c/0x80 mm/kasan/common.c:52 kasan_save_alloc_info+0x24/0x30 mm/kasan/generic.c:505 ____kasan_kmalloc mm/kasan/common.c:374 [inline] __kasan_kmalloc+0xac/0xc4 mm/kasan/common.c:383 kasan_kmalloc include/linux/kasan.h:211 [inline] __do_kmalloc_node mm/slab_common.c:936 [inline] __kmalloc_node_track_caller+0xd0/0x1c0 mm/slab_common.c:956 kmemdup+0x5c/0x98 mm/util.c:129 __ip_vs_lblc_init+0x74/0x22c net/netfilter/ipvs/ip_vs_lblc.c:558 ops_init+0x2e4/0x54c net/core/net_namespace.c:138 setup_net+0x46c/0xb88 net/core/net_namespace.c:336 copy_net_ns+0x2ec/0x58c net/core/net_namespace.c:508 create_new_namespaces+0x344/0x614 kernel/nsproxy.c:110 unshare_nsproxy_namespaces+0x108/0x158 kernel/nsproxy.c:226 ksys_unshare+0x424/0x7e4 kernel/fork.c:3201 __do_sys_unshare kernel/fork.c:3272 [inline] __se_sys_unshare kernel/fork.c:3270 [inline] __arm64_sys_unshare+0x3c/0x50 kernel/fork.c:3270 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2bc arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:140 do_el0_svc+0x58/0x13c arch/arm64/kernel/syscall.c:204 el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585 Last potentially related work creation: kasan_save_stack+0x40/0x70 mm/kasan/common.c:45 __kasan_record_aux_stack+0xcc/0xe8 mm/kasan/generic.c:486 kasan_record_aux_stack_noalloc+0x14/0x20 mm/kasan/generic.c:496 call_rcu+0xfc/0xa40 kernel/rcu/tree.c:2845 tnode_free net/ipv4/fib_trie.c:496 [inline] replace+0x218/0x52c net/ipv4/fib_trie.c:522 inflate net/ipv4/fib_trie.c:624 [inline] resize+0xe74/0x2498 net/ipv4/fib_trie.c:869 trie_rebalance net/ipv4/fib_trie.c:1106 [inline] fib_insert_node net/ipv4/fib_trie.c:1150 [inline] fib_insert_alias+0xb00/0xef0 net/ipv4/fib_trie.c:1164 fib_table_insert+0x624/0x1574 net/ipv4/fib_trie.c:1378 fib_magic net/ipv4/fib_frontend.c:1104 [inline] fib_add_ifaddr+0x368/0x122c net/ipv4/fib_frontend.c:1126 fib_inetaddr_event+0x124/0x2fc net/ipv4/fib_frontend.c:1440 notifier_call_chain kernel/notifier.c:87 [inline] blocking_notifier_call_chain+0xf0/0x198 kernel/notifier.c:382 __inet_insert_ifa+0x8ac/0xa8c net/ipv4/devinet.c:569 inet_rtm_newaddr+0xe74/0x1744 net/ipv4/devinet.c:971 rtnetlink_rcv_msg+0x72c/0xd94 net/core/rtnetlink.c:6150 netlink_rcv_skb+0x20c/0x3b8 net/netlink/af_netlink.c:2493 rtnetlink_rcv+0x28/0x38 net/core/rtnetlink.c:6168 netlink_unicast_kernel net/netlink/af_netlink.c:1311 [inline] netlink_unicast+0x65c/0x898 net/netlink/af_netlink.c:1337 netlink_sendmsg+0x834/0xb18 net/netlink/af_netlink.c:1859 sock_sendmsg_nosec net/socket.c:718 [inline] __sock_sendmsg net/socket.c:730 [inline] __sys_sendto+0x3b8/0x508 net/socket.c:2153 __do_sys_sendto net/socket.c:2165 [inline] __se_sys_sendto net/socket.c:2161 [inline] __arm64_sys_sendto+0xd8/0xf8 net/socket.c:2161 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2bc arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:140 do_el0_svc+0x58/0x13c arch/arm64/kernel/syscall.c:204 el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585 The buggy address belongs to the object at ffff0000c4020000 which belongs to the cache kmalloc-128 of size 128 The buggy address is located 80 bytes to the right of 128-byte region [ffff0000c4020000, ffff0000c4020080) The buggy address belongs to the physical page: page:00000000f67689b3 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x104020 flags: 0x5ffc00000000200(slab|node=0|zone=2|lastcpupid=0x7ff) raw: 05ffc00000000200 fffffc0003c7b340 dead000000000004 ffff0000c0002300 raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000c401ff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff0000c4020000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff0000c4020080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff0000c4020100: 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc ffff0000c4020180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== Unable to handle kernel paging request at virtual address dfff800000000047 KASAN: null-ptr-deref in range [0x0000000000000238-0x000000000000023f] Mem abort info: ESR = 0x0000000096000006 EC = 0x25: DABT (current EL), IL = 32 bits SET = 0, FnV = 0 EA = 0, S1PTW = 0 FSC = 0x06: level 2 translation fault Data abort info: ISV = 0, ISS = 0x00000006 CM = 0, WnR = 0 [dfff800000000047] address between user and kernel address ranges Internal error: Oops: 0000000096000006 [#1] PREEMPT SMP Modules linked in: CPU: 0 PID: 15 Comm: ksoftirqd/0 Tainted: G B 6.1.128-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/27/2024 pstate: 40400005 (nZcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : __xdp_enqueue kernel/bpf/devmap.c:481 [inline] pc : dev_map_enqueue+0x8c/0x320 kernel/bpf/devmap.c:534 lr : __xdp_enqueue kernel/bpf/devmap.c:481 [inline] lr : dev_map_enqueue+0x80/0x320 kernel/bpf/devmap.c:534 sp : ffff80001d247420 x29: ffff80001d247430 x28: ffff0000db2b4000 x27: ffff0001b3cf1f00 x26: ffff0000c8bfeb00 x25: 0000000000000019 x24: dfff800000000000 x23: 0000000000000238 x22: ffff0000c4020000 x21: ffff0000c4020000 x20: ffff0000d867b000 x19: ffff0000db2b4000 x18: 0000000000000140 x17: 0000000000000000 x16: ffff80001227ecc0 x15: 0000000000000000 x14: 00000000ffffffff x13: 0000000000000001 x12: 0000000000000001 x11: 0000000000ff0100 x10: 0000000000000000 x9 : 0000000000000000 x8 : 0000000000000047 x7 : 0000000000000001 x6 : 0000000000000001 x5 : ffff80001d246c38 x4 : ffff800015b731c0 x3 : ffff8000081a873c x2 : 0000000000000001 x1 : 0000000000000000 x0 : 0000000000000001 Call trace: __xdp_enqueue kernel/bpf/devmap.c:481 [inline] dev_map_enqueue+0x8c/0x320 kernel/bpf/devmap.c:534 __xdp_do_redirect_frame net/core/filter.c:4320 [inline] xdp_do_redirect+0x580/0x9d8 net/core/filter.c:4368 veth_xdp_rcv_skb drivers/net/veth.c:837 [inline] veth_xdp_rcv drivers/net/veth.c:931 [inline] veth_poll+0x1b68/0x3b48 drivers/net/veth.c:967 __napi_poll+0xb4/0x3f0 net/core/dev.c:6547 napi_poll net/core/dev.c:6614 [inline] net_rx_action+0x5cc/0xd3c net/core/dev.c:6728 handle_softirqs+0x318/0xd58 kernel/softirq.c:578 run_ksoftirqd+0x6c/0x29c kernel/softirq.c:945 smpboot_thread_fn+0x4b0/0x96c kernel/smpboot.c:164 kthread+0x250/0x2d8 kernel/kthread.c:376 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:864 Code: 940b46db f94002e8 9108e117 d343fee8 (38786908) ---[ end trace 0000000000000000 ]--- ---------------- Code disassembly (best guess): 0: 940b46db bl 0x2d1b6c 4: f94002e8 ldr x8, [x23] 8: 9108e117 add x23, x8, #0x238 c: d343fee8 lsr x8, x23, #3 * 10: 38786908 ldrb w8, [x8, x24] <-- trapping instruction