syzbot


KASAN: slab-use-after-free Read in ip_check_mc_rcu

Status: closed as invalid on 2026/03/30 17:42
Subsystems: netfilter
[Documentation on labels]
First crash: 65d, last: 65d
Similar bugs (5)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: use-after-free Read in ip_check_mc_rcu net 19 C inconclusive error 30 1689d 1916d 0/29 closed as invalid on 2022/11/15 19:19
linux-4.19 KASAN: use-after-free Read in ip_check_mc_rcu 19 syz done 7 1702d 1853d 1/1 fixed on 2021/09/26 12:12
android-54 KASAN: use-after-free Read in ip_check_mc_rcu 19 C 5 1669d 1877d 0/2 auto-obsoleted due to no activity on 2023/04/22 05:06
linux-4.14 KASAN: use-after-free Read in ip_check_mc_rcu 19 C error 4 1321d 1885d 0/1 upstream: reported C repro on 2021/02/22 02:16
upstream general protection fault in ip_check_mc_rcu net 2 1 310d 310d 0/29 closed as invalid on 2025/07/31 09:32

Sample crash report:
netlink: 4 bytes leftover after parsing attributes in process `syz.2.8265'.
==================================================================
BUG: KASAN: slab-use-after-free in ip_check_mc_rcu+0x28e/0x680 net/ipv4/igmp.c:2821
Read of size 4 at addr ffff888079159808 by task syz.2.8265/4205

CPU: 1 UID: 0 PID: 4205 Comm: syz.2.8265 Tainted: G             L      syzkaller #0 PREEMPT(full) 
Tainted: [L]=SOFTLOCKUP
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2026
Call Trace:
 <TASK>
 dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
 print_address_description mm/kasan/report.c:378 [inline]
 print_report+0xba/0x230 mm/kasan/report.c:482
 kasan_report+0x117/0x150 mm/kasan/report.c:595
 ip_check_mc_rcu+0x28e/0x680 net/ipv4/igmp.c:2821
 __mkroute_output net/ipv4/route.c:2603 [inline]
 ip_route_output_key_hash_rcu+0xe7e/0x25d0 net/ipv4/route.c:2875
 ip_route_output_key_hash+0x18d/0x2a0 net/ipv4/route.c:2705
 __ip_route_output_key include/net/route.h:169 [inline]
 ip_route_output_flow+0x2a/0x150 net/ipv4/route.c:2932
 udp_sendmsg+0x154a/0x22f0 net/ipv4/udp.c:1451
 sock_sendmsg_nosec net/socket.c:727 [inline]
 __sock_sendmsg net/socket.c:742 [inline]
 ____sys_sendmsg+0x894/0xad0 net/socket.c:2592
 ___sys_sendmsg+0x2a5/0x360 net/socket.c:2646
 __sys_sendmmsg+0x2e7/0x4e0 net/socket.c:2728
 __compat_sys_sendmmsg net/compat.c:360 [inline]
 __do_compat_sys_sendmmsg net/compat.c:367 [inline]
 __se_compat_sys_sendmmsg net/compat.c:364 [inline]
 __ia32_compat_sys_sendmmsg+0xa2/0xc0 net/compat.c:364
 do_syscall_32_irqs_on arch/x86/entry/syscall_32.c:83 [inline]
 __do_fast_syscall_32+0x20d/0x640 arch/x86/entry/syscall_32.c:307
 do_fast_syscall_32+0x33/0x70 arch/x86/entry/syscall_32.c:332
 entry_SYSENTER_compat_after_hwframe+0x84/0x8e
RIP: 0023:0xf7f35f6c
Code: 90 85 d2 74 0a 89 ce 81 e6 ff 0f 00 00 89 32 85 c0 74 05 c1 e9 0c 89 08 31 c0 5e 5d c3 90 0f 1f 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 58 b8 77 00 00 00 cd 80 0f 0b 90 90 90 90 90 90 b8 ad
RSP: 002b:00000000f53f650c EFLAGS: 00000206 ORIG_RAX: 0000000000000159
RAX: ffffffffffffffda RBX: 0000000000000008 RCX: 0000000080007fc0
RDX: 000000000800001d RSI: 000000000000001c RDI: 0000000000000000
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000206 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
 </TASK>

Allocated by task 4205:
 kasan_save_stack mm/kasan/common.c:57 [inline]
 kasan_save_track+0x3e/0x80 mm/kasan/common.c:78
 poison_kmalloc_redzone mm/kasan/common.c:398 [inline]
 __kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:415
 kasan_kmalloc include/linux/kasan.h:263 [inline]
 __kmalloc_cache_noprof+0x31c/0x660 mm/slub.c:5297
 kmalloc_noprof include/linux/slab.h:962 [inline]
 kzalloc_noprof include/linux/slab.h:1204 [inline]
 ____ip_mc_inc_group+0x518/0xdd0 net/ipv4/igmp.c:1535
 __ip_mc_join_group+0x430/0x500 net/ipv4/igmp.c:2305
 do_ip_setsockopt+0x2097/0x2ea0 net/ipv4/ip_sockglue.c:1310
 ip_setsockopt+0x66/0x110 net/ipv4/ip_sockglue.c:1417
 do_sock_setsockopt+0x17c/0x1b0 net/socket.c:2322
 __sys_setsockopt net/socket.c:2347 [inline]
 __do_sys_setsockopt net/socket.c:2353 [inline]
 __se_sys_setsockopt net/socket.c:2350 [inline]
 __ia32_sys_setsockopt+0x13d/0x1b0 net/socket.c:2350
 do_syscall_32_irqs_on arch/x86/entry/syscall_32.c:83 [inline]
 __do_fast_syscall_32+0x20d/0x640 arch/x86/entry/syscall_32.c:307
 do_fast_syscall_32+0x33/0x70 arch/x86/entry/syscall_32.c:332
 entry_SYSENTER_compat_after_hwframe+0x84/0x8e

Freed by task 4204:
 kasan_save_stack mm/kasan/common.c:57 [inline]
 kasan_save_track+0x3e/0x80 mm/kasan/common.c:78
 kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:584
 poison_slab_object mm/kasan/common.c:253 [inline]
 __kasan_slab_free+0x5c/0x80 mm/kasan/common.c:285
 kasan_slab_free include/linux/kasan.h:235 [inline]
 slab_free_hook mm/slub.c:2670 [inline]
 __rcu_free_sheaf_prepare+0x129/0x290 mm/slub.c:2900
 rcu_free_sheaf+0x31/0x200 mm/slub.c:5728
 rcu_do_batch kernel/rcu/tree.c:2617 [inline]
 rcu_core+0x7cd/0x1070 kernel/rcu/tree.c:2869
 handle_softirqs+0x22a/0x870 kernel/softirq.c:622
 __do_softirq kernel/softirq.c:656 [inline]
 invoke_softirq kernel/softirq.c:496 [inline]
 __irq_exit_rcu+0x5f/0x150 kernel/softirq.c:723
 irq_exit_rcu+0x9/0x30 kernel/softirq.c:739
 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1056 [inline]
 sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1056
 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697

The buggy address belongs to the object at ffff888079159800
 which belongs to the cache kmalloc-256 of size 256
The buggy address is located 8 bytes inside of
 freed 256-byte region [ffff888079159800, ffff888079159900)

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x79158
head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 00fff00000000040 ffff88813fea3b40 dead000000000100 dead000000000122
raw: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000
head: 00fff00000000040 ffff88813fea3b40 dead000000000100 dead000000000122
head: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000
head: 00fff00000000001 ffffea0001e45601 00000000ffffffff 00000000ffffffff
head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000002
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 1, migratetype Unmovable, gfp_mask 0x52820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 8789, tgid 8784 (syz.2.1186), ts 211902961285, free_ts 152700519031
 set_page_owner include/linux/page_owner.h:32 [inline]
 post_alloc_hook+0x231/0x280 mm/page_alloc.c:1888
 prep_new_page mm/page_alloc.c:1896 [inline]
 get_page_from_freelist+0x24dc/0x2580 mm/page_alloc.c:3961
 __alloc_frozen_pages_noprof+0x18d/0x380 mm/page_alloc.c:5249
 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2485
 alloc_slab_page mm/slub.c:3236 [inline]
 allocate_slab+0x83/0x660 mm/slub.c:3411
 new_slab mm/slub.c:3469 [inline]
 ___slab_alloc+0x150/0x6a0 mm/slub.c:4334
 __slab_alloc_node mm/slub.c:4400 [inline]
 slab_alloc_node mm/slub.c:4776 [inline]
 __do_kmalloc_node mm/slub.c:5176 [inline]
 __kmalloc_noprof+0x18a/0x760 mm/slub.c:5189
 kmalloc_noprof include/linux/slab.h:966 [inline]
 kzalloc_noprof include/linux/slab.h:1204 [inline]
 hash_ipportip6_add+0x1a6f/0x23c0 net/netfilter/ipset/ip_set_hash_gen.h:950
 hash_ipportip6_uadt+0x76f/0xa30 net/netfilter/ipset/ip_set_hash_ipportip.c:346
 call_ad+0x398/0xb60 net/netfilter/ipset/ip_set_core.c:1751
 ip_set_ad+0x824/0x9d0 net/netfilter/ipset/ip_set_core.c:1841
 nfnetlink_rcv_msg+0xc00/0x12c0 net/netfilter/nfnetlink.c:302
 netlink_rcv_skb+0x232/0x4b0 net/netlink/af_netlink.c:2550
 nfnetlink_rcv+0x2c0/0x27b0 net/netfilter/nfnetlink.c:669
 netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline]
 netlink_unicast+0x80f/0x9b0 net/netlink/af_netlink.c:1344
 netlink_sendmsg+0x813/0xb40 net/netlink/af_netlink.c:1894
page last free pid 5845 tgid 5845 stack trace:
 reset_page_owner include/linux/page_owner.h:25 [inline]
 __free_pages_prepare mm/page_alloc.c:1432 [inline]
 __free_frozen_pages+0xc00/0xd90 mm/page_alloc.c:2977
 __slab_free+0x263/0x2b0 mm/slub.c:5490
 qlink_free mm/kasan/quarantine.c:163 [inline]
 qlist_free_all+0x97/0x100 mm/kasan/quarantine.c:179
 kasan_quarantine_reduce+0x148/0x160 mm/kasan/quarantine.c:286
 __kasan_slab_alloc+0x22/0x80 mm/kasan/common.c:350
 kasan_slab_alloc include/linux/kasan.h:253 [inline]
 slab_post_alloc_hook mm/slub.c:4459 [inline]
 slab_alloc_node mm/slub.c:4788 [inline]
 __kmalloc_cache_node_noprof+0x391/0x6b0 mm/slub.c:5305
 kmalloc_node_noprof include/linux/slab.h:1093 [inline]
 __get_vm_area_node+0x13f/0x300 mm/vmalloc.c:3221
 __vmalloc_node_range_noprof+0x372/0x1730 mm/vmalloc.c:4024
 __vmalloc_node_noprof mm/vmalloc.c:4124 [inline]
 vmalloc_noprof+0xb2/0xe0 mm/vmalloc.c:4159
 xt_compat_init_offsets+0xd3/0x1c0 net/netfilter/x_tables.c:733
 compat_table_info+0x99/0xa80 net/ipv4/netfilter/ip_tables.c:934
 get_info net/ipv4/netfilter/ip_tables.c:971 [inline]
 do_ipt_get_ctl+0x80d/0x1240 net/ipv4/netfilter/ip_tables.c:1659
 nf_getsockopt+0x26e/0x290 net/netfilter/nf_sockopt.c:116
 ip_getsockopt+0x19e/0x230 net/ipv4/ip_sockglue.c:1777
 do_sock_getsockopt+0x2d3/0x3f0 net/socket.c:2383
 __sys_getsockopt+0x127/0x1c0 net/socket.c:2412

Memory state around the buggy address:
 ffff888079159700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff888079159780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff888079159800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                      ^
 ffff888079159880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff888079159900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================
----------------
Code disassembly (best guess):
   0:	90                   	nop
   1:	85 d2                	test   %edx,%edx
   3:	74 0a                	je     0xf
   5:	89 ce                	mov    %ecx,%esi
   7:	81 e6 ff 0f 00 00    	and    $0xfff,%esi
   d:	89 32                	mov    %esi,(%rdx)
   f:	85 c0                	test   %eax,%eax
  11:	74 05                	je     0x18
  13:	c1 e9 0c             	shr    $0xc,%ecx
  16:	89 08                	mov    %ecx,(%rax)
  18:	31 c0                	xor    %eax,%eax
  1a:	5e                   	pop    %rsi
  1b:	5d                   	pop    %rbp
  1c:	c3                   	ret
  1d:	90                   	nop
  1e:	0f 1f 00             	nopl   (%rax)
  21:	51                   	push   %rcx
  22:	52                   	push   %rdx
  23:	55                   	push   %rbp
  24:	89 e5                	mov    %esp,%ebp
  26:	0f 34                	sysenter
  28:	cd 80                	int    $0x80
* 2a:	5d                   	pop    %rbp <-- trapping instruction
  2b:	5a                   	pop    %rdx
  2c:	59                   	pop    %rcx
  2d:	c3                   	ret
  2e:	58                   	pop    %rax
  2f:	b8 77 00 00 00       	mov    $0x77,%eax
  34:	cd 80                	int    $0x80
  36:	0f 0b                	ud2
  38:	90                   	nop
  39:	90                   	nop
  3a:	90                   	nop
  3b:	90                   	nop
  3c:	90                   	nop
  3d:	90                   	nop
  3e:	b8                   	.byte 0xb8
  3f:	ad                   	lods   %ds:(%rsi),%eax

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/02/16 01:08 upstream bb7a3fc2c976 1e62d198 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 KASAN: slab-use-after-free Read in ip_check_mc_rcu
* Struck through repros no longer work on HEAD.