syzbot


assert "tname->un_flags & UNVEIL_USERSET" failed: fpanic: kernel diagnostic assertion "!_kernel_lock_held()" failed in k

Status: closed as dup on 2019/03/27 11:06
Reported-by: syzbot+3bca45b5db4e3543e5e9@syzkaller.appspotmail.com
First crash: 1240d, last: 1240d
Duplicate of (1):
Title Repro Cause bisect Fix bisect Count Last Reported
assert "tname->un_flags & UNVEIL_USERSET" failed in kern_unveil.c C 1447 1240d 1242d

Sample crash report:
panic: kernel diagnostic assertion "tname->un_flags & UNVEIL_USERSET" failed: fpanic: kernel diagnostic assertion "!_kernel_lock_held()" failed: file "/syzkaller/managers/multicore/kernel/sys/kern/kern_fork.c", line 689
Stopped at      db_enter+0x18:  addq    $0x8,%rsp
    TID    PID    UID     PRFLAGS     PFLAGS  CPU  COMMAND
*114873  11791      0           0          0    1  syz-executor.1
 273787  54345      0      0x2004  0x4000000    0  syz-executor.0
db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398
panic() at panic+0x174 sys/kern/subr_prf.c:208
__assert(ffffffff81f7eb2c,ffffffff81f6b8b7,2b1,ffffffff81f50acf) at __assert+0x2e sys/kern/subr_prf.c:155
proc_trampoline_mp() at proc_trampoline_mp+0x13b
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 "tname->un_flags & UNVEIL_USERSET" failed: file "/syzkaller/managers/multicore/kernel/sys/kern/kern_unveil.c", line 879
ddb{1}> trace
db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398
panic() at panic+0x174 sys/kern/subr_prf.c:208
__assert(ffffffff81f7eb2c,ffffffff81f6b8b7,2b1,ffffffff81f50acf) at __assert+0x2e sys/kern/subr_prf.c:155
proc_trampoline_mp() at proc_trampoline_mp+0x13b
end trace frame: 0x0, count: -4
ddb{1}> show registers
rdi                                0
rsi                              0x1
rbp               0xffff800020c3f240
rbx               0xffff800020c3f2f0
rdx               0xffffffff81f89e77    apollo_pio_rec+0x9e22
rcx                                0
rax                                0
r8                0xffffffff811c43a3    kprintf+0x183
r9                               0x1
r10                             0x25
r11               0x2e6ac4701fbe1ad3
r12                     0x3000000008
r13               0xffff800020c3f250
r14                            0x104
r15                              0x1
rip               0xffffffff81e2e758    db_enter+0x18
cs                               0x8
rflags                         0x246
rsp               0xffff800020c3f230
ss                              0x10
db_enter+0x18:  addq    $0x8,%rsp
ddb{1}> show proc
PROC (syz-executor.1) pid=114873 stat=onproc
    flags process=0 proc=0
    pri=77, usrpri=77, nice=20
    forw=0xffffffffffffffff, list=0xffff800020b392d8,0xffffffff82394e00
    process=0xffff800020b8c6a8 user=0xffff800020c3a000, vmspace=0xfffffd807effeb40
    estcpu=36, cpticks=1, pctcpu=0.0
    user=0, sys=1, intr=0
ddb{1}> ps
   PID     TID   PPID    UID  S       FLAGS  WAIT          COMMAND
*11791  114873   8839      0  7           0                syz-executor.1
 54345  204405  82559      0  4     0x82004                syz-executor.0
 54345  273787  82559      0  7   0x4002004                syz-executor.0
  8839  292045  35541      0  2         0x2                syz-executor.1
 82559  394001  35541      0  3        0x82  nanosleep     syz-executor.0
 23051  457449      1      0  3    0x100083  ttyin         getty
 35541   93815  54139      0  3        0x82  thrsleep      syz-fuzzer
 35541   41770  54139      0  3   0x4000082  nanosleep     syz-fuzzer
 35541  497298  54139      0  3   0x4000082  thrsleep      syz-fuzzer
 35541  202805  54139      0  3   0x4000082  thrsleep      syz-fuzzer
 35541   72406  54139      0  2   0x4000082                syz-fuzzer
 35541  353359  54139      0  3   0x4000082  thrsleep      syz-fuzzer
 35541  108326  54139      0  3   0x4000082  thrsleep      syz-fuzzer
 35541  430563  54139      0  3   0x4000082  thrsleep      syz-fuzzer
 35541  112142  54139      0  3   0x4000082  thrsleep      syz-fuzzer
 35541    9726  54139      0  3   0x4000082  thrsleep      syz-fuzzer
 54139  508554  31469      0  3    0x10008a  pause         ksh
 31469  342951  56689      0  3        0x92  select        sshd
 56689  286088      1      0  3        0x80  select        sshd
 29156  515169  81444     74  3    0x100092  bpf           pflogd
 81444  166228      1      0  3        0x80  netio         pflogd
 25448  423406  68944     73  3    0x100090  kqread        syslogd
 68944  347870      1      0  3    0x100082  netio         syslogd
 62149  118572      1     77  3    0x100090  poll          dhclient
 38110  343418      1      0  3        0x80  poll          dhclient
 81774  187088      0      0  3     0x14200  pgzero        zerothread
  8815  250958      0      0  3     0x14200  aiodoned      aiodoned
 88477  280076      0      0  3     0x14200  syncer        update
 53324  310529      0      0  3     0x14200  cleaner       cleaner
 86197  506767      0      0  3     0x14200  reaper        reaper
 17768   59303      0      0  3     0x14200  pgdaemon      pagedaemon
 62100  475910      0      0  3     0x14200  bored         crynlk
 51640  244886      0      0  3     0x14200  bored         crypto
 46036   42337      0      0  3  0x40014200  acpi0         acpi0
 76507  370510      0      0  3  0x40014200                idle1
 25312  480070      0      0  3     0x14200  bored         softnet
 63973  396480      0      0  3     0x14200  bored         systqmp
 94094  444029      0      0  3     0x14200  bored         systq
 43474  100464      0      0  3  0x40014200  bored         softclock
 93496  322690      0      0  3  0x40014200                idle0
 84308  250031      0      0  3     0x14200  bored         smr
     1  126511      0      0  3        0x82  wait          init
     0       0     -1      0  3     0x10200  scheduler     swapper
ddb{1}> show all locks
Process 54345 (syz-executor.0) thread 0xffff800020b392d8 (273787)
exclusive rrwlock inode r = 0 (0xfffffd807dc9ce68) locked @ /syzkaller/managers/multicore/kernel/sys/ufs/ufs/ufs_vnops.c:1547
#0  witness_lock+0x594 sys/kern/subr_witness.c:1201
#1  _rw_enter+0x45d sys/kern/kern_rwlock.c:280
#2  _rrw_enter+0x60 sys/kern/kern_rwlock.c:410
#3  VOP_LOCK+0x57 sys/kern/vfs_vops.c:602
#4  vn_lock+0x6e sys/kern/vfs_vnops.c:549
#5  vget+0x1c3 sys/kern/vfs_subr.c:672
#6  cache_lookup+0x300 sys/kern/vfs_cache.c:224
#7  ufs_lookup+0x1d7 sys/ufs/ufs/ufs_lookup.c:162
#8  VOP_LOOKUP+0x67 sys/kern/vfs_vops.c:90
#9  vfs_lookup+0x556 sys/kern/vfs_lookup.c:523
#10 namei+0x4b2 sys/kern/vfs_lookup.c:224
#11 check_exec+0x83 sys/kern/kern_exec.c:123
#12 sys_execve+0x173 sys/kern/kern_exec.c:298
#13 syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline]
#13 syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574
#14 Xsyscall+0x128
exclusive kernel_lock &kernel_lock r = 0 (0xffffffff8234a3d0) locked @ /syzkaller/managers/multicore/kernel/sys/kern/sched_bsd.c:439
#0  witness_lock+0x594 sys/kern/subr_witness.c:1201
#1  ___mp_acquire_count+0x67 sys/kern/kern_lock.c:231
#2  mi_switch+0x3ca sys/kern/sched_bsd.c:439
#3  sleep_finish+0x110 sys/kern/kern_synch.c:312
#4  sleep_finish_all+0x34 sleep_finish_timeout sys/kern/kern_synch.c:336 [inline]
#4  sleep_finish_all+0x34 sys/kern/kern_synch.c:157
#5  tsleep+0x1c2
#6  single_thread_set+0x3d1 single_thread_wait sys/kern/kern_sig.c:2040 [inline]
#6  single_thread_set+0x3d1 sys/kern/kern_sig.c:2031
#7  sys_execve+0x62 sys/kern/kern_exec.c:269
#8  syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline]
#8  syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574
#9  Xsyscall+0x128
Process 8839 (syz-executor.1) thread 0xffff800020b399e0 (292045)
exclusive rrwlock inode r = 0 (0xfffffd807dc9c808) locked @ /syzkaller/managers/multicore/kernel/sys/ufs/ufs/ufs_ihash.c:140
#0  witness_lock+0x594 sys/kern/subr_witness.c:1201
#1  _rw_enter+0x45d sys/kern/kern_rwlock.c:280
#2  _rrw_enter+0x60 sys/kern/kern_rwlock.c:410
#3  ufs_ihashins+0x6d sys/ufs/ufs/ufs_ihash.c:140
#4  ffs_vget+0x143 sys/ufs/ffs/ffs_vfsops.c:1352
#5  ffs_inode_alloc+0x1cf sys/ufs/ffs/ffs_alloc.c:392
#6  ufs_mkdir+0x10f sys/ufs/ufs/ufs_vnops.c:1164
#7  VOP_MKDIR+0x76 sys/kern/vfs_vops.c:449
#8  domkdirat+0x12d sys/kern/vfs_syscalls.c:2881
#9  syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline]
#9  syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574
#10 Xsyscall+0x128
exclusive rrwlock inode r = 0 (0xfffffd806e2a5808) locked @ /syzkaller/managers/multicore/kernel/sys/ufs/ufs/ufs_vnops.c:1547
#0  witness_lock+0x594 sys/kern/subr_witness.c:1201
#1  _rw_enter+0x45d sys/kern/kern_rwlock.c:280
#2  _rrw_enter+0x60 sys/kern/kern_rwlock.c:410
#3  VOP_LOCK+0x57 sys/kern/vfs_vops.c:602
#4  vn_lock+0x6e sys/kern/vfs_vnops.c:549
#5  vfs_lookup+0xf5 sys/kern/vfs_lookup.c:387
#6  namei+0x4b2 sys/kern/vfs_lookup.c:224
#7  domkdirat+0x81 sys/kern/vfs_syscalls.c:2866
#8  syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline]
#8  syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574
#9  Xsyscall+0x128
ddb{1}> show malloc
           Type InUse  MemUse  HighUse   Limit  Requests Type Lim Kern Lim
         devbuf  9527   6428K    6441K  78643K     10884        0        0
            pcb    25      9K      11K  78643K       493        0        0
         rtable   100      3K       4K  78643K       474        0        0
         ifaddr    62     14K      15K  78643K       159        0        0
       counters    39     33K      33K  78643K        39        0        0
       ioctlops     0      0K       4K  78643K      1486        0        0
            iov     0      0K      24K  78643K       102        0        0
          mount     1      1K       1K  78643K         1        0        0
         vnodes  1199     75K      75K  78643K      1712        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        11        0        0
         VM map     2      1K       1K  78643K         2        0        0
            sem    12      1K       1K  78643K        72        0        0
        dirhash    12      2K       2K  78643K        12        0        0
           ACPI  1808    196K     290K  78643K     12628        0        0
      file desc     6     17K      19K  78643K       768        0        0
          sigio     0      0K       0K  78643K         9        0        0
           proc    56     63K      71K  78643K       527        0        0
        subproc    64  65538K   67586K  78643K       244        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       146        0        0
       in_multi    33      2K       2K  78643K       138        0        0
    ether_multi     1      0K       0K  78643K         8        0        0
            mrt     0      0K       0K  78643K         1        0        0
    ISOFS mount     1     32K      32K  78643K         1        0        0
  MSDOSFS mount     1     16K      16K  78643K         1        0        0
           ttys    60    265K     265K  78643K        60        0        0
           exec     1      0K       1K  78643K       283        0        0
     pfkey data     0      0K       0K  78643K         2        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    84     20K      21K  78643K      3402        0        0
       UVM aobj    30      2K       2K  78643K        32        0        0
        memdesc     1      4K       4K  78643K         1        0        0
    crypto data     1      1K       1K  78643K         1        0        0
    ip6_options     0      0K       0K  78643K        33        0        0
            NDP    15      0K       0K  78643K        49        0        0
           temp   179   2379K    2445K  78643K      5503        0        0
         kqueue     0      0K       0K  78643K         2        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        9    0        5     1     0     1     1     0     8    0
inpcbpl    280      436    0      429     1     0     1     1     0     8    0
plimitpl   152       53    0       45     1     0     1     1     0     8    0
plcache    128       20    0        0     1     0     1     1     0     8    0
rtentry    112       88    0       48     2     0     2     2     0     8    0
syncache   264        4    0        4     1     1     0     1     0     8    0
tcpqe       32       43    0       43     1     1     0     1     0     8    0
tcpcb      544      167    0      163     1     0     1     1     0     8    0
nd6         48       14    0       10     1     0     1     1     0     8    0
ppxss      1128      14    0       14     4     4     0     1     0     8    0
pffrent     40        1    0        1     1     1     0     1     0     8    0
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       26    0       15     1     0     1     1     0     8    0
pfstkey    112       26    0       15     1     0     1     1     0     8    0
pfstate    328       26    0       15     2     0     2     2     0     8    0
pfrule     1360      21    0       16     2     1     1     2     0     8    0
art_heap8  4096       1    0        0     1     0     1     1     0     8    0
art_heap4  256      396    0      208    12     0    12    12     0     8    0
art_table   32      397    0      208     2     0     2     2     0     8    0
art_node    16       85    0       51     1     0     1     1     0     8    0
sysvmsgpl   40        5    0        2     1     0     1     1     0     8    0
semupl     112        1    0        1     1     1     0     1     0     8    0
semapl     112       70    0       60     1     0     1     1     0     8    0
shmpl      112       30    0        2     1     0     1     1     0     8    0
dirhash    1024      17    0        0     3     0     3     3     0     8    0
dino1pl    128     2851    0     1411    48     1    47    47     0     8    0
ffsino     272     2851    0     1411    97     1    96    96     0     8    0
nchpl      144     4160    0     2511    62     0    62    62     0     8    0
uvmvnodes   72     3039    0        0    56     0    56    56     0     8    0
vnodes     200     3039    0        0   160     0   160   160     0     8    0
namei      1024   12620    0    12619     1     0     1     1     0     8    0
percpumem   16       30    0        0     1     0     1     1     0     8    0
scsiplug    64        5    0        5     3     3     0     1     0     8    0
scxspl     192    12226    0    12226     8     7     1     6     0     8    1
sigapl     432      953    0      937     2     0     2     2     0     8    0
futexpl     56     8928    0     8928     1     0     1     1     0     8    1
knotepl    112      274    0      255     1     0     1     1     0     8    0
kqueuepl   104      205    0      203     1     0     1     1     0     8    0
pipepl     112      710    0      691     1     0     1     1     0     8    0
fdescpl    488      954    0      937     3     0     3     3     0     8    0
filepl     152     6076    0     5976     5     0     5     5     0     8    1
lockfpl    104      261    0      260     3     2     1     1     0     8    0
lockfspl    32      296    0      295     3     2     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     1386    0     1377     1     0     1     1     0     8    0
zombiepl   144      937    0      937     1     0     1     1     0     8    1
processpl  840      969    0      937     4     0     4     4     0     8    0
procpl     600     2619    0     2577     4     0     4     4     0     8    0
srpgc       64       30    0       30     2     1     1     1     0     8    1
sockpl     384      855    0      836     6     3     3     4     0     8    1
mcl64k     65536    229    0        0    29     2    27    29     0     8    1
mcl16k     16384      5    0        0     1     0     1     1     0     8    0
mcl12k     12288      5    0        0     1     0     1     1     0     8    0
mcl9k      9216       7    0        0     1     0     1     1     0     8    0
mcl8k      8192       4    0        0     1     0     1     1     0     8    0
mcl4k      4096       9    0        0     2     0     2     2     0     8    0
mcl2k2     2112       6    0        0     1     0     1     1     0     8    0
mcl2k      2048     124    0        0    15     0    15    15     0     8    0
mtagpl      80        1    0        0     1     0     1     1     0     8    0
mbufpl     256      341    0        0    18     0    18    18     0     8    0
bufpl      256     7844    0     1146   419     0   419   419     0     8    0
anonpl      16   119652    0   112478    74    28    46    52     0   125    8
amapchunkpl 152    5348    0     5255    13     8     5     9     0   158    0
amappl16   192     5098    0     4634    67    34    33    36     0     8    8
amappl15   184      370    0      366     1     0     1     1     0     8    0
amappl14   176       94    0       90     1     0     1     1     0     8    0
amappl13   168       74    0       65     1     0     1     1     0     8    0
amappl12   160       76    0       74     1     0     1     1     0     8    0
amappl11   152      330    0      315     1     0     1     1     0     8    0
amappl10   144      390    0      387     1     0     1     1     0     8    0
amappl9    136      603    0      599     1     0     1     1     0     8    0
amappl8    128      161    0      147     1     0     1     1     0     8    0
amappl7    120      363    0      358     1     0     1     1     0     8    0
amappl6    112      119    0      111     1     0     1     1     0     8    0
amappl5    104      134    0      120     1     0     1     1     0     8    0
amappl4     96     1141    0     1111     2     1     1     2     0     8    0
amappl3     88      283    0      276     1     0     1     1     0     8    0
amappl2     80     7439    0     7381     2     0     2     2     0     8    0
amappl1     72    30421    0    29978    25    15    10    20     0     8    0
amappl      72     2897    0     2860     1     0     1     1     0    75    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
dma64       64      259    0      259     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       31    0        2     1     0     1     1     0     8    0
uaddrrnd    24      954    0      937     1     0     1     1     0     8    0
uaddrbest   32        2    0        0     1     0     1     1     0     8    0
uaddr       24      954    0      937     1     0     1     1     0     8    0
vmmpekpl   168    12185    0    12161     2     0     2     2     0     8    0
vmmpepl    168   110066    0   108543   111    30    81    81     0   357   10
vmsppl     360      953    0      937     2     0     2     2     0     8    0
pdppl      4096    1916    0     1874     6     0     6     6     0     8    0
pvpl        32   337244    0   326797   162    39   123   135     0   265   20
pmappl     224      953    0      937     1     0     1     1     0     8    0
extentpl    40       39    0       25     1     0     1     1     0     8    0
phpool     112      610    0        6    18     0    18    18     0     8    0

Crashes (1):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-openbsd-multicore 2019/03/27 01:18 openbsd ad597a5fc5a3 55684ce1 .config log report