syzbot


kernel panic: corrupted stack end in tcp_setsockopt

Status: fixed on 2023/02/24 13:50
Subsystems: netfilter
[Documentation on labels]
Fix commit: b81d591386c3 riscv: Increase stack size under KASAN
First crash: 681d, last: 533d

Sample crash report:
Kernel panic - not syncing: corrupted stack end detected inside scheduler
CPU: 0 PID: 2031 Comm: syz-executor.0 Not tainted 5.17.0-rc1-syzkaller-00002-g0966d385830d #0
Hardware name: riscv-virtio,qemu (DT)
Call Trace:
[<ffffffff8000a228>] dump_backtrace+0x2e/0x3c arch/riscv/kernel/stacktrace.c:113
[<ffffffff831668cc>] show_stack+0x34/0x40 arch/riscv/kernel/stacktrace.c:119
[<ffffffff831756ba>] __dump_stack lib/dump_stack.c:88 [inline]
[<ffffffff831756ba>] dump_stack_lvl+0xe4/0x150 lib/dump_stack.c:106
[<ffffffff83175742>] dump_stack+0x1c/0x24 lib/dump_stack.c:113
[<ffffffff83166fa8>] panic+0x24a/0x634 kernel/panic.c:233
[<ffffffff831a688a>] schedule_debug kernel/sched/core.c:5541 [inline]
[<ffffffff831a688a>] schedule+0x0/0x14c kernel/sched/core.c:6187
[<ffffffff831a6c62>] preempt_schedule_notrace+0x9c/0x19a kernel/sched/core.c:6541
[<ffffffff80115c54>] rcu_read_unlock_sched_notrace include/linux/rcupdate.h:816 [inline]
[<ffffffff80115c54>] trace_lock_release include/trace/events/lock.h:58 [inline]
[<ffffffff80115c54>] lock_release+0x3da/0x614 kernel/locking/lockdep.c:5650
[<ffffffff831a7d4c>] __mutex_unlock_slowpath+0xa4/0x3a2 kernel/locking/mutex.c:893
[<ffffffff831a8058>] mutex_unlock+0xe/0x16 kernel/locking/mutex.c:540
[<ffffffff803a7b6c>] pcpu_alloc+0xd50/0x1278 mm/percpu.c:1874
[<ffffffff803a80f2>] __alloc_percpu+0x28/0x34 mm/percpu.c:1949
[<ffffffff82aa74f4>] xt_percpu_counter_alloc+0xee/0x106 net/netfilter/x_tables.c:1930
[<ffffffff82c62bae>] find_check_entry.constprop.0+0xc8/0x55e net/ipv4/netfilter/ip_tables.c:528
[<ffffffff82c64176>] translate_table+0x7ae/0xc24 net/ipv4/netfilter/ip_tables.c:718
[<ffffffff82c6677c>] do_replace.constprop.0+0x28c/0x7fe net/ipv4/netfilter/ip_tables.c:1136
[<ffffffff82c66f96>] do_ipt_set_ctl+0x2a8/0x51e net/ipv4/netfilter/ip_tables.c:1630
[<ffffffff829a1420>] nf_setsockopt+0x6c/0xac net/netfilter/nf_sockopt.c:101
[<ffffffff82b0561a>] ip_setsockopt+0x102/0x10c net/ipv4/ip_sockglue.c:1444
[<ffffffff82b2704e>] tcp_setsockopt+0x76/0xb2 net/ipv4/tcp.c:3685
[<ffffffff826da07c>] sock_common_setsockopt+0x6a/0x7c net/core/sock.c:3489
[<ffffffff826d7740>] __sys_setsockopt+0x1d2/0x3e0 net/socket.c:2180
[<ffffffff826d7988>] __do_sys_setsockopt net/socket.c:2191 [inline]
[<ffffffff826d7988>] sys_setsockopt+0x3a/0x4c net/socket.c:2188
[<ffffffff80005716>] ret_from_syscall+0x0/0x2
SMP: stopping secondary CPUs
Rebooting in 86400 seconds..

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/11/11 06:53 git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git fixes 0966d385830d f42ee5d8 .config console log report info ci-qemu2-riscv64 kernel panic: corrupted stack end in tcp_setsockopt
2022/09/02 02:57 git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git fixes 0966d385830d a805568e .config console log report info ci-qemu2-riscv64 kernel panic: corrupted stack end in tcp_setsockopt
2022/06/15 15:51 git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git fixes 0966d385830d 1719ee24 .config console log report info ci-qemu2-riscv64 kernel panic: corrupted stack end in tcp_setsockopt
* Struck through repros no longer work on HEAD.