Article View: linux.kernel.netdev
Article #7111Re: [BUG] SCTP: KASAN use-after-free in sctp_unpack_cookie with fail_skb_realloc (7.3.0)
From: Xin Long
Date: Sat, 24 Oct 2026 21:46
Date: Sat, 24 Oct 2026 21:46
522 lines
33143 bytes
33143 bytes
On Sat, Oct 24, 2026 at 10:07 AM 铮 <fengaojigui88@gmail.com> wrote:
>
> Hi Marcelo and Xin,
>
> I observed a KASAN slab-use-after-free in sctp_unpack_cookie() while fuzzing
> SCTP with syzkaller. I reproduced it on Linux 7.1.3 and on Linux 7.3.0. On
> 7.3.0, the crash was observed during replay of a 42-program execution sequence;
> the standalone three-call reproducer did not trigger in two attempts.
>
> The issue occurs while processing a COOKIE-ECHO through
> sctp_sf_do_5_2_4_dupcook(). With the upstream skb fault-injection option
> CONFIG_FAIL_SKB_REALLOC enabled and fail_nth: 43 on sendto(), the pskb_pull()
> inside sctp_sf_do_5_2_4_dupcook() triggers pskb_expand_head() (through
> skb_might_realloc()), which frees the old skb head buffer;
> sctp_unpack_cookie() then reads (size 2) from the freed buffer.
>
> Environment
> -----------
> - Kernel A (found and reproduced): 7.1.3-kernsight-kasan #13 SMP PREEMPT_DYNAMIC,
> built 2026-10-13, x86_64. Built with KASAN/KCOV and
> CONFIG_FAIL_SKB_REALLOC=y. No SCTP changes were made for this testing.
> - Kernel B (reproduced 2026-10-24): 7.3.0-kernsight-kasan #1 SMP
> PREEMPT_DYNAMIC, built 2026-10-20, x86_64. Vanilla 7.3.0 source tarball
> (sha256 87363c24f10e06321eb362765521094e94471f6bff8bce2d6b3e40f39f004953),
> built with KASAN/KCOV and CONFIG_FAIL_SKB_REALLOC=y. No SCTP source changes
> (net/sctp/ matches vanilla apart from build artifacts).
> - Both kernels: CONFIG_KASAN=y, CONFIG_KCOV=y, CONFIG_FAULT_INJECTION=y,
> CONFIG_FAIL_SKB_REALLOC=y. CONFIG_FAIL_SKB_REALLOC and
> net/core/skb_fault_injection.c are upstream (present in the vanilla 7.3.0
> tarball).
> - Guest: QEMU 6.2.0, 4 vCPU, 6 GiB, KVM, x86_64. A fresh VM was booted for
> every run.
> - Syzkaller: revision 853b104bb454141a5b0fc0e4218ec78e9f34ffb1+ (2026-09-18).
> The "+" denotes local KernSight integration changes (seed ordering/state
> feedback: pkg/kernsight, prog/kernsight_*, syz-manager/kernsight_*,
> pkg/execbackend, snapshot support in vm/qemu). They do not change the SCTP
> syscall descriptions or the executor's fault-injection semantics.
> - Kernel modifications / additional modules: none relevant to this report
> beyond the KASAN/KCOV/fault-injection build options above.
> - Reproduction rate: 7.1.3: verified syz and C reproducer. 7.3.0: 1/1 with the
> stored 42-program sequence; the standalone three-call program did not
> reproduce in 2 attempts. (1/1 does not establish stability.)
> - Kernel command line (7.1.3; 7.3.0 is identical, see repository):
> root=/dev/sda console=ttyS0 fstab=no rw earlyprintk=serial net.ifnames=0 oops=panic panic_on_warn=1 panic=86400 hung_task_panic=1 softlockup_panic=1 nmi_watchdog=panic sysctl.kernel.hung_task_all_cpu_backtrace=1 sysctl.kernel.panic_on_rcu_stall=1 sysctl.kernel.max_rcu_stall_to_panic=1 rcupdate.rcu_expedited=1 rcupdate.rcu_cpu_stall_cputime=1 no_hash_pointers page_owner=on sysctl.vm.nr_hugepages=4 sysctl.vm.nr_overcommit_hugepages=4 secretmem.enable=1 msr.allow_writes=off coredump_filter=0xffff vsyscall=native kvm-intel.nested=1 spec_store_bypass_disable=prctl nopcid vivid.n_devs=64 vivid.multiplanar=1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2 netrom.nr_ndevs=32 rose.rose_ndevs=32 smp.csd_lock_timeout=100000 watchdog_thresh=55 workqueue.watchdog_thresh=140 sysctl.net.core.netdev_unregister_timeout_secs=140 dummy_hcd.num=16 max_loop=32 nbd.nbds_max=32 comedi.comedi_num_legacy_minors=4 kunit.autorun=0 vcan.echo=1
>
> Reproduction on 7.1.3
> ---------------------
> Fresh KVM guest, kernel as above. Run from the guest's /tmp:
>
> scp syz-execprog syz-executor repro.prog root@guest:/tmp/
> ssh root@guest
> cd /tmp && chmod +x syz-execprog syz-executor
> ./syz-execprog -procs=1 -repeat=1 -disable=swap -executor ./syz-executor ./repro.prog
>
> Execution settings: sandbox=none, threaded executor, procs=1, repeat=1, no
> additional syzkaller features; a single program.
>
> The minimised program (repro.prog) is:
>
> r0 = socket$inet6_sctp(0xa, 0x5, 0x84)
> setsockopt$inet6_sctp_SCTP_SOCKOPT_BINDX_ADD(r0, 0x84, 0x64, &(0x7f0000000080)=[@in6={0xa, 0x4e21, 0x5, @loopback, 0x9}], 0x1c)
> sendto$inet6(r0, &(0x7f0000000000)='M', 0x1, 0x20004845, &(0x7f0000000040)={0xa, 0x4e21, 0xffffff00, @loopback, 0x2}, 0x1c) (fail_nth: 43)
>
> The C reproducer also works on 7.1.3:
>
> gcc -x c -O2 -pthread -o repro repro.cprog && ./repro
>
> Its console shows the same report:
> BUG: KASAN: slab-use-after-free in sctp_unpack_cookie+0xa56/0xdc0
>
> Reproduction on 7.3.0
> ---------------------
> Same procedure with the 7.3.0 kernel and the state-construction sequence
> instead of the single program:
>
> scp syz-execprog syz-executor repro.kernsight.prog root@guest:/tmp/
> ssh root@guest
> cd /tmp && chmod +x syz-execprog syz-executor
> ./syz-execprog -procs=1 -repeat=1 -disable=swap -executor ./syz-executor ./repro.kernsight.prog
>
> The sequence contains 42 programs replayed by a single executor process
> (procs=1) one at a time in file order (repeat=1, sandbox=none, threaded
> executor). The executor does not run programs in parallel, but a program can
> leave kernel-side asynchronous work behind (timers, workqueues, networking),
> so earlier programs' effects may still be active while later ones run. The
> SCTP trigger is program #40 and appears again inside the final program #41.
>
> Materials (programs, full logs, reports, kernel configs, command lines,
> sha256 manifest, and a verify.sh that re-checks the numbers quoted here):
> https://github.com/Zheng-zheng-codes/sctp-unpack-cookie-repro
>
> For reference, in our runs the sequence log contains exactly one KASAN report,
> first printed at t=212.7 s; the two standalone 7.3.0 runs contain zero.
>
> The standalone three-call program did not trigger in two runs on a fresh 7.3.0
> guest. The preceding execution sequence may affect reproducibility, but I have
> not isolated which preceding operations or environmental conditions matter.
>
> Fault injection was enabled for this reproduction
> -------------------------------------------------
> The sendto() call is annotated with fail_nth: 43. During this execution, the
> kernel logged a fail_skb_realloc injection, followed by the KASAN report:
>
> FAULT_INJECTION: forcing a failure.
> name fail_skb_realloc, interval 1, probability 0, space 0, times 1
>
> No additional fail_skb_realloc debugfs configuration was required.
>
> KASAN report (7.3.0, latest verification)
> -----------------------------------------
> BUG: KASAN: slab-use-after-free in sctp_unpack_cookie+0xb57/0xf30
> Read of size 2 at addr ff1100017d7658e6 by task syz.0.57/11114
>
> CPU: 3 UID: 0 PID: 11114 Comm: syz.0.57 Not tainted 7.3.0-kernsight-kasan #1 PREEMPT(full)
> Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014
> Call Trace:
> <TASK>
> dump_stack_lvl+0x116/0x1b0
> print_report+0xf1/0x5c0
> ? __virt_addr_valid+0x23d/0x430
> ? sctp_unpack_cookie+0xb57/0xf30
> kasan_report+0x96/0xd0
> ? sctp_unpack_cookie+0xb57/0xf30
> sctp_unpack_cookie+0xb57/0xf30
> ? pskb_expand_head+0x591/0x10b0
> ? __pfx_sctp_unpack_cookie+0x10/0x10
> ? __pfx_pskb_expand_head+0x10/0x10
> ? dump_stack_lvl+0x15f/0x1b0
> ? should_fail_ex+0x35d/0x650
> sctp_sf_do_5_2_4_dupcook+0x2e2/0x3320
> ? __pfx_sctp_sf_do_5_2_4_dupcook+0x10/0x10
> ? sctp_sm_lookup_event+0x183/0x580
> ? kasan_save_track+0x14/0x30
> ? __kasan_slab_free+0x43/0x70
> ? kmem_cache_free+0x292/0x6a0
> ? sctp_chunk_put+0x20b/0x2c0
> ? sctp_inq_pop+0x691/0x10f0
> ? sctp_assoc_bh_rcv+0x113/0x700
> ? sctp_inq_push+0x262/0x310
> ? __pfx_sctp_cname+0x10/0x10
> sctp_do_sm+0x177/0x55a0
> ? rcu_is_watching+0x13/0xc0
> ? preempt_count_sub+0xfc/0x1a0
> ? __pfx_sctp_do_sm+0x10/0x10
> ? debug_check_no_obj_freed+0x293/0x520
> ? __lock_acquire+0x509/0x2110
> ? lockdep_hardirqs_on+0x7d/0x110
> ? kvm_clock_get_cycles+0x41/0x70
> sctp_assoc_bh_rcv+0x38f/0x700
> sctp_inq_push+0x262/0x310
> sctp_backlog_rcv+0x16c/0x5a0
> ? __pfx_sctp_backlog_rcv+0x10/0x10
> ? __pfx_sctp_backlog_rcv+0x10/0x10
> __release_sock+0x3a0/0x440
> release_sock+0x1ea/0x280
> sctp_sendmsg+0x8e4/0x1dd0
> ? __pfx_sctp_sendmsg+0x10/0x10
> ? aa_sock_msg_perm+0x127/0x200
> ? __pfx_sctp_sendmsg+0x10/0x10
> ? __pfx_inet_sendmsg+0x10/0x10
> inet_sendmsg+0x126/0x150
> __sys_sendto+0x474/0x520
> ? __pfx___sys_sendto+0x10/0x10
> ? fput+0x7d/0xe0
> ? fput+0x7d/0xe0
> ? fput+0x7d/0xe0
> ? trace_preempt_on+0x122/0x170
> ? fput+0x7d/0xe0
> ? preempt_count_sub+0xfc/0x1a0
> ? fput+0xa2/0xe0
> ? ksys_write+0x1a8/0x240
> ? __pfx_ksys_write+0x10/0x10
> __x64_sys_sendto+0xe5/0x1c0
> ? lockdep_hardirqs_on+0x7d/0x110
> do_syscall_64+0x12e/0x7a0
> entry_SYSCALL_64_after_hwframe+0x77/0x7f
> RIP: 0033:0x7f166adb2b7d
> Code: 02 b8 ff ff ff ff c3 66 0f 1f 44 00 00 f3 0f 1e fa 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 a8 ff ff ff f7 d8 64 89 01 48
> RSP: 002b:00007f166bd5cf98 EFLAGS: 00000246 ORIG_RAX: 000000000000002c
> RAX: ffffffffffffffda RBX: 00007f166b045fa0 RCX: 00007f166adb2b7d
> RDX: 0000000000000001 RSI: 0000200000000000 RDI: 0000000000000003
> RBP: 00007f166bd5d010 R08: 0000200000000040 R09: 000000000000001c
> R10: 0000000020004845 R11: 0000000000000246 R12: 0000000000000002
> R13: 00007f166b046038 R14: 00007f166b045fa0 R15: 00007f166bd3d000
> </TASK>
>
> Allocated by task 11114:
> kasan_save_stack+0x24/0x50
> kasan_save_track+0x14/0x30
> __kasan_kmalloc+0x7f/0x90
> __kmalloc_node_track_caller_noprof+0x339/0x800
> kmalloc_reserve+0xeb/0x350
> __alloc_skb+0x197/0x740
> sctp_packet_transmit+0x1eb/0x3210
> sctp_outq_flush_transports+0x39d/0x7e0
> sctp_outq_uncork+0x18d/0x200
> sctp_do_sm+0x23d4/0x55a0
> sctp_assoc_bh_rcv+0x38f/0x700
> sctp_inq_push+0x262/0x310
> sctp_backlog_rcv+0x16c/0x5a0
> __release_sock+0x3a0/0x440
> release_sock+0x1ea/0x280
> sctp_sendmsg+0x8e4/0x1dd0
> inet_sendmsg+0x126/0x150
> __sys_sendto+0x474/0x520
> __x64_sys_sendto+0xe5/0x1c0
> do_syscall_64+0x12e/0x7a0
> entry_SYSCALL_64_after_hwframe+0x77/0x7f
>
> Freed by task 11114:
> kasan_save_stack+0x24/0x50
> kasan_save_track+0x14/0x30
> kasan_save_free_info+0x3b/0x60
> __kasan_slab_free+0x43/0x70
> kfree+0x27b/0x660
> skb_free_head+0xb9/0x150
> pskb_expand_head+0x3b3/0x10b0
> skb_might_realloc+0xb6/0xd0
> sctp_sf_do_5_2_4_dupcook+0x206/0x3320
> sctp_do_sm+0x177/0x55a0
> sctp_assoc_bh_rcv+0x38f/0x700
> sctp_inq_push+0x262/0x310
> sctp_backlog_rcv+0x16c/0x5a0
> __release_sock+0x3a0/0x440
> release_sock+0x1ea/0x280
> sctp_sendmsg+0x8e4/0x1dd0
> inet_sendmsg+0x126/0x150
> __sys_sendto+0x474/0x520
> __x64_sys_sendto+0xe5/0x1c0
> do_syscall_64+0x12e/0x7a0
> entry_SYSCALL_64_after_hwframe+0x77/0x7f
>
> The buggy address belongs to the object at ff1100017d765800
> which belongs to the cache kmalloc-1k of size 1024
> The buggy address is located 230 bytes inside of
> freed 1024-byte region [ff1100017d765800, ff1100017d765c00)
>
> The buggy address belongs to the physical page:
> page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x17d760
> head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
> flags: 0x17ff00000000040(head|node=0|zone=2|lastcpupid=0x7ff)
> page_type: f5(slab)
> raw: 017ff00000000040 ff11000100038dc0 dead000000000100 dead000000000122
> raw: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000
> head: 017ff00000000040 ff11000100038dc0 dead000000000100 dead000000000122
> head: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000
> head: 017ff00000000003 fffffffffffffe01 00000000ffffffff 00000000ffffffff
> head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008
> page dumped because: kasan: bad access detected
> page_owner tracks the page as allocated
> page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 9374, tgid 9374 ((spawn)), ts 163178481859
> post_alloc_hook+0xff/0x130
> get_page_from_freelist+0xdd0/0x2b70
> __alloc_frozen_pages_noprof+0x2bd/0x2e10
> new_slab+0xb5/0x6a0
> refill_objects+0x113/0x3d0
> __pcs_replace_empty_main+0x35f/0x680
> __kmalloc_noprof+0x5c5/0x7f0
> load_elf_phdrs+0x107/0x210
> load_elf_binary+0x233/0x4fc0
> bprm_execve+0x8d7/0x1930
> do_execveat_common.isra.0+0x48d/0x5e0
> __x64_sys_execve+0x98/0xd0
> do_syscall_64+0x12e/0x7a0
> entry_SYSCALL_64_after_hwframe+0x77/0x7f
> page last free pid 9372 tgid 9372 ts 163145729632 stack trace:
> __free_frozen_pages+0x870/0x1170
> qlist_free_all+0x4c/0xf0
> kasan_quarantine_reduce+0x195/0x1e0
> __kasan_slab_alloc+0x49/0x70
> kmem_cache_alloc_noprof+0x23a/0x680
> do_getname+0x39/0x3e0
> do_sys_openat2+0xa7/0x250
> __x64_sys_openat+0x144/0x200
> do_syscall_64+0x12e/0x7a0
> entry_SYSCALL_64_after_hwframe+0x77/0x7f
>
> Memory state around the buggy address:
> ff1100017d765780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
> ff1100017d765800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
> >ff1100017d765880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
> ^
> ff1100017d765900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
> ff1100017d765980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
> ==================================================================
> Kernel panic - not syncing: KASAN: panic_on_warn set ...
> CPU: 3 UID: 0 PID: 11114 Comm: syz.0.57 Not tainted 7.3.0-kernsight-kasan #1 PREEMPT(full)
> Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014
> Call Trace:
> <TASK>
> dump_stack_lvl+0x3d/0x1b0
> vpanic+0x7f8/0xa80
> ? __pfx_vpanic+0x10/0x10
> ? __pfx_vprintk_emit+0x10/0x10
> ? sctp_unpack_cookie+0xb57/0xf30
> panic+0xc7/0xd0
> ? __pfx_panic+0x10/0x10
> ? _raw_spin_unlock_irqrestore+0x46/0x80
> ? sctp_unpack_cookie+0xb57/0xf30
> ? rcu_is_watching+0x13/0xc0
> ? _raw_spin_unlock_irqrestore+0x46/0x80
> check_panic_on_warn+0xb6/0xc0
> end_report+0x12c/0x180
> ? sctp_unpack_cookie+0xb57/0xf30
> kasan_report+0xa4/0xd0
> ? sctp_unpack_cookie+0xb57/0xf30
> sctp_unpack_cookie+0xb57/0xf30
> ? pskb_expand_head+0x591/0x10b0
> ? __pfx_sctp_unpack_cookie+0x10/0x10
> ? __pfx_pskb_expand_head+0x10/0x10
> ? dump_stack_lvl+0x15f/0x1b0
> ? should_fail_ex+0x35d/0x650
> sctp_sf_do_5_2_4_dupcook+0x2e2/0x3320
> ? __pfx_sctp_sf_do_5_2_4_dupcook+0x10/0x10
> ? sctp_sm_lookup_event+0x183/0x580
> ? kasan_save_track+0x14/0x30
> ? __kasan_slab_free+0x43/0x70
> ? kmem_cache_free+0x292/0x6a0
> ? sctp_chunk_put+0x20b/0x2c0
> ? sctp_inq_pop+0x691/0x10f0
> ? sctp_assoc_bh_rcv+0x113/0x700
> ? sctp_inq_push+0x262/0x310
> ? __pfx_sctp_cname+0x10/0x10
> sctp_do_sm+0x177/0x55a0
> ? rcu_is_watching+0x13/0xc0
> ? preempt_count_sub+0xfc/0x1a0
> ? __pfx_sctp_do_sm+0x10/0x10
> ? debug_check_no_obj_freed+0x293/0x520
> ? __lock_acquire+0x509/0x2110
> ? lockdep_hardirqs_on+0x7d/0x110
> ? kvm_clock_get_cycles+0x41/0x70
> sctp_assoc_bh_rcv+0x38f/0x700
> sctp_inq_push+0x262/0x310
> sctp_backlog_rcv+0x16c/0x5a0
> ? __pfx_sctp_backlog_rcv+0x10/0x10
> ? __pfx_sctp_backlog_rcv+0x10/0x10
> __release_sock+0x3a0/0x440
> release_sock+0x1ea/0x280
> sctp_sendmsg+0x8e4/0x1dd0
> ? __pfx_sctp_sendmsg+0x10/0x10
> ? aa_sock_msg_perm+0x127/0x200
> ? __pfx_sctp_sendmsg+0x10/0x10
> ? __pfx_inet_sendmsg+0x10/0x10
> inet_sendmsg+0x126/0x150
> __sys_sendto+0x474/0x520
> ? __pfx___sys_sendto+0x10/0x10
> ? fput+0x7d/0xe0
> ? fput+0x7d/0xe0
> ? fput+0x7d/0xe0
> ? trace_preempt_on+0x122/0x170
> ? fput+0x7d/0xe0
> ? preempt_count_sub+0xfc/0x1a0
> ? fput+0xa2/0xe0
> ? ksys_write+0x1a8/0x240
> ? __pfx_ksys_write+0x10/0x10
> __x64_sys_sendto+0xe5/0x1c0
> ? lockdep_hardirqs_on+0x7d/0x110
> do_syscall_64+0x12e/0x7a0
> entry_SYSCALL_64_after_hwframe+0x77/0x7f
> RIP: 0033:0x7f166adb2b7d
> Code: 02 b8 ff ff ff ff c3 66 0f 1f 44 00 00 f3 0f 1e fa 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 a8 ff ff ff f7 d8 64 89 01 48
> RSP: 002b:00007f166bd5cf98 EFLAGS: 00000246 ORIG_RAX: 000000000000002c
> RAX: ffffffffffffffda RBX: 00007f166b045fa0 RCX: 00007f166adb2b7d
> RDX: 0000000000000001 RSI: 0000200000000000 RDI: 0000000000000003
> RBP: 00007f166bd5d010 R08: 0000200000000040 R09: 000000000000001c
> R10: 0000000020004845 R11: 0000000000000246 R12: 0000000000000002
> R13: 00007f166b046038 R14: 00007f166b045fa0 R15: 00007f166bd3d000
> </TASK>
> Kernel Offset: disabled
> Rebooting in 86400 seconds..
>
> The 7.1.3 report is included in the repository
> (logs/cebee8cfa01b-kasan-7.1.3.txt). It has the same paths: access in
> sctp_unpack_cookie+0xa56/0xdc0 (net/sctp/sm_make_chunk.c:1744); allocation in
> __alloc_skb() from sctp_packet_transmit() (net/sctp/output.c:598); free in
> pskb_expand_head() -> skb_free_head(), reached through skb_might_realloc()
> (net/core/skb_fault_injection.c) from pskb_pull() in
> sctp_sf_do_5_2_4_dupcook() (net/sctp/sm_statefuns.c:2235); the subsequent call
> that enters sctp_unpack_cookie() is at net/sctp/sm_statefuns.c:2244.
>
> Analysis and related report
> ---------------------------
> The report suggests that pointers into the skb data buffer become stale after
> pskb_pull() triggers skb reallocation in sctp_sf_do_5_2_4_dupcook(). A
> subsequent access in sctp_unpack_cookie() then reads from the old buffer.
>
> I found the following related report concerning the HEARTBEAT path:
> https://lists.openwall.net/netdev/2026/04/15/25
>
> I also read Xin's response regarding skb linearization in the receive path:
> https://lists.openwall.net/netdev/2026/04/15/178
>
> My report concerns the COOKIE-ECHO path rather than the HEARTBEAT path. I have
> not established whether this reallocation is reachable without fault injection,
> or whether this should be treated as an issue with the fault-injection coverage
> of an already-linearized skb. On 7.3.0 the minimised program alone did not
> trigger while the 42-program sequence did; the preceding operations may matter,
> but I have not isolated them.
>
> Could you help determine whether this is an SCTP pointer-lifetime issue that
> needs a fix, a related instance of the earlier report, or an artifact of forced
> skb reallocation?
>
> Attachments / repository contents
> ---------------------------------
> repro/repro.prog syz program, includes fail_nth: 43 (7.1.3)
> repro/repro.cprog C reproducer with fail-nth setup (7.1.3)
> repro/repro.kernsight.prog 42-program execution sequence (7.3.0)
> logs/cebee8cfa01b-kasan-7.1.3.txt full 7.1.3 KASAN report
> logs/cebee8cfa01b-kasan-7.3.txt full 7.3.0 KASAN report (also inline)
> logs/serial-7.3.log full 7.3.0 console (sequence replay)
> logs/serial-7.3-minimal-no-trigger.log 7.3.0 standalone run 1 (no trigger)
> logs/serial-7.3-minimal2-no-trigger.log 7.3.0 standalone run 2 (no trigger)
> logs/serial-7.1.3-c-repro.log 7.1.3 C-reproducer console
> kernel/kernel-7.1.3.config, kernel/kernel-7.3.config
> cmdline/cmdline-7.1.3.txt, cmdline/cmdline-7.3.0.txt
> verify.sh re-checks the numbers quoted in this mail
> MANIFEST.sha256 sha256 of every file
>
> I am happy to provide additional information and test proposed patches.
>
> Best regards,
> Zheng Zheng
Thanks, Zheng, for the report.
This issue should not occur in a real-world environment without
CONFIG_FAIL_SKB_REALLOC enabled. Since commit 28cd77527345 ("[SCTP]: Always
linearise packet on input"), packets have always been linearized before
entering the SCTP stack.
We should revert the commit that introduced pskb_pull():
commit 62b08083ec3dbfd7e533c8d230dd1d8191a6e813
Author: Sridhar Samudrala <sri@us.ibm.com>
Date: Fri May 5 17:04:43 2006 -0700
[SCTP]: Fix panic's when receiving fragmented SCTP control chunks.
Could you test the kernel with this commit reverted?
Note that you may need to revert it manually due to differences in the
surrounding code.
Thanks.
Technical Details
Message-ID:
<CADvbK_e+ogH4zafpqz8N=jY-oBruke8OLd4PEz9xa-y13Ys_3g@mail.gmail.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-351447-linux-kernel-netdev=dewy.ruReferences:
<CAO-4RZ1ZCPNR2Z4xoHDh0Vp3SO51oX7ojuH0CG4MsD14-RegcA@mail.gmail.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-351447-linux-kernel-netdev=dewy.ru
From: lucien.xin@gmail.com (Xin Long)
Newsgroups: linux.kernel.netdev
Subject: Re: [BUG] SCTP: KASAN use-after-free in sctp_unpack_cookie with
fail_skb_realloc (7.3.0)
Date: Sat, 24 Oct 2026 17:46:08 -0400
Organization: Usenet Network
Message-ID: <CADvbK_e+ogH4zafpqz8N=jY-oBruke8OLd4PEz9xa-y13Ys_3g@mail.gmail.com>
References: <CAO-4RZ1ZCPNR2Z4xoHDh0Vp3SO51oX7ojuH0CG4MsD14-RegcA@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Injection-Info: usenet.network;
logging-data="869752"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:ZOnHC1q+5lQ5DjSaPUrj96GAuCk= sha256:Kcuzp65AxdGjQelP9rqy8V543ynC3wJK5ZoMlzLDrIU=
sha1:wbnRcL3bmDpXab7JGoSvhFN/mLA= sha256:ebKBL8hAhOaR1AtTmjGIP7b4u+/BWuxPDYjjta1GF5k=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
by mail.dewy.ru (Postfix) with ESMTP id 9989011169E; Sun, 25 Oct 2026 00:46:51 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.047
X-Spam-Status: No, score=-3.047 tagged_above=-9999 required=6.31
tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
DKIM_VALID_AU=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001,
FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25,
MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
header.d=gmail.com
X-Received: from mail.dewy.ru ([127.0.0.1])
by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id aCRhizR1rB8T;
Sun, 25 Oct 2026 00:46:42 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-351447-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=gmail.com
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
by mail.dewy.ru (Postfix) with ESMTPS id 32B57111678; Sun, 25 Oct 2026 00:46:32 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
by sea.lore.kernel.org (Postfix) with ESMTP id CE0A12EC0A; Sat, 24 Oct 2026 21:46:22 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=3; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
t=1792878382;
b=NRonkVDyPO3amankOAKyYixlG3rlw1EdFSC3seEgI7QOkcyih+notLrQq7zxxTofZQh5
gSEM/3yWkma3ivKURR8AeoTF0nFgZyQUGIS/o3zizTl5QPNmF3tdTuQkQT/vpTyKwXhJL
BIKdU/5FCAIden0M2ZaQo7xny9B1f02GPtfbLf3EVSncwfnS5I1Ovx3EvRQiDmzD7g15w
Nw+nioAPkiaWJaMpGhwZtPkqjhxQvEO6til5IG2qK9SXq/Fxb/olcuszMhvc7npzWT+mp
wIZyBVFPCU1OjsJrVZnD8rhYig0MhUydOKyKPHMF8c9EVi9h+XByOv9hVCfssv0wqlw==
X-ARC-Message-Signature: i=3; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1792878382;
h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:
X-Google-DKIM-Signature:X-Forwarded-Encrypted:X-Gm-Message-State:
X-Gm-Gg:X-Received:X-Mailing-List:List-Id:List-Post:List-Help:
List-Subscribe:List-Unsubscribe:List-Owner:Precedence:MIME-Version:
References:In-Reply-To:From:Date:X-Gm-Features:Message-ID:Subject:To:
Cc:Content-Type:Content-Transfer-Encoding;
bh=VHg2nkvxksFglrNF8idO8+z4eCsyR2ar+tSdL7v7pP4=;
b=Bb/UAuBuadO31XxjjHqQ72NngVgFRg6ZMQo1onmEJs2dIM+GoUCA9wOzlqlwTxUpU4FB
IiF1Tm3G+MFqYqbPAoBKH6ZKQKMn2GoxCxcekyJm0n0EUM0jo3oUoxIVQb45dl4OLwhwr
vF7PtLXYTCS4Mp2bk5JrKH2P9rdYqM/njRBRGQCmBi6GanuNvoXeB21dHZeyogmWX9qAC
sOo72qYxNGLLL/x7/mn8cee3yV+hDK1OaCJ45ivjKczPgIwvnsGsnOl5wmOaF27rCLiG6
sGmoTJtyNGz1Jt1etMfRwASNIgymeBzIG+dawqABM7EUQ308nVyJwVoXybZ0u+xaLOA==
X-ARC-Authentication-Results: i=3; smtp.subspace.kernel.org;
dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=nI7qyl9K;
dmarc=pass header.from=gmail.com;
spf=pass smtp.mailfrom=gmail.com;
arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 8C835606A322;
Sat, 24 Oct 2026 21:46:22 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=nI7qyl9K
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=209.85.215.180
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
t=1792878381;
b=rpwVQ086WSmp5Z3/CXwCwHWckFNZXWJMWQf9eIQMnPIYIDUctL8314T7KxV8eXZnSo7/
jsqyRO/k3LYHIk/cNewZ7gw9XDjrB1/18ptthPbI15FrnfIVuk6GYfoQ1UL1IFvc6JTXU
P+E6LC3BLwGXrgpSzQyx8M+cr/UlddZIkaAbMcRu0c9roTavUMgTUIW8xtWFVozgNL3ND
R5/kbEu2gTBGcPGromIhTzacaiCVsshvnNoXx1rJYV/hI757d6I0OPgE+IWdOSGAKJXuL
jX9PqeYKDmKm1Y6M6JXVxkXRVk9BLiYPIqayabJmT2yuTDtsDe6ejVsDJahwWFYt77g==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1792878381;
h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature:
X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:
MIME-Version:References:In-Reply-To:From:Date:X-Gm-Features:
Message-ID:Subject:To:Cc:Content-Type:Content-Transfer-Encoding;
bh=VHg2nkvxksFglrNF8idO8+z4eCsyR2ar+tSdL7v7pP4=;
b=DuJXg73FHSbbPg/p6trZLpfz+cTLIiZ+M+OO7inxHteQ8Ohy8z0DFAbjEjPalII5uzoU
uJtEYYsPG6Aqwcl3JynE7fUi8BAqoZU1PFgglA4PjpsIxsM15AF7wPG750sv+DfuoZKn/
T7rSTjARhBU4SoqsGRxBMq6fxYBfLV4jQtfeUzyRVgdlZcV05lS4zimfsyvgNtJNzyTBw
VoBWF6hzl893XkQ88WGlD96a9wuNi8aXyJD9owOjeJhriRTsIPOoUXcqMX4BAHz211vui
di8J4l7Xlycfb91tZ1rZ6H7YDVNhqOgiRISFwWLPcZ3bXh2R6n1ELwJxnwLx4EpuzWw==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org;
dmarc=pass header.from=gmail.com;
spf=pass smtp.mailfrom=gmail.com;
dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=nI7qyl9K;
arc=pass header.oldest-pass=0 smtp.remote-ip=209.85.215.180
X-Received: from mail-pg1-f180.google.com (mail-pg1-f180.google.com [209.85.215.180])
(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9FA51606A31A
for <netdev@vger.kernel.org>; Sat, 24 Oct 2026 21:46:20 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 9FA51606A31A
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
X-Received: by mail-pg1-f180.google.com with SMTP id 41be03b00d2f7-cc147d86bebso889024a12.0
for <netdev@vger.kernel.org>; Sat, 24 Oct 2026 14:46:20 -0700 (PDT)
X-ARC-Seal: i=1; a=rsa-sha256; t=1792878380; cv=none;
d=google.com; s=arc-20260327;
b=ox1x8PDAbbjQ7QzJr0AFrDbGZAhoxmK9QtA9nJjwdmlV1tA4x9ECdIrbsDvHn/l42T
71vVF5gZL94+Qw+O7OLuqFWQ5fARSnmIYObaHfWw0CXEodVxGdWdgy/S69+uaB3einjG
p4nh22fvLPNcpgvH/5o12GPbFdLy8GvIShcMMC5weNoyPCC4PTqCvJ3mA94wPARrW8Ts
nJ/LEdoZBYIFAvV6PSvdcKNc28AQ73aJMIztlrjdTOrplKO3PnuS9nE+rNsU1YH/6rW4
dCpieZ0jpnsOx609o7W+AmYg1HZLLacuNo/ZPaw2hRA6BnjPem9yCJxqyVaICPxpBZTQ
kOLQ==
X-ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327;
h=content-transfer-encoding:cc:to:subject:message-id:date:from
:in-reply-to:references:mime-version:dkim-signature;
bh=VHg2nkvxksFglrNF8idO8+z4eCsyR2ar+tSdL7v7pP4=;
fh=8U4P2ENB2rYSWK5i7BMtc6WXjuHXF4EYJwXaVV8ifjo=;
b=W+Qvt7nmjpbUbgQgBadgTTi3bC0dwx3bxnTR6slg8U2omzfP9B57/GmtiCefcnxxPh
Z8mWmgU+7zXEA4/pJMIMoYFTYB5QTiHkTvgnFOGqiqesQpCC/IbsRdum6Hh6NKjPrx9s
1JyXimSc4rYEkaADfyApXSrg3t5cB5ZrPnwAgIVhbtrxhOewhABaEaoQi+cVN4TscXh0
HLI/CLvOc5cqCCdFWQh5uxke+482Ovior47UsN44EM7lql0gtzMtGq03ClSilZWWlJ1o
QOCS3uG1vVv5uYmH9kDceFYppRy10uzLrQbqaIFXVLHrn1bw8hx7thwijZ+5iTWHuSXB
hqwg==;
darn=vger.kernel.org
X-ARC-Authentication-Results: i=1; mx.google.com; arc=none
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20251104; t=1792878380; x=1793483180; darn=vger.kernel.org;
h=content-transfer-encoding:content-type:cc:to:subject:message-id
:date:from:in-reply-to:references:mime-version:from:to:cc:subject
:date:message-id:reply-to:content-type;
bh=VHg2nkvxksFglrNF8idO8+z4eCsyR2ar+tSdL7v7pP4=;
b=nI7qyl9KeHkJ4LO/u9V5+GgwMaxJUJlxqVN+bTHdNtsIW3MQ/4OmjA1ChCoPrswq6R
w9XaYii/QAiqlsV4jC0nCz4QEPesHlLm+uP0EyCvc0t+bT4EgJveRtxKsymNU1Aaxrrr
2ZcMRETmAoS0ttaOsdn2qlvTRxKFAjktmDrB1b67hczxv/bUAWWWyrCs4XhXydpFJbnb
TLEs1WopMrJyWjpUPpNEpn9BHyMioKXOBpkAi08sBQJtMKoiC94vQu7KUNWCH3gsKeJi
xA5HKoPEJn20fsnFKlzWZhkILy5HVVnVWtRzekg5Z53l4F8EwDJJRGJwkI0eHjuFmykF
xLhA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20260707; t=1792878380; x=1793483180;
h=content-transfer-encoding:content-type:cc:to:subject:message-id
:date:from:in-reply-to:references:mime-version:x-gm-gg
:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to
:content-type;
bh=VHg2nkvxksFglrNF8idO8+z4eCsyR2ar+tSdL7v7pP4=;
b=Cc51nbXkCk1kvtHgwtotlxzdeSQ4cD4tFVMToN50XGMllwXpMxquyfB8O2jnP1cCG6
BvkCZPcoQdo5ovUs3VzJ16+RGnI0XkmyH8BkkIzbkLB//sYU8095ZesfQ/ExVBOEXTBO
EVu/Gp7kTX3BqhsDvtWelRIWahrxex/rWnJSGYxUq47QmYatEZX7Ja0yYYN3FxQRioxf
qPfz6a3RB/feqmstltBy7rk/qjK+zwa7B6rwGuNIsNZeOMo7soxzT07RwcVhsfNebJh3
6TuudOqqUoDcNVLz2ji0m7wshc8zqbR/CBjaNO5fJnxD/h69AGvticbJizZVFaEU+lO9
claw==
X-Forwarded-Encrypted: i=1; AKwUvByJUII1RXG2QCij/nzwNdy8Mxi6PK2KSup0EULNB0iGcgreLDa004jQqalAAZ+JEpQ5HP3TOV8=@vger.kernel.org
X-Gm-Message-State: AFq9FYJQFKYhmNZre0HWARy5BDfRJiKHH8yMWo49+gO6iHAmjwGuGqxo
x/02Nk3hGxpB8N1KuzJ8uLGqYU1+gijMq4Sclx6FHEUzJWBCGkwnbK0jjgRrTozQZmbiJ7HnaL8
GXwNpP9uZQVzubiO7jVn7r3UVlJVW5N0=
X-Gm-Gg: AYBFou1Csh9xdV58f542bmwRFuz3jlaZSN0pFLjPKrU3xJBhvR+jj361Y26cidENA30
ytLy/kUl3y61KzftcxCmkPW7WYhV73fb41i5tqv0jj+zQEyiVhW3861zFlbXVf2Z8C6eC4YDeHZ
h+TMVT9kaBSbdI4toBlSMUR4sQ0jE7FmeARW+9TH5KJOdD+4eD3u8cyJo9FCsKdUbtGI/u1Jzhp
5WaiBZisfS5c4/HPd7BZoOaebhW0JmsAU7h5oa6rhsNzoYyep0UVz2UEBUnQ04dREGlt0EIZ8NH
XibxN6MnaDl07e7oj3pBq3JYzilcUE4k1CxCt2oIL0YaJH/X9eqxWlbg1pI/cgroET1qbccEv0e
TPEBZgx07XgFNWBYfKGXhht1yQWfwhSZMgunUGJVmVfGQ8nOM6+Burlt+KOJwtVHzuVd83ZGH74
hCWSxy2e3GNv3/gl0X9m1b5DrjcHq/wD8o4rg/
X-Received: by 2002:a05:6a20:7345:b0:3e1:e6b1:fc25 with SMTP id
adf61e73a8af0-3e7bfa305f4mr1698347637.9.1792878379736; Sat, 24 Oct 2026
14:46:19 -0700 (PDT)
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list
X-In-Reply-To: <CAO-4RZ1ZCPNR2Z4xoHDh0Vp3SO51oX7ojuH0CG4MsD14-RegcA@mail.gmail.com>
X-Gm-Features: AclHuK-2jdZjvoe57o83B38c8g7ZCaZEWlDlW1aJW_vCBMW9WeEI51dF3oT4BnM
X-Cc: marcelo.leitner@gmail.com, linux-sctp@vger.kernel.org,
netdev@vger.kernel.org