syzbot


assert "rt->rt_ifa->ifa_ifp != NULL" failed: fipanic: kernel diagnostic assertion "!_kernel_lock_held()" failed in kern_

Status: closed as dup on 2019/10/07 11:50
Reported-by: syzbot+e6d9945c23a870a7b8eb@syzkaller.appspotmail.com
First crash: 1661d, last: 1661d
Duplicate of
Title Repro Cause bisect Fix bisect Count Last Reported
assert "rt->rt_ifa->ifa_ifp != NULL" failed in route.c 830 1629d 1670d

Sample crash report:
panic: kernel diagnostic assertion "rt->rt_ifa->ifa_ifp != NULL" failed: fipanic: kernel diagnostic assertion "!_kernel_lock_held()" failed: file "/syzkaller/managers/multicore/kernel/sys/kern/kern_fork.c", line 690
Stopped at      db_enter+0x18:  addq    $0x8,%rsp
    TID    PID    UID     PRFLAGS     PFLAGS  CPU  COMMAND
 442114  90099      0           0  0x4000000    0  syz-executor.1
*326856  90099      0           0  0x4000000    1  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(ffffffff8220729b,ffffffff821f4238,2b2,ffffffff821d8259) at __assert+0x2b sys/kern/subr_prf.c:154
proc_trampoline_mp() at proc_trampoline_mp+0x123
end trace frame: 0x0, count: 11
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{1}> 
ddb{1}> set $lines = 0
ddb{1}> set $maxwidth = 0
ddb{1}> show panic
kernel diagnostic assertion "rt->rt_ifa->ifa_ifp != NULL" failed: file "/syzkaller/managers/multicore/kernel/sys/net/route.c", line 848
ddb{1}> 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(ffffffff8220729b,ffffffff821f4238,2b2,ffffffff821d8259) at __assert+0x2b sys/kern/subr_prf.c:154
proc_trampoline_mp() at proc_trampoline_mp+0x123
end trace frame: 0x0, count: -4
ddb{1}> show registers
rdi                                0
rsi                              0x1
rbp               0xffff800023bcd7b0
rbx               0xffff800023bcd860
rdx               0xffff800020ab18c8
rcx                                0
rax                                0
r8                0xffffffff8182804f    kprintf+0x16f
r9                               0x1
r10                             0x25
r11               0xb9289ddc2b36de7d
r12                     0x3000000008
r13               0xffff800023bcd7c0
r14                            0x104
r15                              0x1
rip               0xffffffff81d20338    db_enter+0x18
cs                               0x8
rflags                         0x246
rsp               0xffff800023bcd7a0
ss                                 0
db_enter+0x18:  addq    $0x8,%rsp
ddb{1}> show proc
PROC (syz-executor.1) pid=326856 stat=onproc
    flags process=0 proc=4000000<THREAD>
    pri=86, usrpri=86, nice=20
    forw=0xffffffffffffffff, list=0xffff800020ab0ee8,0xffff800020ab0790
    process=0xffff800020add500 user=0xffff800023bc8000, vmspace=0xfffffd807f00b2e0
    estcpu=36, cpticks=1, pctcpu=0.0
    user=0, sys=1, intr=0
ddb{1}> ps
   PID     TID   PPID    UID  S       FLAGS  WAIT          COMMAND
 90099  321008    442      0  2           0                syz-executor.1
 90099  442114    442      0  7   0x4000000                syz-executor.1
*90099  326856    442      0  7   0x4000000                syz-executor.1
 90099   70755    442      0  2   0x4000000                syz-executor.1
 46277   86815  41659      0  3      0x3010  suspend       syz-executor.0
 46277   32118  41659      0  2   0x4081090                syz-executor.0
 46277  321617  41659      0  2   0x4081090                syz-executor.0
   442  498393  16356      0  3        0x82  nanosleep     syz-executor.1
 41659  431607  16356      0  3        0x82  nanosleep     syz-executor.0
 32050  161374      0      0  3     0x14200  bored         sosplice
 16356  291427  77447      0  3        0x82  thrsleep      syz-fuzzer
 16356  287170  77447      0  3   0x4000082  thrsleep      syz-fuzzer
 16356  374346  77447      0  3   0x4000082  thrsleep      syz-fuzzer
 16356  143685  77447      0  3   0x4000082  thrsleep      syz-fuzzer
 16356  305043  77447      0  3   0x4000082  thrsleep      syz-fuzzer
 16356  453509  77447      0  3   0x4000082  thrsleep      syz-fuzzer
 16356   79087  77447      0  3   0x4000082  thrsleep      syz-fuzzer
 16356  250507  77447      0  3   0x4000082  thrsleep      syz-fuzzer
 16356    6295  77447      0  3   0x4000082  thrsleep      syz-fuzzer
 16356  406951  77447      0  3   0x4000082  kqread        syz-fuzzer
 77447   63646  51525      0  3    0x10008a  pause         ksh
 51525  137356  28257      0  3        0x92  select        sshd
 77712  489257      1      0  3    0x100083  ttyin         getty
 28257  361317      1      0  3        0x80  select        sshd
 50902  523985  33331     74  3    0x100092  bpf           pflogd
 33331    5960      1      0  3        0x80  netio         pflogd
 96050  268007  91163     73  3    0x100090  kqread        syslogd
 91163   78751      1      0  3    0x100082  netio         syslogd
 12863   63273      1     77  3    0x100090  poll          dhclient
 13279   68047      1      0  3        0x80  poll          dhclient
 66828  184439      0      0  2     0x14200                zerothread
  9340  134994      0      0  3     0x14200  aiodoned      aiodoned
  9690  480222      0      0  3     0x14200  syncer        update
 46190  157475      0      0  3     0x14200  cleaner       cleaner
 37161  306500      0      0  3     0x14200  reaper        reaper
 32026  211047      0      0  3     0x14200  pgdaemon      pagedaemon
 40128  390057      0      0  3     0x14200  bored         crynlk
 36502  131827      0      0  3     0x14200  bored         crypto
  5939   92576      0      0  3  0x40014200  acpi0         acpi0
 53384  382280      0      0  3  0x40014200                idle1
 59955  101564      0      0  3     0x14200  bored         softnet
 32901  301274      0      0  3     0x14200  bored         systqmp
 57256  284790      0      0  3     0x14200  bored         systq
 96438  493569      0      0  3  0x40014200  bored         softclock
 34357  223085      0      0  3  0x40014200                idle0
 86723   95888      0      0  3     0x14200  bored         smr
     1  269236      0      0  3        0x82  wait          init
     0       0     -1      0  3     0x10200  scheduler     swapper
ddb{1}> show all locks
Process 90099 (syz-executor.1) thread 0xffff800020ab0ee8 (442114)
exclusive rwlock netlock r = 0 (0xffffffff82505ce8)
#0  witness_lock+0x52e sys/kern/subr_witness.c:1163
#1  solock+0x5a sys/kern/uipc_socket2.c:282
#2  sys_connect+0x6b sys/kern/uipc_syscalls.c:362
#3  syscall+0x4a4 mi_syscall sys/sys/syscall_mi.h:92 [inline]
#3  syscall+0x4a4 sys/arch/amd64/amd64/trap.c:555
#4  Xsyscall+0x128
exclusive kernel_lock &kernel_lock r = 1 (0xffffffff8262ed78)
#0  witness_lock+0x52e sys/kern/subr_witness.c:1163
#1  syscall+0x400 mi_syscall sys/sys/syscall_mi.h:83 [inline]
#1  syscall+0x400 sys/arch/amd64/amd64/trap.c:555
#2  Xsyscall+0x128
ddb{1}> show malloc
           Type InUse  MemUse  HighUse   Limit  Requests Type Lim Kern Lim
         devbuf  9585   6451K    7354K  78643K     14202        0        0
            pcb    13      8K       8K  78643K       330        0        0
         rtable    98      8K       8K  78643K       884        0        0
         ifaddr    79     16K      17K  78643K       305        0        0
       counters    39     33K      33K  78643K        39        0        0
       ioctlops     0      0K       4K  78643K      1549        0        0
            iov     0      0K      16K  78643K       200        0        0
          mount     1      1K       1K  78643K         1        0        0
         vnodes  1221     77K      77K  78643K      2466        0        0
      UFS quota     1     32K      32K  78643K         1        0        0
      UFS mount     5     36K      36K  78643K         5        0        0
            shm     2      1K       5K  78643K        19        0        0
         VM map     5      2K       3K  78643K        11        0        0
            sem    12      1K       1K  78643K        47        0        0
        dirhash    12      2K       2K  78643K        12        0        0
           ACPI  1808    196K     290K  78643K     12765        0        0
      file desc     6     17K      25K  78643K      1165        0        0
          sigio     1      0K       0K  78643K        18        0        0
           proc    61     63K      83K  78643K       775        0        0
        subproc    32      2K       2K  78643K       136        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       204        0        0
       in_multi    23      1K       2K  78643K       194        0        0
    ether_multi     1      0K       0K  78643K        19        0        0
            mrt     1      0K       0K  78643K        12        0        0
    ISOFS mount     1     32K      32K  78643K         1        0        0
  MSDOSFS mount     1     16K      16K  78643K         1        0        0
           ttys    78    344K     344K  78643K        78        0        0
           exec     0      0K       1K  78643K       415        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   128     55K      59K  78643K      5131        0        0
       UVM aobj    80      4K       4K  78643K        84        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       311        0        0
            NDP    19      0K       0K  78643K        91        0        0
           temp   220   3556K    3628K  78643K     55755        0        0
         kqueue     0      0K       0K  78643K        15        0        0
      SYN cache     2     16K      16K  78643K         2        0        0
ddb{1}> show all pools
Name      Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle
arp         64       27    0       22     1     0     1     1     0     8    0
plcache    128       20    0        0     1     0     1     1     0     8    0
rtpcb       80      112    0      110     1     0     1     1     0     8    0
rtentry    112      145    0      109     2     0     2     2     0     8    0
unpcb      120     1254    0     1242     2     1     1     2     0     8    0
syncache   264       10    0       10     3     3     0     1     0     8    0
tcpqe       32     6030    0     6030     3     3     0     1     0     8    0
tcpcb      544      471    0      465     1     0     1     1     0     8    0
inpcb      280     2537    0     2527     5     3     2     3     0     8    1
rttmr       72        3    0        3     2     2     0     1     0     8    0
nd6         48       21    0       19     2     1     1     1     0     8    0
pkpcb       40        2    0        2     1     1     0     1     0     8    0
ppxss      1128      39    0       39     3     2     1     1     0     8    1
pffrag     232       27    0       27     5     4     1     1     0   482    1
pffrnode    88       27    0       27     5     4     1     1     0     8    1
pffrent     40      614    0      614     5     4     1     1     0     8    1
pfosfp      40      846    0      423     5     0     5     5     0     8    0
pfosfpen   112     1428    0      714    21     0    21    21     0     8    0
pfstitem    24      128    0       59     1     0     1     1     0     8    0
pfstkey    112      128    0       59     2     0     2     2     0     8    0
pfstate    328      128    0       59     6     0     6     6     0     8    0
pfrule     1360      21    0       16     2     1     1     2     0     8    0
art_heap8  4096       4    0        3     3     2     1     3     0     8    0
art_heap4  256      692    0      514    21     7    14    14     0     8    2
art_table   32      696    0      517     2     0     2     2     0     8    0
art_node    16      144    0      111     1     0     1     1     0     8    0
sysvmsgpl   40       98    0       59     1     0     1     1     0     8    0
semupl     112        2    0        2     1     1     0     1     0     8    0
semapl     112       45    0       35     1     0     1     1     0     8    0
shmpl      112       82    0        4     3     0     3     3     0     8    0
dirhash    1024      17    0        0     3     0     3     3     0     8    0
dino1pl    128     3183    0     1778    46     0    46    46     0     8    0
ffsino     272     3183    0     1778    97     2    95    95     0     8    0
nchpl      144     5125    0     3512    61     0    61    61     0     8    0
uvmvnodes   72     4170    0        0    76     0    76    76     0     8    0
vnodes     208     4170    0        0   220     0   220   220     0     8    0
namei      1024   16770    0    16770     3     2     1     1     0     8    1
percpumem   16       30    0        0     1     0     1     1     0     8    0
vcpupl     1984       3    0        0     1     0     1     1     0     8    0
vmpool     552        9    0        6     1     0     1     1     0     8    0
scsiplug    64        2    0        2     1     1     0     1     0     8    0
scxspl     192    16590    0    16590    18    14     4     7     0     8    4
plimitpl   152      100    0       92     1     0     1     1     0     8    0
sigapl     432     1347    0     1331     3     1     2     3     0     8    0
futexpl     56    29989    0    29987     1     0     1     1     0     8    0
knotepl    112      279    0      260     1     0     1     1     0     8    0
kqueuepl   104      207    0      205     1     0     1     1     0     8    0
pipepl     112      848    0      829     4     2     2     2     0     8    1
fdescpl    488     1348    0     1331     3     0     3     3     0     8    0
filepl     152    12073    0    11970    12     6     6     7     0     8    1
lockfpl    104      453    0      452     1     0     1     1     0     8    0
lockfspl    48      150    0      149     1     0     1     1     0     8    0
sessionpl  112       24    0       13     1     0     1     1     0     8    0
pgrppl      48       35    0       24     1     0     1     1     0     8    0
ucredpl     96     1500    0     1489     1     0     1     1     0     8    0
zombiepl   144     1332    0     1332     3     2     1     1     0     8    1
processpl  896     1365    0     1332     4     0     4     4     0     8    0
procpl     632     4042    0     3995     5     0     5     5     0     8    1
srpgc       64        8    0        8     4     3     1     1     0     8    1
sosppl     128       57    0       57     4     3     1     1     0     8    1
sockpl     384     3920    0     3896    16    10     6     8     0     8    3
mcl64k     65536    261    0        0    33     6    27    33     0     8    1
mcl16k     16384      8    0        0     1     0     1     1     0     8    0
mcl12k     12288     17    0        0     2     0     2     2     0     8    0
mcl9k      9216      13    0        0     1     0     1     1     0     8    0
mcl8k      8192      15    0        0     2     0     2     2     0     8    0
mcl4k      4096      14    0        0     2     0     2     2     0     8    0
mcl2k2     2112       3    0        0     1     0     1     1     0     8    0
mcl2k      2048     178    0        0    20     2    18    20     0     8    0
mtagpl      80       31    0        0     1     0     1     1     0     8    0
mbufpl     256      596    0        0    32     1    31    31     0     8    0
bufpl      256    10335    0     3287   441     0   441   441     0     8    0
anonpl      16   160178    0   143100   105    25    80    87     0   124    6
amapchunkpl 152    9652    0     9521    28    18    10    19     0   158    4
amappl16   192     6750    0     5711    89    35    54    65     0     8    2
amappl15   184       89    0       88     1     0     1     1     0     8    0
amappl14   176      181    0      175     2     1     1     1     0     8    0
amappl13   168      134    0      134     1     1     0     1     0     8    0
amappl12   160      116    0      112     1     0     1     1     0     8    0
amappl11   152       70    0       55     1     0     1     1     0     8    0
amappl10   144      520    0      510     1     0     1     1     0     8    0
amappl9    136      777    0      770     1     0     1     1     0     8    0
amappl8    128      317    0      283     2     0     2     2     0     8    0
amappl7    120      555    0      545     1     0     1     1     0     8    0
amappl6    112       85    0       75     1     0     1     1     0     8    0
amappl5    104      301    0      286     1     0     1     1     0     8    0
amappl4     96     1752    0     1718     1     0     1     1     0     8    0
amappl3     88      172    0      166     1     0     1     1     0     8    0
amappl2     80     9577    0     9497     4     2     2     3     0     8    0
amappl1     72    40396    0    39940    26    16    10    20     0     8    0
amappl      80     4402    0     4358     3     1     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       17    0       17     1     1     0     1     0     8    0
aobjpl      64       83    0        4     2     0     2     2     0     8    0
uaddrrnd    24     1357    0     1331     1     0     1     1     0     8    0
uaddrbest   32        2    0        0     1     0     1     1     0     8    0
uaddr       24     1357    0     1331     1     0     1     1     0     8    0
vmmpekpl   168    15271    0    15238     2     0     2     2     0     8    0
vmmpepl    168   177154    0   174846   213    77   136   136     0   357   35
vmsppl     368     1347    0     1331     2     0     2     2     0     8    0
pdppl      4096    2721    0     2677     7     1     6     6     0     8    0
pvpl        32   454917    0   434523   268    67   201   207     0   265   32
pmappl     232     1356    0     1337     3     1     2     2     0     8    0
extentpl    40       41    0       26     1     0     1     1     0     8    0
phpool     112      672    0       26    19     0    19    19     0     8    0

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/10/07 10:14 openbsd 29a2b068f14b 28ac6e64 .config console log report ci-openbsd-multicore
* Struck through repros no longer work on HEAD.