syzbot


KASAN: use-after-free Read in ccid2_hc_tx_packet_recv

Status: upstream: reported C repro on 2024/11/04 02:55
Bug presence: origin:upstream
Labels: missing-backport
[Documentation on labels]
Reported-by: syzbot+2a6e8fee8d682262a034@syzkaller.appspotmail.com
First crash: 433d, last: 41d
Fix bisection: failed (error log, bisect log)
  
Bug presence (3)
Date Name Commit Repro Result
2025/06/26 linux-6.1.y (ToT) 58485ff1a74f C [report] KASAN: use-after-free Read in ccid2_hc_tx_packet_recv
2024/11/10 upstream (ToT) de2f378f2b77 C [report] KASAN: slab-use-after-free Read in ccid2_hc_tx_packet_recv
2025/06/26 upstream (ToT) f02769e7f272 C Didn't crash
Similar bugs (4)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.14 KASAN: use-after-free Read in ccid2_hc_tx_packet_recv (2) 19 C done inconclusive 3 2046d 2254d 0/1 upstream: reported C repro on 2019/11/09 21:41
linux-4.14 KASAN: use-after-free Read in ccid2_hc_tx_packet_recv 19 1 2405d 2405d 0/1 auto-closed as invalid on 2019/10/25 08:37
upstream KASAN: use-after-free Read in ccid2_hc_tx_packet_recv dccp 19 C done error 111 273d 2841d 0/29 auto-obsoleted due to no activity on 2025/07/21 16:54
linux-4.19 KASAN: use-after-free Read in ccid2_hc_tx_packet_recv 19 C done error 2 2039d 2259d 0/1 upstream: reported C repro on 2019/11/04 11:20
Fix bisection attempts (5)
Created Duration User Patch Repo Result
2025/10/02 22:52 1h59m fix candidate upstream OK (0) job log
2025/07/22 18:57 16m fix candidate upstream error job log
2025/02/27 09:23 19m bisect fix linux-6.1.y error job log
2025/01/26 18:06 1h47m bisect fix linux-6.1.y OK (0) job log log
2024/12/15 17:22 2h24m bisect fix linux-6.1.y OK (0) job log log

Sample crash report:
dccp_parse_options: DCCP(000000009c302bd6): Option 32 (len=7) error=9
==================================================================
BUG: KASAN: use-after-free in dccp_ackvec_runlen net/dccp/ackvec.h:43 [inline]
BUG: KASAN: use-after-free in ccid2_hc_tx_packet_recv+0x14b8/0x1b04 net/dccp/ccids/ccid2.c:592
Read of size 1 at addr ffff0000f1d4c4a2 by task syz.2.1636/7857

CPU: 0 PID: 7857 Comm: syz.2.1636 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/03/2025
Call trace:
 dump_backtrace+0x1c8/0x1f4 arch/arm64/kernel/stacktrace.c:158
 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165
 __dump_stack+0x30/0x40 lib/dump_stack.c:88
 dump_stack_lvl+0xf8/0x160 lib/dump_stack.c:106
 print_address_description+0x88/0x218 mm/kasan/report.c:316
 print_report+0x50/0x68 mm/kasan/report.c:420
 kasan_report+0xa8/0x100 mm/kasan/report.c:524
 __asan_report_load1_noabort+0x2c/0x38 mm/kasan/report_generic.c:348
 dccp_ackvec_runlen net/dccp/ackvec.h:43 [inline]
 ccid2_hc_tx_packet_recv+0x14b8/0x1b04 net/dccp/ccids/ccid2.c:592
 ccid_hc_tx_packet_recv net/dccp/ccid.h:189 [inline]
 dccp_deliver_input_to_ccids net/dccp/input.c:182 [inline]
 dccp_rcv_established+0x26c/0x2d8 net/dccp/input.c:374
 dccp_v6_do_rcv+0x270/0x96c net/dccp/ipv6.c:622
 sk_backlog_rcv include/net/sock.h:1125 [inline]
 __release_sock+0x19c/0x3a0 net/core/sock.c:2944
 release_sock+0x60/0x1bc net/core/sock.c:3508
 dccp_sendmsg+0x4b8/0x938 net/dccp/proto.c:800
 inet_sendmsg+0x154/0x284 net/ipv4/af_inet.c:841
 sock_sendmsg_nosec net/socket.c:718 [inline]
 __sock_sendmsg net/socket.c:730 [inline]
 ____sys_sendmsg+0x5b8/0x918 net/socket.c:2519
 ___sys_sendmsg net/socket.c:2573 [inline]
 __sys_sendmmsg+0x2f8/0x754 net/socket.c:2659
 __do_sys_sendmmsg net/socket.c:2688 [inline]
 __se_sys_sendmmsg net/socket.c:2685 [inline]
 __arm64_sys_sendmmsg+0xa0/0xbc net/socket.c:2685
 __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/0x138 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

Allocated by task 7857:
 kasan_save_stack mm/kasan/common.c:45 [inline]
 kasan_set_track+0x4c/0x80 mm/kasan/common.c:52
 kasan_save_alloc_info+0x28/0x34 mm/kasan/generic.c:505
 ____kasan_kmalloc mm/kasan/common.c:374 [inline]
 __kasan_kmalloc+0xa0/0xb8 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+0xe0/0x16c mm/slab_common.c:956
 kmalloc_reserve net/core/skbuff.c:446 [inline]
 __alloc_skb+0x264/0x718 net/core/skbuff.c:515
 alloc_skb include/linux/skbuff.h:1271 [inline]
 dccp_send_ack+0xa4/0x28c net/dccp/output.c:585
 ccid2_hc_rx_packet_recv+0x114/0x1b0 net/dccp/ccids/ccid2.c:771
 ccid_hc_rx_packet_recv net/dccp/ccid.h:182 [inline]
 dccp_deliver_input_to_ccids net/dccp/input.c:176 [inline]
 dccp_rcv_established+0x1ac/0x2d8 net/dccp/input.c:374
 dccp_v6_do_rcv+0x270/0x96c net/dccp/ipv6.c:622
 sk_backlog_rcv include/net/sock.h:1125 [inline]
 __sk_receive_skb+0x3d0/0x864 net/core/sock.c:569
 dccp_v6_rcv+0xb6c/0x1074 net/dccp/ipv6.c:791
 ip6_protocol_deliver_rcu+0x928/0x11d0 net/ipv6/ip6_input.c:438
 ip6_input_finish+0x164/0x298 net/ipv6/ip6_input.c:483
 NF_HOOK+0x2c4/0x358 include/linux/netfilter.h:302
 ip6_input+0x90/0xa8 net/ipv6/ip6_input.c:492
 dst_input include/net/dst.h:463 [inline]
 ip6_rcv_finish+0x1f4/0x220 net/ipv6/ip6_input.c:79
 NF_HOOK+0x2c4/0x358 include/linux/netfilter.h:302
 ipv6_rcv+0x9c/0xbc net/ipv6/ip6_input.c:310
 __netif_receive_skb_one_core net/core/dev.c:5581 [inline]
 __netif_receive_skb+0xcc/0x2ac net/core/dev.c:5695
 process_backlog+0x408/0x714 net/core/dev.c:6023
 __napi_poll+0xb4/0x3f0 net/core/dev.c:6590
 napi_poll net/core/dev.c:6657 [inline]
 net_rx_action+0x50c/0xb10 net/core/dev.c:6771
 handle_softirqs+0x318/0xc6c kernel/softirq.c:596
 __do_softirq+0x14/0x20 kernel/softirq.c:630

Freed by task 7857:
 kasan_save_stack mm/kasan/common.c:45 [inline]
 kasan_set_track+0x4c/0x80 mm/kasan/common.c:52
 kasan_save_free_info+0x3c/0x60 mm/kasan/generic.c:516
 ____kasan_slab_free+0x148/0x1b0 mm/kasan/common.c:236
 __kasan_slab_free+0x18/0x28 mm/kasan/common.c:244
 kasan_slab_free include/linux/kasan.h:177 [inline]
 slab_free_hook mm/slub.c:1729 [inline]
 slab_free_freelist_hook+0x16c/0x1ec mm/slub.c:1755
 slab_free mm/slub.c:3687 [inline]
 __kmem_cache_free+0xc0/0x224 mm/slub.c:3700
 kfree+0xd0/0x1ac mm/slab_common.c:988
 skb_free_head net/core/skbuff.c:762 [inline]
 skb_release_data+0x43c/0x648 net/core/skbuff.c:791
 skb_release_all net/core/skbuff.c:856 [inline]
 __kfree_skb net/core/skbuff.c:870 [inline]
 kfree_skb_reason+0x198/0x41c net/core/skbuff.c:893
 kfree_skb include/linux/skbuff.h:1220 [inline]
 dccp_v6_do_rcv+0x12c/0x96c net/dccp/ipv6.c:-1
 sk_backlog_rcv include/net/sock.h:1125 [inline]
 __release_sock+0x19c/0x3a0 net/core/sock.c:2944
 release_sock+0x60/0x1bc net/core/sock.c:3508
 dccp_sendmsg+0x4b8/0x938 net/dccp/proto.c:800
 inet_sendmsg+0x154/0x284 net/ipv4/af_inet.c:841
 sock_sendmsg_nosec net/socket.c:718 [inline]
 __sock_sendmsg net/socket.c:730 [inline]
 ____sys_sendmsg+0x5b8/0x918 net/socket.c:2519
 ___sys_sendmsg net/socket.c:2573 [inline]
 __sys_sendmmsg+0x2f8/0x754 net/socket.c:2659
 __do_sys_sendmmsg net/socket.c:2688 [inline]
 __se_sys_sendmmsg net/socket.c:2685 [inline]
 __arm64_sys_sendmmsg+0xa0/0xbc net/socket.c:2685
 __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/0x138 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 ffff0000f1d4c000
 which belongs to the cache kmalloc-2k of size 2048
The buggy address is located 1186 bytes inside of
 2048-byte region [ffff0000f1d4c000, ffff0000f1d4c800)

The buggy address belongs to the physical page:
page:000000000283d0c9 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x131d48
head:000000000283d0c9 order:3 compound_mapcount:0 compound_pincount:0
flags: 0x5ffc00000010200(slab|head|node=0|zone=2|lastcpupid=0x7ff)
raw: 05ffc00000010200 fffffc0003bf4c00 dead000000000002 ffff0000c0002900
raw: 0000000000000000 0000000000080008 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff0000f1d4c380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff0000f1d4c400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff0000f1d4c480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                               ^
 ffff0000f1d4c500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff0000f1d4c580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================

Crashes (6):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/12/01 05:17 linux-6.1.y f6e38ae624cf d6526ea3 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: use-after-free Read in ccid2_hc_tx_packet_recv
2024/11/04 05:00 linux-6.1.y 7c15117f9468 f00eed24 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: use-after-free Read in ccid2_hc_tx_packet_recv
2024/11/04 04:23 linux-6.1.y 7c15117f9468 f00eed24 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: use-after-free Read in ccid2_hc_tx_packet_recv
2024/11/04 03:46 linux-6.1.y 7c15117f9468 f00eed24 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: use-after-free Read in ccid2_hc_tx_packet_recv
2025/12/01 04:16 linux-6.1.y f6e38ae624cf d6526ea3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: use-after-free Read in ccid2_hc_tx_packet_recv
2024/11/04 02:54 linux-6.1.y 7c15117f9468 f00eed24 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: use-after-free Read in ccid2_hc_tx_packet_recv
* Struck through repros no longer work on HEAD.