syzbot


KASAN: slab-out-of-bounds Read in csum_partial

Status: closed as invalid on 2024/06/20 17:23
Subsystems: net
[Documentation on labels]
First crash: 269d, last: 269d
Similar bugs (5)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream BUG: unable to handle kernel paging request in csum_partial (4) net 12 501d 559d 0/28 closed as invalid on 2023/10/17 18:04
android-54 BUG: unable to handle kernel paging request in csum_partial C 5 1195d 1776d 1/2 fixed on 2021/10/21 11:33
upstream BUG: unable to handle kernel paging request in csum_partial (2) kernel 1 1411d 1411d 0/28 auto-closed as invalid on 2021/04/23 09:26
upstream BUG: unable to handle kernel paging request in csum_partial (5) net 1 109d 109d 0/28 closed as invalid on 2024/09/23 08:38
upstream BUG: unable to handle kernel paging request in csum_partial (3) kernel C done 1 1208d 1238d 20/28 fixed on 2021/11/10 00:50

Sample crash report:
==================================================================
BUG: KASAN: slab-out-of-bounds in do_csum lib/checksum.c:73 [inline]
BUG: KASAN: slab-out-of-bounds in csum_partial+0x16e/0x2c0 lib/checksum.c:128
Read of size 4 at addr ffff8880205a5180 by task syz-executor.3/3698

CPU: 1 PID: 3698 Comm: syz-executor.3 Not tainted 6.8.0-rc7-syzkaller-02431-gd7e14e534493 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/29/2024
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1e7/0x2e0 lib/dump_stack.c:106
 print_address_description mm/kasan/report.c:377 [inline]
 print_report+0x167/0x540 mm/kasan/report.c:488
 kasan_report+0x142/0x180 mm/kasan/report.c:601
 do_csum lib/checksum.c:73 [inline]
 csum_partial+0x16e/0x2c0 lib/checksum.c:128
 gso_make_checksum include/net/gso.h:74 [inline]
 __skb_udp_tunnel_segment net/ipv4/udp_offload.c:140 [inline]
 skb_udp_tunnel_segment+0x11d1/0x22a0 net/ipv4/udp_offload.c:182
 udp6_ufo_fragment+0x1a6/0xf10 net/ipv6/udp_offload.c:35
 ipv6_gso_segment+0xb55/0x2120 net/ipv6/ip6_offload.c:152
 skb_mac_gso_segment+0x383/0x740 net/core/gso.c:53
 __skb_gso_segment+0x324/0x4c0 net/core/gso.c:124
 skb_gso_segment include/net/gso.h:83 [inline]
 ip6_finish_output_gso_slowpath_drop net/ipv6/ip6_output.c:155 [inline]
 ip6_finish_output_gso net/ipv6/ip6_output.c:186 [inline]
 __ip6_finish_output net/ipv6/ip6_output.c:205 [inline]
 ip6_finish_output+0x2df/0x810 net/ipv6/ip6_output.c:222
 ip6tunnel_xmit include/net/ip6_tunnel.h:161 [inline]
 udp_tunnel6_xmit_skb+0x590/0x9d0 net/ipv6/ip6_udp_tunnel.c:111
 geneve6_xmit_skb drivers/net/geneve.c:998 [inline]
 geneve_xmit+0x2043/0x31a0 drivers/net/geneve.c:1027
 __netdev_start_xmit include/linux/netdevice.h:4905 [inline]
 netdev_start_xmit include/linux/netdevice.h:4919 [inline]
 xmit_one net/core/dev.c:3531 [inline]
 dev_hard_start_xmit+0x26a/0x790 net/core/dev.c:3547
 __dev_queue_xmit+0x19f4/0x3b10 net/core/dev.c:4335
 dev_queue_xmit include/linux/netdevice.h:3091 [inline]
 br_dev_queue_push_xmit+0x701/0x8d0 net/bridge/br_forward.c:53
 NF_HOOK+0x3a7/0x460 include/linux/netfilter.h:314
 br_forward_finish+0xe5/0x140 net/bridge/br_forward.c:66
 NF_HOOK+0x3a7/0x460 include/linux/netfilter.h:314
 __br_forward+0x489/0x660 net/bridge/br_forward.c:115
 deliver_clone net/bridge/br_forward.c:131 [inline]
 maybe_deliver+0xb3/0x150 net/bridge/br_forward.c:190
 br_flood+0x2e4/0x660 net/bridge/br_forward.c:236
 br_dev_xmit+0x118c/0x1a10
 __netdev_start_xmit include/linux/netdevice.h:4905 [inline]
 netdev_start_xmit include/linux/netdevice.h:4919 [inline]
 xmit_one net/core/dev.c:3531 [inline]
 dev_hard_start_xmit+0x26a/0x790 net/core/dev.c:3547
 __dev_queue_xmit+0x19f4/0x3b10 net/core/dev.c:4335
 packet_snd net/packet/af_packet.c:3083 [inline]
 packet_sendmsg+0x4932/0x63d0 net/packet/af_packet.c:3115
 sock_sendmsg_nosec net/socket.c:730 [inline]
 __sock_sendmsg+0x221/0x270 net/socket.c:745
 __sys_sendto+0x3a4/0x4f0 net/socket.c:2191
 __do_sys_sendto net/socket.c:2203 [inline]
 __se_sys_sendto net/socket.c:2199 [inline]
 __x64_sys_sendto+0xde/0x100 net/socket.c:2199
 do_syscall_64+0xf9/0x240
 entry_SYSCALL_64_after_hwframe+0x6f/0x77
RIP: 0033:0x7fc3e847dda9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 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 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fc3e916d0c8 EFLAGS: 00000246 ORIG_RAX: 000000000000002c
RAX: ffffffffffffffda RBX: 00007fc3e85abf80 RCX: 00007fc3e847dda9
RDX: 000000000000e94f RSI: 00000000200000c0 RDI: 0000000000000003
RBP: 00007fc3e84ca47a R08: 0000000020000540 R09: 0000000000000014
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000000b R14: 00007fc3e85abf80 R15: 00007ffdebeaf8c8
 </TASK>

Allocated by task 3698:
 kasan_save_stack mm/kasan/common.c:47 [inline]
 kasan_save_track+0x3f/0x80 mm/kasan/common.c:68
 unpoison_slab_object mm/kasan/common.c:312 [inline]
 __kasan_slab_alloc+0x66/0x80 mm/kasan/common.c:338
 kasan_slab_alloc include/linux/kasan.h:201 [inline]
 slab_post_alloc_hook mm/slub.c:3813 [inline]
 slab_alloc_node mm/slub.c:3860 [inline]
 kmem_cache_alloc_node+0x18f/0x380 mm/slub.c:3903
 kmalloc_reserve+0xa8/0x2a0 net/core/skbuff.c:577
 __alloc_skb+0x1f3/0x440 net/core/skbuff.c:668
 skb_segment+0x1096/0x46f0 net/core/skbuff.c:4757
 __udp_gso_segment+0x3f7/0x22b0 net/ipv4/udp_offload.c:298
 udp6_ufo_fragment+0x6a7/0xf10 net/ipv6/udp_offload.c:47
 ipv6_gso_segment+0xb55/0x2120 net/ipv6/ip6_offload.c:152
 skb_mac_gso_segment+0x383/0x740 net/core/gso.c:53
 __skb_udp_tunnel_segment net/ipv4/udp_offload.c:87 [inline]
 skb_udp_tunnel_segment+0xa77/0x22a0 net/ipv4/udp_offload.c:182
 udp6_ufo_fragment+0x1a6/0xf10 net/ipv6/udp_offload.c:35
 ipv6_gso_segment+0xb55/0x2120 net/ipv6/ip6_offload.c:152
 skb_mac_gso_segment+0x383/0x740 net/core/gso.c:53
 __skb_gso_segment+0x324/0x4c0 net/core/gso.c:124
 skb_gso_segment include/net/gso.h:83 [inline]
 ip6_finish_output_gso_slowpath_drop net/ipv6/ip6_output.c:155 [inline]
 ip6_finish_output_gso net/ipv6/ip6_output.c:186 [inline]
 __ip6_finish_output net/ipv6/ip6_output.c:205 [inline]
 ip6_finish_output+0x2df/0x810 net/ipv6/ip6_output.c:222
 ip6tunnel_xmit include/net/ip6_tunnel.h:161 [inline]
 udp_tunnel6_xmit_skb+0x590/0x9d0 net/ipv6/ip6_udp_tunnel.c:111
 geneve6_xmit_skb drivers/net/geneve.c:998 [inline]
 geneve_xmit+0x2043/0x31a0 drivers/net/geneve.c:1027
 __netdev_start_xmit include/linux/netdevice.h:4905 [inline]
 netdev_start_xmit include/linux/netdevice.h:4919 [inline]
 xmit_one net/core/dev.c:3531 [inline]
 dev_hard_start_xmit+0x26a/0x790 net/core/dev.c:3547
 __dev_queue_xmit+0x19f4/0x3b10 net/core/dev.c:4335
 dev_queue_xmit include/linux/netdevice.h:3091 [inline]
 br_dev_queue_push_xmit+0x701/0x8d0 net/bridge/br_forward.c:53
 NF_HOOK+0x3a7/0x460 include/linux/netfilter.h:314
 br_forward_finish+0xe5/0x140 net/bridge/br_forward.c:66
 NF_HOOK+0x3a7/0x460 include/linux/netfilter.h:314
 __br_forward+0x489/0x660 net/bridge/br_forward.c:115
 deliver_clone net/bridge/br_forward.c:131 [inline]
 maybe_deliver+0xb3/0x150 net/bridge/br_forward.c:190
 br_flood+0x2e4/0x660 net/bridge/br_forward.c:236
 br_dev_xmit+0x118c/0x1a10
 __netdev_start_xmit include/linux/netdevice.h:4905 [inline]
 netdev_start_xmit include/linux/netdevice.h:4919 [inline]
 xmit_one net/core/dev.c:3531 [inline]
 dev_hard_start_xmit+0x26a/0x790 net/core/dev.c:3547
 __dev_queue_xmit+0x19f4/0x3b10 net/core/dev.c:4335
 packet_snd net/packet/af_packet.c:3083 [inline]
 packet_sendmsg+0x4932/0x63d0 net/packet/af_packet.c:3115
 sock_sendmsg_nosec net/socket.c:730 [inline]
 __sock_sendmsg+0x221/0x270 net/socket.c:745
 __sys_sendto+0x3a4/0x4f0 net/socket.c:2191
 __do_sys_sendto net/socket.c:2203 [inline]
 __se_sys_sendto net/socket.c:2199 [inline]
 __x64_sys_sendto+0xde/0x100 net/socket.c:2199
 do_syscall_64+0xf9/0x240
 entry_SYSCALL_64_after_hwframe+0x6f/0x77

The buggy address belongs to the object at ffff8880205a4f00
 which belongs to the cache skbuff_small_head of size 640
The buggy address is located 0 bytes to the right of
 allocated 640-byte region [ffff8880205a4f00, ffff8880205a5180)

The buggy address belongs to the physical page:
page:ffffea0000816900 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x205a4
head:ffffea0000816900 order:2 entire_mapcount:0 nr_pages_mapped:0 pincount:0
ksm flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffffff()
raw: 00fff00000000840 ffff888018a9f8c0 ffffea0001143400 dead000000000003
raw: 0000000000000000 0000000000150015 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 2, migratetype Unmovable, gfp_mask 0x1d2820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 0, tgid 0 (swapper/1), ts 738020373532, free_ts 687712888829
 set_page_owner include/linux/page_owner.h:31 [inline]
 post_alloc_hook+0x1ea/0x210 mm/page_alloc.c:1533
 prep_new_page mm/page_alloc.c:1540 [inline]
 get_page_from_freelist+0x33ea/0x3580 mm/page_alloc.c:3311
 __alloc_pages+0x255/0x680 mm/page_alloc.c:4567
 __alloc_pages_node include/linux/gfp.h:238 [inline]
 alloc_pages_node include/linux/gfp.h:261 [inline]
 alloc_slab_page+0x5f/0x160 mm/slub.c:2190
 allocate_slab mm/slub.c:2354 [inline]
 new_slab+0x84/0x2f0 mm/slub.c:2407
 ___slab_alloc+0xd17/0x13e0 mm/slub.c:3540
 __slab_alloc mm/slub.c:3625 [inline]
 __slab_alloc_node mm/slub.c:3678 [inline]
 slab_alloc_node mm/slub.c:3850 [inline]
 kmem_cache_alloc_node+0x245/0x380 mm/slub.c:3903
 kmalloc_reserve+0xa8/0x2a0 net/core/skbuff.c:577
 __alloc_skb+0x1f3/0x440 net/core/skbuff.c:668
 skb_copy+0xef/0x770 net/core/skbuff.c:2128
 mac80211_hwsim_tx_frame_no_nl+0x1068/0x18d0 drivers/net/wireless/virtual/mac80211_hwsim.c:1854
 mac80211_hwsim_tx_frame+0x1cc/0x220 drivers/net/wireless/virtual/mac80211_hwsim.c:2200
 mac80211_hwsim_beacon_tx+0x3be/0x7e0 drivers/net/wireless/virtual/mac80211_hwsim.c:2300
 __iterate_interfaces+0x223/0x4c0 net/mac80211/util.c:772
 ieee80211_iterate_active_interfaces_atomic+0xd8/0x170 net/mac80211/util.c:808
 mac80211_hwsim_beacon+0xd4/0x1f0 drivers/net/wireless/virtual/mac80211_hwsim.c:2326
page last free pid 8920 tgid 8920 stack trace:
 reset_page_owner include/linux/page_owner.h:24 [inline]
 free_pages_prepare mm/page_alloc.c:1140 [inline]
 free_unref_page_prepare+0x968/0xa90 mm/page_alloc.c:2346
 free_unref_page+0x37/0x3f0 mm/page_alloc.c:2486
 vfree+0x186/0x2e0 mm/vmalloc.c:2842
 bpf_map_free_deferred+0xe6/0x110 kernel/bpf/syscall.c:700
 process_one_work kernel/workqueue.c:2633 [inline]
 process_scheduled_works+0x913/0x1420 kernel/workqueue.c:2706
 worker_thread+0xa5f/0x1000 kernel/workqueue.c:2787
 kthread+0x2ef/0x390 kernel/kthread.c:388
 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x1b/0x30 arch/x86/entry/entry_64.S:243

Memory state around the buggy address:
 ffff8880205a5080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff8880205a5100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff8880205a5180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
                   ^
 ffff8880205a5200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff8880205a5280: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/03/10 23:06 net-next d7e14e534493 6ee49f2e .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce KASAN: slab-out-of-bounds Read in csum_partial
* Struck through repros no longer work on HEAD.