================================================================== BUG: KASAN: slab-out-of-bounds in do_csum+0x44/0x254 arch/arm64/lib/csum.c:39 Read of size 4294967236 at addr ffff00012993183c by task syz-executor.0/14161 CPU: 1 PID: 14161 Comm: syz-executor.0 Not tainted 6.5.0-rc7-syzkaller-gfe4469582053 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/26/2023 Call trace: dump_backtrace+0x1b8/0x1e4 arch/arm64/kernel/stacktrace.c:233 show_stack+0x2c/0x44 arch/arm64/kernel/stacktrace.c:240 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd0/0x124 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:364 [inline] print_report+0x174/0x514 mm/kasan/report.c:475 kasan_report+0xd8/0x138 mm/kasan/report.c:588 kasan_check_range+0x254/0x294 mm/kasan/generic.c:187 __kasan_check_read+0x20/0x30 mm/kasan/shadow.c:31 do_csum+0x44/0x254 arch/arm64/lib/csum.c:39 csum_partial+0x30/0x58 lib/checksum.c:128 gso_make_checksum include/net/gso.h:74 [inline] __udp_gso_segment+0xba4/0x1c98 net/ipv4/udp_offload.c:340 udp4_ufo_fragment+0x3c8/0x6f8 net/ipv4/udp_offload.c:399 inet_gso_segment+0x4f0/0x1118 net/ipv4/af_inet.c:1398 skb_mac_gso_segment+0x2d0/0x5bc net/core/gso.c:53 __skb_gso_segment+0x250/0x3cc net/core/gso.c:124 skb_gso_segment include/net/gso.h:83 [inline] netem_segment net/sched/sch_netem.c:419 [inline] netem_enqueue+0x8c0/0x2c80 net/sched/sch_netem.c:497 dev_qdisc_enqueue+0x60/0x35c net/core/dev.c:3732 __dev_xmit_skb net/core/dev.c:3821 [inline] __dev_queue_xmit+0xb24/0x3318 net/core/dev.c:4169 dev_queue_xmit include/linux/netdevice.h:3088 [inline] packet_xmit+0x6c/0x318 net/packet/af_packet.c:276 packet_snd net/packet/af_packet.c:3085 [inline] packet_sendmsg+0x376c/0x4c98 net/packet/af_packet.c:3117 sock_sendmsg_nosec net/socket.c:725 [inline] sock_sendmsg net/socket.c:748 [inline] __sys_sendto+0x3bc/0x540 net/socket.c:2134 __do_sys_sendto net/socket.c:2146 [inline] __se_sys_sendto net/socket.c:2142 [inline] __arm64_sys_sendto+0xd8/0xf8 net/socket.c:2142 __invoke_syscall arch/arm64/kernel/syscall.c:37 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:51 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:136 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:155 el0_svc+0x58/0x16c arch/arm64/kernel/entry-common.c:678 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:696 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:591 Allocated by task 14161: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4c/0x7c mm/kasan/common.c:52 kasan_save_alloc_info+0x24/0x30 mm/kasan/generic.c:511 ____kasan_kmalloc mm/kasan/common.c:374 [inline] __kasan_kmalloc+0xac/0xc4 mm/kasan/common.c:383 kasan_kmalloc include/linux/kasan.h:196 [inline] __do_kmalloc_node mm/slab_common.c:985 [inline] __kmalloc_node_track_caller+0xd0/0x1c0 mm/slab_common.c:1005 kmalloc_reserve+0x120/0x240 net/core/skbuff.c:575 __alloc_skb+0x1c8/0x3d8 net/core/skbuff.c:644 skb_segment+0xa80/0x32ec net/core/skbuff.c:4512 __udp_gso_segment+0x344/0x1c98 net/ipv4/udp_offload.c:298 udp4_ufo_fragment+0x3c8/0x6f8 net/ipv4/udp_offload.c:399 inet_gso_segment+0x4f0/0x1118 net/ipv4/af_inet.c:1398 skb_mac_gso_segment+0x2d0/0x5bc net/core/gso.c:53 __skb_gso_segment+0x250/0x3cc net/core/gso.c:124 skb_gso_segment include/net/gso.h:83 [inline] netem_segment net/sched/sch_netem.c:419 [inline] netem_enqueue+0x8c0/0x2c80 net/sched/sch_netem.c:497 dev_qdisc_enqueue+0x60/0x35c net/core/dev.c:3732 __dev_xmit_skb net/core/dev.c:3821 [inline] __dev_queue_xmit+0xb24/0x3318 net/core/dev.c:4169 dev_queue_xmit include/linux/netdevice.h:3088 [inline] packet_xmit+0x6c/0x318 net/packet/af_packet.c:276 packet_snd net/packet/af_packet.c:3085 [inline] packet_sendmsg+0x376c/0x4c98 net/packet/af_packet.c:3117 sock_sendmsg_nosec net/socket.c:725 [inline] sock_sendmsg net/socket.c:748 [inline] __sys_sendto+0x3bc/0x540 net/socket.c:2134 __do_sys_sendto net/socket.c:2146 [inline] __se_sys_sendto net/socket.c:2142 [inline] __arm64_sys_sendto+0xd8/0xf8 net/socket.c:2142 __invoke_syscall arch/arm64/kernel/syscall.c:37 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:51 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:136 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:155 el0_svc+0x58/0x16c arch/arm64/kernel/entry-common.c:678 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:696 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:591 Last potentially related work creation: kasan_save_stack+0x40/0x6c mm/kasan/common.c:45 __kasan_record_aux_stack+0xcc/0xe8 mm/kasan/generic.c:492 kasan_record_aux_stack_noalloc+0x14/0x20 mm/kasan/generic.c:502 kvfree_call_rcu+0xac/0x674 kernel/rcu/tree.c:3368 neigh_destroy+0x474/0x6b4 net/core/neighbour.c:910 neigh_release include/net/neighbour.h:447 [inline] neigh_cleanup_and_release+0x138/0x37c net/core/neighbour.c:103 neigh_periodic_work+0x488/0xae0 net/core/neighbour.c:994 process_one_work+0x800/0x1480 kernel/workqueue.c:2600 worker_thread+0x8e0/0xfe8 kernel/workqueue.c:2751 kthread+0x288/0x310 kernel/kthread.c:389 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:853 The buggy address belongs to the object at ffff000129931800 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 60 bytes inside of allocated 1024-byte region [ffff000129931800, ffff000129931c00) The buggy address belongs to the physical page: page:00000000102a893a refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x169930 head:00000000102a893a order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0x5ffc00000010200(slab|head|node=0|zone=2|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 05ffc00000010200 ffff0000c0001dc0 fffffc0003645400 dead000000000002 raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff000129931b00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff000129931b80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff000129931c00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff000129931c80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff000129931d00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== ================================================================================ UBSAN: shift-out-of-bounds in arch/arm64/lib/csum.c:116:15 shift exponent 512 is too large for 64-bit type 'u64' (aka 'unsigned long long') CPU: 1 PID: 14161 Comm: syz-executor.0 Tainted: G B 6.5.0-rc7-syzkaller-gfe4469582053 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/26/2023 Call trace: dump_backtrace+0x1b8/0x1e4 arch/arm64/kernel/stacktrace.c:233 show_stack+0x2c/0x44 arch/arm64/kernel/stacktrace.c:240 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd0/0x124 lib/dump_stack.c:106 dump_stack+0x1c/0x28 lib/dump_stack.c:113 ubsan_epilogue lib/ubsan.c:217 [inline] __ubsan_handle_shift_out_of_bounds+0x2f4/0x36c lib/ubsan.c:387 do_csum+0x238/0x254 arch/arm64/lib/csum.c:116 csum_partial+0x30/0x58 lib/checksum.c:128 gso_make_checksum include/net/gso.h:74 [inline] __udp_gso_segment+0xba4/0x1c98 net/ipv4/udp_offload.c:340 udp4_ufo_fragment+0x3c8/0x6f8 net/ipv4/udp_offload.c:399 inet_gso_segment+0x4f0/0x1118 net/ipv4/af_inet.c:1398 skb_mac_gso_segment+0x2d0/0x5bc net/core/gso.c:53 __skb_gso_segment+0x250/0x3cc net/core/gso.c:124 skb_gso_segment include/net/gso.h:83 [inline] netem_segment net/sched/sch_netem.c:419 [inline] netem_enqueue+0x8c0/0x2c80 net/sched/sch_netem.c:497 dev_qdisc_enqueue+0x60/0x35c net/core/dev.c:3732 __dev_xmit_skb net/core/dev.c:3821 [inline] __dev_queue_xmit+0xb24/0x3318 net/core/dev.c:4169 dev_queue_xmit include/linux/netdevice.h:3088 [inline] packet_xmit+0x6c/0x318 net/packet/af_packet.c:276 packet_snd net/packet/af_packet.c:3085 [inline] packet_sendmsg+0x376c/0x4c98 net/packet/af_packet.c:3117 sock_sendmsg_nosec net/socket.c:725 [inline] sock_sendmsg net/socket.c:748 [inline] __sys_sendto+0x3bc/0x540 net/socket.c:2134 __do_sys_sendto net/socket.c:2146 [inline] __se_sys_sendto net/socket.c:2142 [inline] __arm64_sys_sendto+0xd8/0xf8 net/socket.c:2142 __invoke_syscall arch/arm64/kernel/syscall.c:37 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:51 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:136 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:155 el0_svc+0x58/0x16c arch/arm64/kernel/entry-common.c:678 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:696 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:591 ================================================================================ ================================================================================ UBSAN: shift-out-of-bounds in arch/arm64/lib/csum.c:116:25 shift exponent 512 is too large for 64-bit type 'u64' (aka 'unsigned long long') CPU: 1 PID: 14161 Comm: syz-executor.0 Tainted: G B 6.5.0-rc7-syzkaller-gfe4469582053 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/26/2023 Call trace: dump_backtrace+0x1b8/0x1e4 arch/arm64/kernel/stacktrace.c:233 show_stack+0x2c/0x44 arch/arm64/kernel/stacktrace.c:240 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd0/0x124 lib/dump_stack.c:106 dump_stack+0x1c/0x28 lib/dump_stack.c:113 ubsan_epilogue lib/ubsan.c:217 [inline] __ubsan_handle_shift_out_of_bounds+0x2f4/0x36c lib/ubsan.c:387 do_csum+0x250/0x254 arch/arm64/lib/csum.c:116 csum_partial+0x30/0x58 lib/checksum.c:128 gso_make_checksum include/net/gso.h:74 [inline] __udp_gso_segment+0xba4/0x1c98 net/ipv4/udp_offload.c:340 udp4_ufo_fragment+0x3c8/0x6f8 net/ipv4/udp_offload.c:399 inet_gso_segment+0x4f0/0x1118 net/ipv4/af_inet.c:1398 skb_mac_gso_segment+0x2d0/0x5bc net/core/gso.c:53 __skb_gso_segment+0x250/0x3cc net/core/gso.c:124 skb_gso_segment include/net/gso.h:83 [inline] netem_segment net/sched/sch_netem.c:419 [inline] netem_enqueue+0x8c0/0x2c80 net/sched/sch_netem.c:497 dev_qdisc_enqueue+0x60/0x35c net/core/dev.c:3732 __dev_xmit_skb net/core/dev.c:3821 [inline] __dev_queue_xmit+0xb24/0x3318 net/core/dev.c:4169 dev_queue_xmit include/linux/netdevice.h:3088 [inline] packet_xmit+0x6c/0x318 net/packet/af_packet.c:276 packet_snd net/packet/af_packet.c:3085 [inline] packet_sendmsg+0x376c/0x4c98 net/packet/af_packet.c:3117 sock_sendmsg_nosec net/socket.c:725 [inline] sock_sendmsg net/socket.c:748 [inline] __sys_sendto+0x3bc/0x540 net/socket.c:2134 __do_sys_sendto net/socket.c:2146 [inline] __se_sys_sendto net/socket.c:2142 [inline] __arm64_sys_sendto+0xd8/0xf8 net/socket.c:2142 __invoke_syscall arch/arm64/kernel/syscall.c:37 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:51 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:136 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:155 el0_svc+0x58/0x16c arch/arm64/kernel/entry-common.c:678 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:696 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:591 ================================================================================ skb len=64521 headroom=2 headlen=848 tailroom=0 mac=(2,14) net=(16,44) trans=60 shinfo(txflags=0 nr_frags=16 gso(size=344 type=131074 segs=0)) csum(0x0 ip_summed=0 complete_sw=0 valid=0 level=0) hash(0x0 sw=0 l4=0) proto=0x0800 pkttype=0 iif=0 dev name=bridge1 feat=0x00002007ffff78e9 sk family=17 type=3 proto=0 skb linear: 00000000: 02 00 c5 2c f7 c2 59 75 e0 0d b0 2f 08 00 eb 2b skb linear: 00000010: 2f f0 da c8 89 7c 6b 11 87 77 fa ff ff ff 30 66 skb linear: 00000020: 10 0c b6 10 c5 47 1d 13 14 66 32 1a 54 e7 df 30 skb linear: 00000030: 5f 80 a8 81 61 b6 fd 8f 24 28 6a 57 c3 fe ff ff skb linear: 00000040: f0 ef 8c 7f 36 75 eb 04 7a 80 0a 48 80 42 40 51 skb linear: 00000050: d6 f1 a6 8d aa 5e da 5c 40 a8 aa 84 a8 38 20 0e skb linear: 00000060: a9 b1 37 96 c9 3a 1b b2 eb 52 9b 48 b8 7f 03 48 skb linear: 00000070: 20 71 2a 12 ff 00 07 24 0e 48 3d 71 e0 c6 09 21 skb linear: 00000080: 71 40 48 e5 80 14 20 02 c5 50 90 06 cd ec d8 dd skb linear: 00000090: d8 bb f1 d6 59 ef 06 ef e7 23 8d e6 c7 db 7d df skb linear: 000000a0: ef db cd ec 9b 7d 1b cf 0b 60 6c 9d 8b 88 ed 88 skb linear: 000000b0: 98 8e 88 37 22 62 be 3c 9e 94 4b bc d2 5e f2 c7 skb linear: 000000c0: dd bf 77 67 79 e7 de 9d e5 24 b2 ec f5 bf 25 45 skb linear: 000000d0: 79 7e 2c 3a 9e 93 7b b2 ac 73 36 22 be f6 e5 88 skb linear: 000000e0: 6f 25 07 e3 36 37 b7 6e 2c d5 eb b5 db e5 fe 42 skb linear: 000000f0: 6b fd d6 42 73 73 eb e2 da fa d2 6a 6d b5 76 b3 skb linear: 00000100: 5a bd b2 78 e5 d2 8b 97 5f a8 0e ac ad 67 d7 7f skb linear: 00000110: 7e f7 4b 6b af 7e fd 57 bf fc e4 7b bf dd fe e2 skb linear: 00000120: f7 f2 b4 e6 ca b2 ce 76 7c 28 d3 0f 2f 6e 37 7d ------------[ cut here ]------------ bridge1: caps=(0x00002007ffff78e9, 0x0000000000000000) WARNING: CPU: 1 PID: 14161 at net/core/dev.c:3257 skb_warn_bad_offload+0x160/0x194 net/core/dev.c:3255 Modules linked in: CPU: 1 PID: 14161 Comm: syz-executor.0 Tainted: G B 6.5.0-rc7-syzkaller-gfe4469582053 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/26/2023 pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : skb_warn_bad_offload+0x160/0x194 net/core/dev.c:3255 lr : skb_warn_bad_offload+0x160/0x194 net/core/dev.c:3255 sp : ffff80009be372a0 x29: ffff80009be372a0 x28: ffff0000c90a0280 x27: dfff800000000000 x26: 0000000000000020 x25: 1fffe00019214060 x24: ffff80008c894b80 x23: dfff800000000000 x22: ffff0000c90a0298 x21: ffff0000dce0c000 x20: ffff0000dce0c000 x19: ffff0000dce0c0f0 x18: 0000000000000000 x17: 0000000000000000 x16: ffff80008a572e30 x15: 0000000000000001 x14: 1fffe0003683f22a x13: 0000000000000000 x12: 0000000000000000 x11: 0000000000040000 x10: 000000000003ffff x9 : 3166b62643c35a00 x8 : 3166b62643c35a00 x7 : 0000000000000001 x6 : 0000000000000001 x5 : ffff80009be36b98 x4 : ffff80008e17f000 x3 : ffff8000805a25e4 x2 : 0000000000000001 x1 : 0000000000000201 x0 : 0000000000000000 Call trace: skb_warn_bad_offload+0x160/0x194 net/core/dev.c:3255 __skb_gso_segment+0x2f4/0x3cc net/core/gso.c:127 skb_gso_segment include/net/gso.h:83 [inline] netem_segment net/sched/sch_netem.c:419 [inline] netem_enqueue+0x8c0/0x2c80 net/sched/sch_netem.c:497 dev_qdisc_enqueue+0x60/0x35c net/core/dev.c:3732 __dev_xmit_skb net/core/dev.c:3821 [inline] __dev_queue_xmit+0xb24/0x3318 net/core/dev.c:4169 dev_queue_xmit include/linux/netdevice.h:3088 [inline] packet_xmit+0x6c/0x318 net/packet/af_packet.c:276 packet_snd net/packet/af_packet.c:3085 [inline] packet_sendmsg+0x376c/0x4c98 net/packet/af_packet.c:3117 sock_sendmsg_nosec net/socket.c:725 [inline] sock_sendmsg net/socket.c:748 [inline] __sys_sendto+0x3bc/0x540 net/socket.c:2134 __do_sys_sendto net/socket.c:2146 [inline] __se_sys_sendto net/socket.c:2142 [inline] __arm64_sys_sendto+0xd8/0xf8 net/socket.c:2142 __invoke_syscall arch/arm64/kernel/syscall.c:37 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:51 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:136 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:155 el0_svc+0x58/0x16c arch/arm64/kernel/entry-common.c:678 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:696 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:591 irq event stamp: 4336 hardirqs last enabled at (4336): [] __exit_to_kernel_mode arch/arm64/kernel/entry-common.c:84 [inline] hardirqs last enabled at (4336): [] exit_to_kernel_mode+0xdc/0x10c arch/arm64/kernel/entry-common.c:94 hardirqs last disabled at (4335): [] __el1_irq arch/arm64/kernel/entry-common.c:499 [inline] hardirqs last disabled at (4335): [] el1_interrupt+0x24/0x68 arch/arm64/kernel/entry-common.c:517 softirqs last enabled at (3762): [] local_bh_enable+0x10/0x34 include/linux/bottom_half.h:32 softirqs last disabled at (3902): [] local_bh_disable+0x10/0x34 include/linux/bottom_half.h:19 ---[ end trace 0000000000000000 ]---