assert "ifp != NULL" failed in rtsock.c

0 views
Skip to first unread message

syzbot

unread,
Nov 14, 2019, 10:50:11 PM11/14/19
to syzkaller-o...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: 3d133dcf Change window-size default from smallest to latest.
git tree: openbsd
console output: https://syzkaller.appspot.com/x/log.txt?x=10d8a8cee00000
kernel config: https://syzkaller.appspot.com/x/.config?x=d0fe83f82fe104d4
dashboard link: https://syzkaller.appspot.com/bug?extid=242289dc465c1c392a28

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

panic: kernel diagnostic assertion "ifp != NULL" failed:
file "/syzkaller/managers/main/kernel/sys/net/rtsock.c", line 928
Stopped at db_enter+0x18: addq $0x8,%rsp
TID PID UID PRFLAGS PFLAGS CPU COMMAND
*361187 51893 0 0 0x4000000 0 syz-executor.1
db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398
panic() at panic+0x15c sys/kern/subr_prf.c:207
__assert(ffffffff821e7024,ffffffff821a0d68,3a0,ffffffff8216eb9c) at
__assert+0x2b sys/kern/subr_prf.c:154
rtm_output(ffff800000ad9700,ffff800015110a40,ffff800015110998,1b,5) at
rtm_output+0xba9 sys/net/rtsock.c:1109
route_output(fffffd803f02a600,fffffd802a7c1078,0,0) at route_output+0x609
sys/net/rtsock.c:819
route_usrreq(fffffd802a7c1078,9,fffffd803f02a600,0,0,ffff8000ffff38c8) at
route_usrreq+0x363 sys/net/rtsock.c:275
sosend(fffffd802a7c1078,0,ffff800015110c20,0,0,80) at sosend+0x63d
sys/kern/uipc_socket.c:524
sendit(ffff8000ffff38c8,3,ffff800015110d00,0,ffff800015110de0) at
sendit+0x52b sys/kern/uipc_syscalls.c:662
sys_sendto(ffff8000ffff38c8,ffff800015110d98,ffff800015110de0) at
sys_sendto+0x80 sys/kern/uipc_syscalls.c:527
syscall(ffff800015110e60) at syscall+0x507 sys/arch/amd64/amd64/trap.c:555
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x3c894c6a310, count: 4
https://www.openbsd.org/ddb.html describes the minimum info required in bug
reports. Insufficient info makes it difficult to find and fix bugs.
ddb>
ddb> set $lines = 0
ddb> set $maxwidth = 0
ddb> show panic
kernel diagnostic assertion "ifp != NULL" failed:
file "/syzkaller/managers/main/kernel/sys/net/rtsock.c", line 928
ddb> trace
db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398
panic() at panic+0x15c sys/kern/subr_prf.c:207
__assert(ffffffff821e7024,ffffffff821a0d68,3a0,ffffffff8216eb9c) at
__assert+0x2b sys/kern/subr_prf.c:154
rtm_output(ffff800000ad9700,ffff800015110a40,ffff800015110998,1b,5) at
rtm_output+0xba9 sys/net/rtsock.c:1109
route_output(fffffd803f02a600,fffffd802a7c1078,0,0) at route_output+0x609
sys/net/rtsock.c:819
route_usrreq(fffffd802a7c1078,9,fffffd803f02a600,0,0,ffff8000ffff38c8) at
route_usrreq+0x363 sys/net/rtsock.c:275
sosend(fffffd802a7c1078,0,ffff800015110c20,0,0,80) at sosend+0x63d
sys/kern/uipc_socket.c:524
sendit(ffff8000ffff38c8,3,ffff800015110d00,0,ffff800015110de0) at
sendit+0x52b sys/kern/uipc_syscalls.c:662
sys_sendto(ffff8000ffff38c8,ffff800015110d98,ffff800015110de0) at
sys_sendto+0x80 sys/kern/uipc_syscalls.c:527
syscall(ffff800015110e60) at syscall+0x507 sys/arch/amd64/amd64/trap.c:555
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x3c894c6a310, count: -11
ddb> show registers
rdi 0xffffffff820e6c27 db_enter+0x17
rsi 0x3dea __ALIGN_SIZE+0x2dea
rbp 0xffff800015110810
rbx 0xffff8000151108c0
rdx 0x3deb __ALIGN_SIZE+0x2deb
rcx 0xffff800015b68000
rax 0xffff800015b68000
r8 0xffff8000151107d0
r9 0x1
r10 0xffff800000a47cc0
r11 0x5e2755695ea0323e
r12 0x3000000008
r13 0xffff800015110820
r14 0x100
r15 0x1
rip 0xffffffff820e6c28 db_enter+0x18
cs 0x8
rflags 0x246
rsp 0xffff800015110800
ss 0x10
db_enter+0x18: addq $0x8,%rsp
ddb> show proc
PROC (syz-executor.1) pid=361187 stat=onproc
flags process=0 proc=4000000<THREAD>
pri=81, usrpri=81, nice=20
forw=0xffffffffffffffff, list=0xffff8000ffff2018,0xffffffff82586810
process=0xffff8000ffff6010 user=0xffff80001510b000,
vmspace=0xfffffd803f011550
estcpu=36, cpticks=1, pctcpu=0.0
user=0, sys=1, intr=0
ddb> ps
PID TID PPID UID S FLAGS WAIT COMMAND
51893 492693 12589 0 2 0 syz-executor.1
*51893 361187 12589 0 7 0x4000000 syz-executor.1
12589 312699 88043 0 3 0x82 nanosleep syz-executor.1
69715 159321 0 0 3 0x14200 acct acct
56707 44779 1 0 3 0x100083 ttyin getty
85803 372145 0 0 3 0x14200 bored sosplice
88043 108405 71719 0 3 0x82 thrsleep syz-fuzzer
88043 18083 71719 0 2 0x4000482 syz-fuzzer
88043 284236 71719 0 2 0x4000002 syz-fuzzer
88043 393814 71719 0 3 0x4000082 thrsleep syz-fuzzer
88043 456610 71719 0 3 0x4000082 thrsleep syz-fuzzer
88043 79441 71719 0 3 0x4000082 thrsleep syz-fuzzer
88043 107988 71719 0 3 0x4000082 thrsleep syz-fuzzer
88043 507676 71719 0 3 0x4000082 thrsleep syz-fuzzer
88043 270538 71719 0 3 0x4000082 thrsleep syz-fuzzer
71719 184474 950 0 3 0x10008a pause ksh
950 418248 79634 0 3 0x92 select sshd
79634 65592 1 0 3 0x80 select sshd
42137 227243 31598 73 3 0x100090 kqread syslogd
31598 44357 1 0 3 0x100082 netio syslogd
79152 74339 0 0 2 0x14200 zerothread
72138 322114 0 0 3 0x14200 aiodoned aiodoned
79260 219905 0 0 3 0x14200 syncer update
95114 18548 0 0 3 0x14200 cleaner cleaner
16361 270721 0 0 3 0x14200 reaper reaper
56346 496843 0 0 3 0x14200 pgdaemon pagedaemon
47015 237526 0 0 3 0x14200 bored crynlk
74879 240131 0 0 3 0x14200 bored crypto
95884 282734 0 0 3 0x40014200 acpi0 acpi0
90584 95857 0 0 3 0x14200 bored softnet
55564 180023 0 0 3 0x14200 bored systqmp
15413 265732 0 0 3 0x14200 bored systq
8232 362208 0 0 3 0x40014200 bored softclock
21418 444692 0 0 3 0x40014200 idle0
93825 59734 0 0 3 0x14200 bored smr
1 460384 0 0 3 0x82 wait init
0 0 -1 0 3 0x10200 scheduler swapper
ddb> show all locks
No such command
ddb> show malloc
Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim
devbuf 9562 6320K 7145K 78643K 18128 0 0
pcb 13 11K 12K 78643K 671 0 0
rtable 94 12K 14K 78643K 1752 0 0
ifaddr 208 25K 26K 78643K 720 0 0
counters 19 16K 16K 78643K 19 0 0
ioctlops 0 0K 2K 78643K 216 0 0
iov 0 0K 24K 78643K 1311 0 0
mount 1 1K 1K 78643K 1 0 0
vnodes 1222 77K 77K 78643K 3576 0 0
UFS quota 1 32K 32K 78643K 1 0 0
UFS mount 5 36K 36K 78643K 5 0 0
shm 2 1K 9K 78643K 28 0 0
VM map 21 5K 5K 78643K 28 0 0
sem 12 0K 1K 78643K 515 0 0
dirhash 12 2K 2K 78643K 12 0 0
ACPI 1794 195K 288K 78643K 12646 0 0
file desc 4 9K 25K 78643K 2737 0 0
sigio 0 0K 0K 78643K 111 0 0
proc 44 30K 63K 78643K 1459 0 0
subproc 16 1K 2K 78643K 412 0 0
NFS srvsock 1 0K 0K 78643K 1 0 0
NFS daemon 1 16K 16K 78643K 1 0 0
ip_moptions 0 0K 0K 78643K 265 0 0
in_multi 84 4K 5K 78643K 471 0 0
ether_multi 1 0K 0K 78643K 22 0 0
mrt 1 0K 0K 78643K 23 0 0
ISOFS mount 1 32K 32K 78643K 1 0 0
MSDOSFS mount 1 16K 16K 78643K 1 0 0
ttys 72 318K 318K 78643K 72 0 0
exec 0 0K 1K 78643K 706 0 0
pagedep 1 8K 8K 78643K 1 0 0
inodedep 1 32K 32K 78643K 1 0 0
newblk 1 0K 0K 78643K 1 0 0
VM swap 7 26K 26K 78643K 7 0 0
UVM amap 160 178K 190K 78643K 8131 0 0
UVM aobj 130 8K 8K 78643K 134 0 0
memdesc 1 4K 4K 78643K 1 0 0
crypto data 1 1K 1K 78643K 1 0 0
ip6_options 0 0K 1K 78643K 605 0 0
NDP 21 0K 1K 78643K 179 0 0
temp 153 3534K 3607K 78643K 139918 0 0
kqueue 0 0K 0K 78643K 38 0 0
SYN cache 2 16K 16K 78643K 2 0 0
ddb> show all pools
Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg
Idle
arp 64 78 0 73 1 0 1 1 0
8 0
rtpcb 80 1468 0 1467 1 0 1 1 0
8 0
rtentry 112 420 0 391 2 0 2 2 0
8 0
unpcb 120 1670 0 1662 2 1 1 2 0
8 0
syncache 264 15 0 15 6 6 0 1 0
8 0
tcpqe 32 59 0 59 5 5 0 1 0
8 0
tcpcb 544 2607 0 2603 32 31 1 14 0
8 0
ipq 40 28 0 28 7 6 1 1 0
8 1
ipqe 40 704 0 704 7 6 1 1 0
8 1
inpcb 280 5945 0 5941 23 21 2 9 0
8 1
rttmr 72 10 0 9 1 0 1 1 0
8 0
nd6 48 59 0 59 3 2 1 1 0
8 1
pkpcb 40 14 0 14 4 4 0 1 0
8 0
ppxss 1128 60 0 60 10 9 1 1 0
8 1
art_heap8 4096 9 0 8 5 4 1 3 0
8 0
art_heap4 256 1914 0 1722 36 19 17 21 0
8 3
art_table 32 1923 0 1730 6 3 3 3 0
8 0
art_node 16 415 0 388 1 0 1 1 0
8 0
sysvmsgpl 40 38 0 32 1 0 1 1 0
8 0
semapl 112 513 0 503 1 0 1 1 0
8 0
shmpl 112 132 0 4 4 0 4 4 0
8 0
dirhash 1024 17 0 0 3 0 3 3 0
8 0
dino1pl 128 5557 0 4152 46 0 46 46 0
8 0
ffsino 240 5557 0 4152 84 1 83 84 0
8 0
nchpl 144 9634 0 9180 60 40 20 60 0
8 0
uvmvnodes 72 7360 0 0 134 0 134 134 0
8 0
vnodes 208 7360 0 0 388 0 388 388 0
8 0
namei 1024 34836 0 34836 4 3 1 1 0
8 1
vcpupl 1984 19 0 0 3 0 3 3 0
8 0
vmpool 520 26 0 7 2 0 2 2 0
8 0
scxspl 192 43861 0 43861 22 20 2 7 0
8 2
plimitpl 152 235 0 230 1 0 1 1 0
8 0
sigapl 432 2842 0 2832 2 0 2 2 0
8 0
futexpl 56 80293 0 80293 5 4 1 1 0
8 1
knotepl 112 1166 0 1149 1 0 1 1 0
8 0
kqueuepl 104 1966 0 1964 7 6 1 4 0
8 0
pipepl 128 2218 0 2203 9 7 2 2 0
8 1
fdescpl 424 2843 0 2832 2 0 2 2 0
8 0
filepl 120 28934 0 28867 25 20 5 11 0
8 2
lockfpl 104 1644 0 1644 1 0 1 1 0
8 1
lockfspl 48 536 0 536 1 0 1 1 0
8 1
sessionpl 112 40 0 33 1 0 1 1 0
8 0
pgrppl 48 210 0 203 1 0 1 1 0
8 0
ucredpl 96 2695 0 2689 1 0 1 1 0
8 0
zombiepl 144 2832 0 2832 1 0 1 1 0
8 1
processpl 864 2859 0 2832 4 0 4 4 0
8 0
procpl 632 6038 0 6002 4 0 4 4 0
8 0
sosppl 128 50 0 50 12 11 1 1 0
8 1
sockpl 384 9183 0 9170 48 44 4 14 0
8 1
mcl64k 65536 1399 0 1399 95 94 1 65 0
8 1
mcl16k 16384 75 0 75 10 9 1 1 0
8 1
mcl12k 12288 284 0 284 4 3 1 1 0
8 1
mcl9k 9216 43 0 43 9 8 1 1 0
8 1
mcl8k 8192 232 0 232 6 5 1 1 0
8 1
mcl4k 4096 314 0 314 6 5 1 1 0
8 1
mcl2k2 2112 20 0 20 13 13 0 1 0
8 0
mcl2k 2048 81762 0 81726 17 11 6 11 0
8 0
mtagpl 80 153 0 153 5 4 1 1 0
8 1
mbufpl 256 166814 0 166764 159 145 14 55 0
8 8
bufpl 256 19158 0 11385 487 0 487 487 0
8 0
anonpl 16 439325 0 418244 212 115 97 136 0
62 4
amapchunkpl 152 18227 0 18077 87 77 10 36 0
158 2
amappl16 192 17371 0 16164 195 125 70 84 0
8 8
amappl15 184 1571 0 1570 1 0 1 1 0
8 0
amappl14 176 427 0 422 1 0 1 1 0
8 0
amappl13 168 255 0 255 4 4 0 1 0
8 0
amappl12 160 50 0 49 3 2 1 1 0
8 0
amappl11 152 351 0 347 1 0 1 1 0
8 0
amappl10 144 254 0 248 1 0 1 1 0
8 0
amappl9 136 1284 0 1280 1 0 1 1 0
8 0
amappl8 128 876 0 807 3 0 3 3 0
8 0
amappl7 120 375 0 366 1 0 1 1 0
8 0
amappl6 112 324 0 305 1 0 1 1 0
8 0
amappl5 104 791 0 785 1 0 1 1 0
8 0
amappl4 96 2947 0 2918 1 0 1 1 0
8 0
amappl3 88 946 0 939 1 0 1 1 0
8 0
amappl2 80 21535 0 21473 3 1 2 3 0
8 0
amappl1 72 63547 0 63165 26 17 9 20 0
8 0
amappl 80 6652 0 6603 2 0 2 2 0
84 0
dma4096 4096 1 0 1 1 1 0 1 0
8 0
dma256 256 6 0 6 1 1 0 1 0
8 0
dma128 128 253 0 253 1 1 0 1 0
8 0
dma64 64 6 0 6 1 1 0 1 0
8 0
dma32 32 7 0 7 1 1 0 1 0
8 0
dma16 16 18 0 17 1 0 1 1 0
8 0
aobjpl 64 133 0 4 3 0 3 3 0
8 0
uaddrrnd 24 2869 0 2832 1 0 1 1 0
8 0
uaddrbest 32 2 0 0 1 0 1 1 0
8 0
uaddr 24 2869 0 2832 1 0 1 1 0
8 0
vmmpekpl 168 23135 0 23102 2 0 2 2 0
8 0
vmmpepl 168 366468 0 364222 306 156 150 152 0 357
40
vmsppl 272 2842 0 2832 5 4 1 2 0
8 0
pdppl 4096 5744 0 5697 10 3 7 7 0
8 0
pvpl 32 1149207 0 1125375 508 249 259 405 0 265
50
pmappl 200 2868 0 2839 3 1 2 2 0
8 0
extentpl 40 46 0 29 1 0 1 1 0
8 0
phpool 112 961 0 336 21 1 20 20 0
8 0


---
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,
Feb 14, 2020, 4:22:07 PM2/14/20
to syzkaller-o...@googlegroups.com
Auto-closing this bug as obsolete.
Crashes did not happen for a while, no reproducer and no activity.
Reply all
Reply to author
Forward
0 new messages