panic: UBSan: Undefined Behavior in /syzkaller/managers/netbsd-kubsan/kernel/sys/kern/kern_mutex.c:LINE, member access w

1 view
Skip to first unread message

syzbot

unread,
Nov 24, 2019, 12:46:09 AM11/24/19
to syzkaller-...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: 7ff547a2 sched_tick: examine the correct LWP, and lock it.
git tree: netbsd
console output: https://syzkaller.appspot.com/x/log.txt?x=16f86d5ee00000
kernel config: https://syzkaller.appspot.com/x/.config?x=824b23e1f4b6c76b
dashboard link: https://syzkaller.appspot.com/bug?extid=140776e0ee6b89130d2c

Unfortunately, I don't have any reproducer for this crash yet.

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+140776...@syzkaller.appspotmail.com

[ 163.6308051] panic: UBSan: Undefined Behavior in
/syzkaller/managers/netbsd-kubsan/kernel/sys/kern/kern_mutex.c:472:6,
member access within null pointer of type 'struct kmutex_t'

[ 163.6509457] cpu0: Begin traceback...
[ 163.6708525] vpanic() at netbsd:vpanic+0x2aa sys/kern/subr_prf.c:336
[ 163.7309440] isAlreadyReported() at netbsd:isAlreadyReported
[ 163.7910291] HandleTypeMismatch.part.1() at
netbsd:HandleTypeMismatch.part.1+0x15b
[ 163.8611267] HandleTypeMismatch() at netbsd:HandleTypeMismatch+0x7b
sys/../common/lib/libc/misc/ubsan.c:408
[ 163.9111991] mutex_enter() at netbsd:mutex_enter+0x1457
sys/kern/kern_mutex.c:472
[ 163.9813037] unp_accept() at netbsd:unp_accept+0x177
sys/kern/uipc_usrreq.c:849
[ 164.0413867] soaccept() at netbsd:soaccept+0x12f
sys/kern/uipc_socket.c:802
[ 164.0914621] do_sys_accept() at netbsd:do_sys_accept+0x3de
sys/kern/uipc_syscalls.c:244
[ 164.1515473] sys_paccept() at netbsd:sys_paccept+0xdd
sys/kern/uipc_syscalls.c:321
[ 164.2016198] sys___syscall() at netbsd:sys___syscall+0x1c8 sy_call
sys/sys/syscallvar.h:65 [inline]
[ 164.2016198] sys___syscall() at netbsd:sys___syscall+0x1c8
sys/kern/sys_syscall.c:77
[ 164.2617090] syscall() at netbsd:syscall+0x29a sy_call
sys/sys/syscallvar.h:65 [inline]
[ 164.2617090] syscall() at netbsd:syscall+0x29a sy_invoke
sys/sys/syscallvar.h:94 [inline]
[ 164.2617090] syscall() at netbsd:syscall+0x29a
sys/arch/x86/x86/syscall.c:138
[ 164.2817379] --- syscall (number 198) ---
[ 164.2817379] Skipping crash dump on recursive panic
[ 164.2940674] panic: UBSan: Undefined Behavior in
/syzkaller/managers/netbsd-kubsan/kernel/sys/arch/amd64/amd64/db_machdep.c:153:24,
member access within misaligned address 0x4 for type 'struct x86_64_frame'
which requires 8 byte alignment

[ 164.3150596] Faulted in mid-traceback; aborting...
[ 164.3150596] fatal breakpoint trap in supervisor mode
[ 164.3230439] trap type 1 code 0 rip 0xffffffff8021ddfd cs 0x8 rflags
0x282 cr2 0x7ad1871ffff8 ilevel 0 rsp 0xffffb100b41908d0
[ 164.3360551] curlwp 0xffff9661cb971ac0 pid 2580.4 lowest kstack
0xffffb100b418e2c0
Stopped in pid 2580.4 (syz-executor.1) at netbsd:breakpoint+0x5:
leave
?
breakpoint() at netbsd:breakpoint+0x5
db_panic() at netbsd:db_panic+0x109 sys/ddb/db_panic.c:67
vpanic() at netbsd:vpanic+0x2aa sys/kern/subr_prf.c:336
isAlreadyReported() at netbsd:isAlreadyReported
HandleTypeMismatch.part.1() at netbsd:HandleTypeMismatch.part.1+0xcc
HandleTypeMismatch() at netbsd:HandleTypeMismatch+0x7b
sys/../common/lib/libc/misc/ubsan.c:408
db_nextframe() at netbsd:db_nextframe+0x6f6
sys/arch/amd64/amd64/db_machdep.c:153
db_stack_trace_print() at netbsd:db_stack_trace_print+0x2c4
sys/arch/x86/x86/db_trace.c:277
db_panic() at netbsd:db_panic+0xa3 x86_curcpu
sys/arch/amd64/compile/obj/GENERIC_SYZKALLER/./machine/cpu.h:67 [inline]
db_panic() at netbsd:db_panic+0xa3 sys/ddb/db_panic.c:57
vpanic() at netbsd:vpanic+0x2aa sys/kern/subr_prf.c:336
isAlreadyReported() at netbsd:isAlreadyReported
HandleTypeMismatch.part.1() at netbsd:HandleTypeMismatch.part.1+0x15b
HandleTypeMismatch() at netbsd:HandleTypeMismatch+0x7b
sys/../common/lib/libc/misc/ubsan.c:408
mutex_enter() at netbsd:mutex_enter+0x1457 sys/kern/kern_mutex.c:472
unp_accept() at netbsd:unp_accept+0x177 sys/kern/uipc_usrreq.c:849
soaccept() at netbsd:soaccept+0x12f sys/kern/uipc_socket.c:802
do_sys_accept() at netbsd:do_sys_accept+0x3de sys/kern/uipc_syscalls.c:244
sys_paccept() at netbsd:sys_paccept+0xdd sys/kern/uipc_syscalls.c:321
sys___syscall() at netbsd:sys___syscall+0x1c8 sy_call
sys/sys/syscallvar.h:65 [inline]
sys___syscall() at netbsd:sys___syscall+0x1c8 sys/kern/sys_syscall.c:77
syscall() at netbsd:syscall+0x29a sy_call sys/sys/syscallvar.h:65 [inline]
syscall() at netbsd:syscall+0x29a sy_invoke sys/sys/syscallvar.h:94 [inline]
syscall() at netbsd:syscall+0x29a sys/arch/x86/x86/syscall.c:138
--- syscall (number 198) ---
[ 164.3435249] Skipping crash dump on recursive panic
[ 164.3435249] panic: UBSan: Undefined Behavior in
/syzkaller/managers/netbsd-kubsan/kernel/sys/arch/amd64/amd64/db_machdep.c:154:14,
member access within misaligned address 0x4 for type 'struct x86_64_frame'
which requires 8 byte alignment

[ 164.3435249] Faulted in mid-traceback; aborting...
[ 164.3435249] fatal breakpoint trap in supervisor mode
[ 164.3435249] trap type 1 code 0 rip 0xffffffff8021ddfd cs 0x8 rflags
0x282 cr2 0x7ad1871ffff8 ilevel 0x8 rsp 0xffffb100b418f5d0
[ 164.3435249] curlwp 0xffff9661cb971ac0 pid 2580.4 lowest kstack
0xffffb100b418e2c0
Stopped in pid 2580.4 (syz-executor.1) at netbsd:breakpoint+0x5:
leave


---
This bug is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this bug report. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

syzbot

unread,
Nov 24, 2019, 1:16:09 AM11/24/19
to syzkaller-...@googlegroups.com
syzbot has found a reproducer for the following crash on:

HEAD commit: 7ff547a2 sched_tick: examine the correct LWP, and lock it.
git tree: netbsd
console output: https://syzkaller.appspot.com/x/log.txt?x=16d6b47ae00000
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=161ead02e00000

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+140776...@syzkaller.appspotmail.com

[ 40.6201201] panic: UBSan: Undefined Behavior in
/syzkaller/managers/netbsd-kubsan/kernel/sys/kern/kern_mutex.c:472:6,
member access within null pointer of type 'struct kmutex_t'

[ 40.6201201] cpu1: Begin traceback...
[ 40.6401608] vpanic() at netbsd:vpanic+0x2aa sys/kern/subr_prf.c:336
[ 40.6802780] isAlreadyReported() at netbsd:isAlreadyReported
[ 40.7103504] HandleTypeMismatch.part.1() at
netbsd:HandleTypeMismatch.part.1+0x15b
[ 40.7404171] HandleTypeMismatch() at netbsd:HandleTypeMismatch+0x7b
sys/../common/lib/libc/misc/ubsan.c:408
[ 40.7704901] mutex_enter() at netbsd:mutex_enter+0x1457
sys/kern/kern_mutex.c:472
[ 40.8105806] unp_accept() at netbsd:unp_accept+0x177
sys/kern/uipc_usrreq.c:849
[ 40.8406485] soaccept() at netbsd:soaccept+0x12f
sys/kern/uipc_socket.c:802
[ 40.8707184] do_sys_accept() at netbsd:do_sys_accept+0x3de
sys/kern/uipc_syscalls.c:244
[ 40.9007864] sys_paccept() at netbsd:sys_paccept+0xdd
sys/kern/uipc_syscalls.c:321
[ 40.9308563] sys___syscall() at netbsd:sys___syscall+0x1c8 sy_call
sys/sys/syscallvar.h:65 [inline]
[ 40.9308563] sys___syscall() at netbsd:sys___syscall+0x1c8
sys/kern/sys_syscall.c:77
[ 40.9609313] syscall() at netbsd:syscall+0x29a sy_call
sys/sys/syscallvar.h:65 [inline]
[ 40.9609313] syscall() at netbsd:syscall+0x29a sy_invoke
sys/sys/syscallvar.h:94 [inline]
[ 40.9609313] syscall() at netbsd:syscall+0x29a
sys/arch/x86/x86/syscall.c:138
[ 40.9709494] --- syscall (number 198) ---
[ 40.9809714] Skipping crash dump on recursive panic
[ 40.9809714] panic: UBSan: Undefined Behavior in
/syzkaller/managers/netbsd-kubsan/kernel/sys/arch/amd64/amd64/db_machdep.c:153:24,
member access within misaligned address 0x4 for type 'struct x86_64_frame'
which requires 8 byte alignment

[ 41.0010042] Faulted in mid-traceback; aborting...
[ 41.0110298] fatal breakpoint trap in supervisor mode
[ 41.0110298] trap type 1 code 0 rip 0xffffffff8021ddfd cs 0x8 rflags
0x282 cr2 0xffffa900a5ee2000 ilevel 0 rsp 0xffffa900a69278d0
[ 41.0210519] curlwp 0xfffff3b8ab5c6240 pid 548.4 lowest kstack
0xffffa900a69252c0
Stopped in pid 548.4 (syz-executor.0) at netbsd:breakpoint+0x5:
[ 41.0310743] Skipping crash dump on recursive panic
[ 41.0310743] panic: UBSan: Undefined Behavior in
/syzkaller/managers/netbsd-kubsan/kernel/sys/arch/amd64/amd64/db_machdep.c:154:14,
member access within misaligned address 0x4 for type 'struct x86_64_frame'
which requires 8 byte alignment

[ 41.0310743] Faulted in mid-traceback; aborting...
[ 41.0310743] fatal breakpoint trap in supervisor mode
[ 41.0310743] trap type 1 code 0 rip 0xffffffff8021ddfd cs 0x8 rflags
0x282 cr2 0xffffa900a5ee2000 ilevel 0x8 rsp 0xffffa900a69265d0
[ 41.0310743] curlwp 0xfffff3b8ab5c6240 pid 548.4 lowest kstack
0xffffa900a69252c0
Stopped in pid 548.4 (syz-executor.0) at netbsd:breakpoint+0x5:
leave

Reply all
Reply to author
Forward
0 new messages