panic: UBSan: Undefined Behavior in /syzkaller/managers/netbsd-kubsan/kernel/sys/net/rtsock_shared.c:LINE, member acces

0 views
Skip to first unread message

syzbot

unread,
Nov 26, 2019, 8:48:09 AM11/26/19
to syzkaller-...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: c8ea5c08 Import bind 9.14.8 (security fix -- limits on con..
git tree: netbsd
console output: https://syzkaller.appspot.com/x/log.txt?x=16860136e00000
kernel config: https://syzkaller.appspot.com/x/.config?x=824b23e1f4b6c76b
dashboard link: https://syzkaller.appspot.com/bug?extid=a0ac12d5dea82e1e6066

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+a0ac12...@syzkaller.appspotmail.com



[
54.8376441]
panic: UBSan: Undefined Behavior in
/syzkaller/managers/netbsd-kubsan/kernel/sys/net/rtsock_shared.c:631:41,
member access within misaligned address 0xffff8683876967cc for
type 'str uct rt_msghdr50' which requi res 8 byte alignment

[ 54.8575378] cpu1: Begin traceback...
[
54.8775770]
vpanic() at
netbsd:vpanic+0x2aa
[ 54.9276995] isAlreadyReported() at netbsd:isAlreadyReported
[ 54.9778527] HandleTypeMismatch.part.1() at
netbsd:HandleTypeMismatch.part.1+0xcc
[ 55.0279882] HandleTypeMismatch() at netbsd:HandleTypeMismatch+0x7b
sys/../common/lib/libc/misc/ubsan.c:408
[ 55.0781334] compat_50_route_output() at
netbsd:compat_50_route_output+0x1a4a sys/net/rtsock_shared.c:631
[ 55.1282820] raw_send() at netbsd:raw_send+0x20b sys/net/raw_usrreq.c:182
[ 55.1784169] compat_50_route_send_wrapper() at
netbsd:compat_50_route_send_wrapper+0x9f compat_50_route_send
sys/net/rtsock_shared.c:464 [inline]
[ 55.1784169] compat_50_route_send_wrapper() at
netbsd:compat_50_route_send_wrapper+0x9f sys/net/rtsock_shared.c:1663
[ 55.2285552] sosend() at netbsd:sosend+0x15ac sys/kern/uipc_socket.c:1059
[ 55.2686717] soo_write() at netbsd:soo_write+0x88
sys/kern/sys_socket.c:122
[ 55.3087834] do_filewritev.part.1() at netbsd:do_filewritev.part.1+0x415
[ 55.3689579] sys_writev() at netbsd:sys_writev+0x54 do_filewritev
sys/kern/sys_generic.c:381 [inline]
[ 55.3689579] sys_writev() at netbsd:sys_writev+0x54
sys/kern/sys_generic.c:381
[ 55.4090708] sys___syscall() at netbsd:sys___syscall+0x1c8 sy_call
sys/sys/syscallvar.h:65 [inline]
[ 55.4090708] sys___syscall() at netbsd:sys___syscall+0x1c8
sys/kern/sys_syscall.c:77
[ 55.4692461] syscall() at netbsd:syscall+0x29a sy_call
sys/sys/syscallvar.h:65 [inline]
[ 55.4692461] syscall() at netbsd:syscall+0x29a sy_invoke
sys/sys/syscallvar.h:94 [inline]
[ 55.4692461] syscall() at netbsd:syscall+0x29a
sys/arch/x86/x86/syscall.c:138
[ 55.4892997] --- syscall (number 198) ---
[ 55.4892997] Skipping crash dump on recursive panic
[ 55.4892997] panic: UBSan: Undefined Behavior in
/syzkaller/managers/netbsd-kubsan/kernel/sys/arch/amd64/amd64/db_machdep.c:153:24,
member access within misaligned address 0x3 for type 'struct x86_64_frame'
which requires 8 byte alignment

[ 55.5193899] Faulted in mid-traceback; aborting...
[ 55.5193899] fatal breakpoint trap in supervisor mode
[ 55.5294175] trap type 1 code 0 rip 0xffffffff8021ddbd cs 0x8 rflags
0x286 cr2 0x7ed7f3426000 ilevel 0x4 rsp 0xffff8b00b3a8b6a0
[ 55.5394371] curlwp 0xffff86839991b160 pid 615.3 lowest kstack
0xffff8b00b3a892c0
Stopped in pid 615.3 (syz-executor.3) 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+0xcc
HandleTypeMismatch() at netbsd:HandleTypeMismatch+0x7b
sys/../common/lib/libc/misc/ubsan.c:408
compat_50_route_output() at netbsd:compat_50_route_output+0x1a4a
sys/net/rtsock_shared.c:631
raw_send() at netbsd:raw_send+0x20b sys/net/raw_usrreq.c:182
compat_50_route_send_wrapper() at netbsd:compat_50_route_send_wrapper+0x9f
compat_50_route_send sys/net/rtsock_shared.c:464 [inline]
compat_50_route_send_wrapper() at netbsd:compat_50_route_send_wrapper+0x9f
sys/net/rtsock_shared.c:1663
sosend() at netbsd:sosend+0x15ac sys/kern/uipc_socket.c:1059
soo_write() at netbsd:soo_write+0x88 sys/kern/sys_socket.c:122
do_filewritev.part.1() at netbsd:do_filewritev.part.1+0x415
sys_writev() at netbsd:sys_writev+0x54 do_filewritev
sys/kern/sys_generic.c:381 [inline]
sys_writev() at netbsd:sys_writev+0x54 sys/kern/sys_generic.c:381
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) ---
[ 55.5394371] Skipping crash dump on recursive panic
[ 55.5394371] panic: UBSan: Undefined Behavior in
/syzkaller/managers/netbsd-kubsan/kernel/sys/arch/amd64/amd64/db_machdep.c:154:14,
member access within misaligned address 0x3 for type 'struct x86_64_frame'
which requires 8 byte alignment

[ 55.5394371] Faulted in mid-traceback; aborting...
[ 55.5394371] fatal breakpoint trap in supervisor mode
[ 55.5394371] trap type 1 code 0 rip 0xffffffff8021ddbd cs 0x8 rflags
0x286 cr2 0x7ed7f3426000 ilevel 0x8 rsp 0xffff8b00b3a8a3a0
[ 55.5394371] curlwp 0xffff86839991b160 pid 615.3 lowest kstack
0xffff8b00b3a892c0
Stopped in pid 615.3 (syz-executor.3) 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.

Maxime Villard

unread,
Nov 26, 2019, 10:34:38 AM11/26/19
to syzbot, syzkaller-...@googlegroups.com
dup but garbage, close

#syz invalid
Reply all
Reply to author
Forward
0 new messages