assert "!ISSET(rt->rt_flags, RTF_LOCAL)" failed in nd6.c (2)

0 views
Skip to first unread message

syzbot

unread,
Apr 26, 2020, 1:46:15 PM4/26/20
to syzkaller-o...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: bd99d219 bcmbsc(4)
git tree: openbsd
console output: https://syzkaller.appspot.com/x/log.txt?x=178d14b0100000
kernel config: https://syzkaller.appspot.com/x/.config?x=fe55924c11e64b0a
dashboard link: https://syzkaller.appspot.com/bug?extid=d53985fa90628811e0fc

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

panic: kernel diagnostic assertion "!ISSET(rt->rt_flags, RTF_LOCAL)" failed: file "/syzkaller/managers/main/kernel/sys/netinet6/nd6.c", line 728
Stopped at db_enter+0x18: addq $0x8,%rsp
TID PID UID PRFLAGS PFLAGS CPU COMMAND
db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398
panic(ffffffff821da0c7) at panic+0x15c sys/kern/subr_prf.c:207
__assert(ffffffff8222d6ec,ffffffff8220eab4,2d8,ffffffff82214604) at __assert+0x2b sys/kern/subr_prf.c:154
nd6_free(fffffd805666e548) at nd6_free+0x1cf sys/netinet6/nd6.c:728
nd6_purge(ffff800000a02800) at nd6_purge+0x10f sys/netinet6/nd6.c:535
in6_ifdetach(ffff800000a02800) at in6_ifdetach+0xa7 sys/netinet6/in6_ifattach.c:432
if_detach(ffff800000a02800) at if_detach+0x148 sys/net/if.c:1152
tun_clone_destroy(ffff800000a02800) at tun_clone_destroy+0x1d8 sys/net/if_tun.c:329
tun_dev_close(5d01,7) at tun_dev_close+0x160 sys/net/if_tun.c:480
spec_close(ffff80001e8343f0) at spec_close+0x311 sys/kern/spec_vnops.c:555
VOP_CLOSE(fffffd80678f2c30,7,fffffd806c3bfa20,ffff80001d739008) at VOP_CLOSE+0xc0 sys/kern/vfs_vops.c:174
vn_closefile(fffffd80567d2d30,ffff80001d739008) at vn_closefile+0xd2 vn_close sys/kern/vfs_vnops.c:298 [inline]
vn_closefile(fffffd80567d2d30,ffff80001d739008) at vn_closefile+0xd2 sys/kern/vfs_vnops.c:614
fdrop(fffffd80567d2d30,ffff80001d739008) at fdrop+0xc2 sys/kern/kern_descrip.c:1276
closef(fffffd80567d2d30,ffff80001d739008) at closef+0x117 sys/kern/kern_descrip.c:1260
end trace frame: 0xffff80001e8345c0, count: 0
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 "!ISSET(rt->rt_flags, RTF_LOCAL)" failed: file "/syzkaller/managers/main/kernel/sys/netinet6/nd6.c", line 728
ddb> trace
db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398
panic(ffffffff821da0c7) at panic+0x15c sys/kern/subr_prf.c:207
__assert(ffffffff8222d6ec,ffffffff8220eab4,2d8,ffffffff82214604) at __assert+0x2b sys/kern/subr_prf.c:154
nd6_free(fffffd805666e548) at nd6_free+0x1cf sys/netinet6/nd6.c:728
nd6_purge(ffff800000a02800) at nd6_purge+0x10f sys/netinet6/nd6.c:535
in6_ifdetach(ffff800000a02800) at in6_ifdetach+0xa7 sys/netinet6/in6_ifattach.c:432
if_detach(ffff800000a02800) at if_detach+0x148 sys/net/if.c:1152
tun_clone_destroy(ffff800000a02800) at tun_clone_destroy+0x1d8 sys/net/if_tun.c:329
tun_dev_close(5d01,7) at tun_dev_close+0x160 sys/net/if_tun.c:480
spec_close(ffff80001e8343f0) at spec_close+0x311 sys/kern/spec_vnops.c:555
VOP_CLOSE(fffffd80678f2c30,7,fffffd806c3bfa20,ffff80001d739008) at VOP_CLOSE+0xc0 sys/kern/vfs_vops.c:174
vn_closefile(fffffd80567d2d30,ffff80001d739008) at vn_closefile+0xd2 vn_close sys/kern/vfs_vnops.c:298 [inline]
vn_closefile(fffffd80567d2d30,ffff80001d739008) at vn_closefile+0xd2 sys/kern/vfs_vnops.c:614
fdrop(fffffd80567d2d30,ffff80001d739008) at fdrop+0xc2 sys/kern/kern_descrip.c:1276
closef(fffffd80567d2d30,ffff80001d739008) at closef+0x117 sys/kern/kern_descrip.c:1260
fdfree(ffff80001d739008) at fdfree+0x100 sys/kern/kern_descrip.c:1192
exit1(ffff80001d739008,0,19,1) at exit1+0x32c sys/kern/kern_exit.c:197
postsig(ffff80001d739008,19) at postsig+0x4b2 sigexit sys/kern/kern_sig.c:1483 [inline]
postsig(ffff80001d739008,19) at postsig+0x4b2 sys/kern/kern_sig.c:1415
userret(ffff80001d739008) at userret+0x159 sys/kern/kern_sig.c:1867
syscall(ffff80001e834870) at syscall+0x42e mi_syscall_return sys/sys/syscall_mi.h:129 [inline]
syscall(ffff80001e834870) at syscall+0x42e sys/arch/amd64/amd64/trap.c:592
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x7f7ffffef5b0, count: -20
ddb> show registers
rdi 0
rsi 0x1
rbp 0xffff80001e834060
rbx 0xffff80001e834110
rdx 0x2
rcx 0
rax 0
r8 0xffff80001e834020
r9 0x1
r10 0
r11 0xaa2ddfcf80db8e45
r12 0x3000000008
r13 0xffff80001e834070
r14 0x100
r15 0x1
rip 0xffffffff817e2fa8 db_enter+0x18
cs 0x8
rflags 0x246
rsp 0xffff80001e834050
ss 0x10
db_enter+0x18: addq $0x8,%rsp
ddb> show proc
PROC (syz-executor.1) pid=331454 stat=onproc
flags process=a<EXEC,EXITING,8ORPHAN> proc=2000<WEXIT>
pri=32, usrpri=74, nice=20
forw=0xffffffffffffffff, list=0xffff80001d7394e8,0xffff80001d73a878
process=0xffff8000ffffae70 user=0xffff80001e82f000, vmspace=0xfffffd806bc0a880
estcpu=36, cpticks=1, pctcpu=0.1
user=0, sys=1, intr=0
ddb> ps
PID TID PPID UID S FLAGS WAIT COMMAND
43057 70011 99355 0 3 0x2 biowait syz-executor.0
96078 293705 0 0 3 0x14200 bored sosplice
99355 507062 35810 0 3 0x82 thrsleep syz-fuzzer
99355 470044 35810 0 3 0x4000082 nanosleep syz-fuzzer
99355 450286 35810 0 3 0x4000082 thrsleep syz-fuzzer
99355 462780 35810 0 3 0x4000082 thrsleep syz-fuzzer
99355 52450 35810 0 3 0x4000082 thrsleep syz-fuzzer
99355 152038 35810 0 3 0x4000082 kqread syz-fuzzer
99355 80856 35810 0 3 0x4000082 thrsleep syz-fuzzer
99355 218314 35810 0 3 0x4000082 thrsleep syz-fuzzer
35810 319565 2247 0 3 0x10008a pause ksh
2247 232617 1697 0 3 0x92 select sshd
97836 208352 1 0 3 0x100083 ttyin getty
1697 373656 1 0 3 0x80 select sshd
32850 105478 53678 73 3 0x100090 kqread syslogd
53678 20328 1 0 3 0x100082 netio syslogd
53036 457614 1 77 3 0x100090 poll dhclient
65190 160393 1 0 3 0x80 poll dhclient
13625 11573 0 0 3 0x14200 bored smr
36482 346829 0 0 3 0x14200 pgzero zerothread
81098 14262 0 0 3 0x14200 aiodoned aiodoned
36651 277017 0 0 3 0x14200 syncer update
72798 5061 0 0 3 0x14200 cleaner cleaner
81531 422716 0 0 3 0x14200 reaper reaper
85160 446538 0 0 3 0x14200 pgdaemon pagedaemon
47529 77441 0 0 3 0x14200 bored crynlk
37102 501764 0 0 3 0x14200 bored crypto
69075 459113 0 0 3 0x40014200 acpi0 acpi0
19497 483259 0 0 3 0x14200 bored softnet
43088 335805 0 0 2 0x14200 systqmp
251 69989 0 0 3 0x14200 bored systq
4835 383678 0 0 3 0x40014200 bored softclock
23249 147580 0 0 3 0x40014200 idle0
1 261400 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
devbuf 9482 6336K 6977K 78643K 11510 0
pcb 13 8K 8K 78643K 129 0
rtable 70 2K 3K 78643K 305 0
ifaddr 52 10K 13K 78643K 102 0
counters 20 16K 16K 78643K 25 0
ioctlops 0 0K 2K 78643K 27 0
iov 0 0K 12K 78643K 46 0
mount 1 1K 1K 78643K 1 0
vnodes 1218 77K 77K 78643K 1503 0
UFS quota 1 32K 32K 78643K 1 0
UFS mount 5 36K 36K 78643K 5 0
shm 2 1K 5K 78643K 5 0
VM map 2 0K 0K 78643K 2 0
sem 12 0K 0K 78643K 21 0
dirhash 12 2K 2K 78643K 12 0
ACPI 1794 195K 288K 78643K 12646 0
file desc 4 9K 25K 78643K 277 0
sigio 0 0K 0K 78643K 4 0
proc 51 38K 55K 78643K 417 0
subproc 23 1K 2K 78643K 51 0
NFS srvsock 1 0K 0K 78643K 1 0
NFS daemon 1 16K 16K 78643K 1 0
ip_moptions 0 0K 0K 78643K 32 0
in_multi 41 2K 3K 78643K 114 0
ether_multi 1 0K 0K 78643K 11 0
mrt 0 0K 0K 78643K 6 0
ISOFS mount 1 32K 32K 78643K 1 0
MSDOSFS mount 1 16K 16K 78643K 1 0
ttys 43 201K 201K 78643K 43 0
exec 0 0K 1K 78643K 198 0
pagedep 1 8K 8K 78643K 1 0
inodedep 1 32K 32K 78643K 1 0
newblk 1 0K 0K 78643K 1 0
VM swap 7 26K 26K 78643K 7 0
UVM amap 125 39K 55K 78643K 1519 0
UVM aobj 22 4K 4K 78643K 22 0
memdesc 1 4K 4K 78643K 1 0
crypto data 1 1K 1K 78643K 1 0
ip6_options 0 0K 0K 78643K 54 0
NDP 9 0K 0K 78643K 22 0
temp 77 3032K 3097K 78643K 6365 0
kqueue 3 4K 12K 78643K 29 0
SYN cache 2 16K 16K 78643K 2 0
ddb> show all pools
Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle
arp 64 9 0 7 1 0 1 1 0 8 0
rtpcb 80 31 0 29 1 0 1 1 0 8 0
rtentry 112 73 0 48 2 0 2 2 0 8 0
unpcb 120 171 0 163 1 0 1 1 0 8 0
syncache 264 9 0 9 2 1 1 1 0 8 1
tcpqe 32 152 0 152 2 1 1 1 0 8 1
tcpcb 544 123 0 118 1 0 1 1 0 8 0
inpcb 280 406 0 398 2 0 2 2 0 8 1
rttmr 72 3 0 3 1 1 0 1 0 8 0
nd6 48 11 0 10 1 0 1 1 0 8 0
ppxss 1128 3 0 3 1 0 1 1 0 8 1
art_heap8 4096 2 0 0 2 0 2 2 0 8 0
art_heap4 256 295 0 158 13 0 13 13 0 8 3
art_table 32 297 0 158 2 0 2 2 0 8 0
art_node 16 72 0 43 1 0 1 1 0 8 0
semupl 112 2 0 2 1 0 1 1 0 8 1
semapl 112 18 0 8 1 0 1 1 0 8 0
shmpl 112 20 0 0 1 0 1 1 0 8 0
dirhash 1024 17 0 0 3 0 3 3 0 8 0
dino2pl 256 1747 0 352 88 0 88 88 0 8 0
ffsino 240 1747 0 352 83 0 83 83 0 8 0
nchpl 144 2318 0 732 60 0 60 60 0 8 0
uvmvnodes 72 2025 0 0 37 0 37 37 0 8 0
vnodes 208 2025 0 0 107 0 107 107 0 8 0
namei 1024 6480 0 6479 1 0 1 1 0 8 0
vcpupl 1984 1 0 0 1 0 1 1 0 8 0
vmpool 528 3 0 2 1 0 1 1 0 8 0
scsiplug 64 1 0 1 1 0 1 1 0 8 1
scxspl 192 6797 0 6796 1 0 1 1 0 8 0
plimitpl 152 49 0 42 1 0 1 1 0 8 0
sigapl 424 461 0 433 4 0 4 4 0 8 0
futexpl 56 5454 0 5454 1 0 1 1 0 8 1
knotepl 112 97 0 80 1 0 1 1 0 8 0
kqueuepl 144 86 0 84 1 0 1 1 0 8 0
pipelkpl 16 91 0 82 1 0 1 1 0 8 0
pipepl 120 182 0 165 1 0 1 1 0 8 0
fdescpl 432 446 0 433 2 0 2 2 0 8 0
filepl 120 2868 0 2784 4 0 4 4 0 8 1
lockfpl 104 47 0 46 1 0 1 1 0 8 0
lockfspl 48 22 0 21 1 0 1 1 0 8 0
sessionpl 112 18 0 8 1 0 1 1 0 8 0
pgrppl 48 22 0 12 1 0 1 1 0 8 0
ucredpl 96 339 0 332 1 0 1 1 0 8 0
zombiepl 144 434 0 433 1 0 1 1 0 8 0
processpl 920 461 0 433 4 0 4 4 0 8 0
procpl 624 743 0 708 4 0 4 4 0 8 1
sosppl 128 7 0 7 1 0 1 1 0 8 1
sockpl 400 611 0 593 5 1 4 4 0 8 1
mcl64k 65536 37 0 37 1 0 1 1 0 8 1
mcl12k 12288 6 0 6 1 0 1 1 0 8 1
mcl9k 9216 5 0 5 2 1 1 1 0 8 1
mcl8k 8192 2 0 2 2 1 1 1 0 8 1
mcl4k 4096 24 0 24 2 1 1 1 0 8 1
mcl2k2 2112 3 0 3 2 1 1 1 0 8 1
mcl2k 2048 58218 0 58164 17 8 9 14 0 8 1
mtagpl 80 116 0 116 3 1 2 2 0 8 2
mbufpl 256 94299 0 94224 22 2 20 20 0 8 6
bufpl 280 4570 0 186 314 0 314 314 0 8 0
anonpl 16 65859 0 51968 77 1 76 76 0 107 13
amapchunkpl 152 3347 0 3213 20 4 16 20 0 158 10
amappl16 192 2485 0 1625 57 7 50 54 0 8 6
amappl15 184 9 0 7 1 0 1 1 0 8 0
amappl14 176 28 0 21 1 0 1 1 0 8 0
amappl13 168 37 0 36 1 0 1 1 0 8 0
amappl12 160 15 0 10 2 1 1 1 0 8 0
amappl11 152 67 0 56 1 0 1 1 0 8 0
amappl10 144 120 0 115 1 0 1 1 0 8 0
amappl9 136 477 0 475 1 0 1 1 0 8 0
amappl8 128 442 0 406 2 0 2 2 0 8 0
amappl7 120 213 0 202 1 0 1 1 0 8 0
amappl6 112 40 0 32 1 0 1 1 0 8 0
amappl5 104 391 0 381 1 0 1 1 0 8 0
amappl4 96 445 0 420 1 0 1 1 0 8 0
amappl3 88 114 0 109 1 0 1 1 0 8 0
amappl2 80 2702 0 2644 3 1 2 3 0 8 0
amappl1 72 17822 0 17414 26 16 10 20 0 8 0
amappl 80 1007 0 965 3 1 2 2 0 84 1
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 21 0 0 1 0 1 1 0 8 0
uaddrrnd 24 449 0 435 1 0 1 1 0 8 0
uaddrbest 32 2 0 0 1 0 1 1 0 8 0
uaddr 24 449 0 435 1 0 1 1 0 8 0
vmmpekpl 168 6801 0 6773 2 0 2 2 0 8 0
vmmpepl 168 61153 0 59308 135 16 119 119 0 357 32
vmsppl 272 448 0 435 2 0 2 2 0 8 1
pdppl 4096 904 0 871 6 1 5 6 0 8 0
pvpl 32 190992 0 174172 180 0 180 180 0 265 30
pmappl 200 448 0 435 1 0 1 1 0 8 0
extentpl 40 46 0 29 1 0 1 1 0 8 0
phpool 112 254 0 16 7 0 7 7 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.

Greg Steuck

unread,
Apr 26, 2020, 9:54:52 PM4/26/20
to syzbot, Martin Pieuchot, syzkaller-o...@googlegroups.com
Hi Martin,

Just a quick note that syzkaller found a different way to cause this
assertion. I also hit that bug on 6.6-stable but haven't tried your
fix[1] yet (waiting for the release, that machine stability is
important)

Thanks
Greg

[1] Never update the ND entry (cache) corresponding to a RTF_LOCAL route.
> --
> You received this message because you are subscribed to the Google Groups "syzkaller-openbsd-bugs" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to syzkaller-openbsd...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/syzkaller-openbsd-bugs/000000000000c49a5105a4352c55%40google.com.



--
nest.cx is Gmail hosted, use PGP: https://pgp.key-server.io/0x0B1542BD8DF5A1B0
Fingerprint: 5E2B 2D0E 1E03 2046 BEC3 4D50 0B15 42BD 8DF5 A1B0

Martin Pieuchot

unread,
Apr 27, 2020, 5:27:20 AM4/27/20
to Greg Steuck, syzbot, syzkaller-o...@googlegroups.com
On 26/04/20(Sun) 18:54, Greg Steuck wrote:
> Just a quick note that syzkaller found a different way to cause this
> assertion. I also hit that bug on 6.6-stable but haven't tried your
> fix[1] yet (waiting for the release, that machine stability is
> important)

Thanks! Unfortunately there isn't enough information in this report.

During the detach of an interface nd6_purge() is called after all
addresses have been removed. If an RTF_LOCAL entry subsisted at the
removal then there's a bug, but where it is we don't know :/

Being able to see the content of the routing table before destroying the
interface might help understand of this bug. Or having a reproducer
that tells us which ioctl(2)s are being issued.

syzbot

unread,
Jul 25, 2020, 1:46:16 PM7/25/20
to gr...@nest.cx, m...@openbsd.org, 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