syzbot


assert "tname->un_flags & UNVEIL_USERSET" failed: file "/syzkaller/managers/multicore/kernel/sys/kern/kern_unveipanic: k

Status: closed as dup on 2019/03/26 11:37
Reported-by: syzbot+b517ec2de2d375fbbae7@syzkaller.appspotmail.com
First crash: 2067d, last: 2067d
Duplicate of
Title Repro Cause bisect Fix bisect Count Last Reported
assert "tname->un_flags & UNVEIL_USERSET" failed in kern_unveil.c C 1447 2066d 2069d

Sample crash report:
���jV���;�þ¯ï¿½ï¿½ï¿½ï¿½ï¿½`Õpl…ýÿÿÿÿÿÿÿ�(�����(������jV���;�þ¯ï¿½ï¿½ï¿½ï¿½ï¿½`Õpl…ýÿÿÿÿÿÿÿ�(�����(���panic: kernel diagnostic assertion "tname->un_flags & UNVEIL_USERSET" failed: file "/syzkaller/managers/multicore/kernel/sys/kern/kern_unveipanic: 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
 356172  34207      0           0  0x4000000    0  syz-executor.1
*457995  72219      0           0  0x4000000    1  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(ffffffff81f7e6d6,ffffffff81f69c32,2b1,ffffffff81f4f134) 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(ffffffff81f7e6d6,ffffffff81f69c32,2b1,ffffffff81f4f134) 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               0xffff800020c5b080
rbx               0xffff800020c5b130
rdx               0xffffffff81f8c339    apollo_pio_rec+0x95b5
rcx                                0
rax                                0
r8                0xffffffff818d1a13    kprintf+0x183
r9                               0x1
r10                             0x25
r11                0xcf26a9b66f36aba
r12                     0x3000000008
r13               0xffff800020c5b090
r14                            0x104
r15                              0x1
rip               0xffffffff814367b8    db_enter+0x18
cs                               0x8
rflags                         0x246
rsp               0xffff800020c5b070
ss                              0x10
db_enter+0x18:  addq    $0x8,%rsp
ddb{1}> show proc
PROC (syz-executor.0) pid=457995 stat=onproc
    flags process=0 proc=4000000<THREAD>
    pri=86, usrpri=86, nice=20
    forw=0xffffffffffffffff, list=0xffff800020b7ce28,0xffff800020b7c280
    process=0xffff800020b8c360 user=0xffff800020c56000, vmspace=0xfffffd807effd708
    estcpu=36, cpticks=1, pctcpu=0.0
    user=0, sys=1, intr=0
ddb{1}> ps
   PID     TID   PPID    UID  S       FLAGS  WAIT          COMMAND
 34207  378979  37685      0  2           0                syz-executor.1
 34207  356172  37685      0  7   0x4000000                syz-executor.1
 72219  412917  32169      0  2           0                syz-executor.0
 72219  504753  32169      0  3   0x4000080  ttyout        syz-executor.0
*72219  457995  32169      0  7   0x4000000                syz-executor.0
 16814  452674      0      0  3     0x14200  bored         sosplice
 32169  273491  50121      0  3        0x82  nanosleep     syz-executor.0
 37685  295313  50121      0  2         0x2                syz-executor.1
 50121  326844  87202      0  3        0x82  kqread        syz-fuzzer
 50121  227855  87202      0  3   0x4000082  thrsleep      syz-fuzzer
 50121  165858  87202      0  3   0x4000082  thrsleep      syz-fuzzer
 50121  292469  87202      0  3   0x4000082  thrsleep      syz-fuzzer
 50121  230650  87202      0  3   0x4000082  thrsleep      syz-fuzzer
 50121  296004  87202      0  3   0x4000082  thrsleep      syz-fuzzer
 50121  365079  87202      0  3   0x4000082  thrsleep      syz-fuzzer
 50121  499043  87202      0  3   0x4000082  thrsleep      syz-fuzzer
 50121  320086  87202      0  3   0x4000082  thrsleep      syz-fuzzer
 50121  167644  87202      0  3   0x4000082  thrsleep      syz-fuzzer
 87202   92606  58677      0  3    0x10008a  pause         ksh
 58677    3130  86740      0  3        0x92  select        sshd
  1107  237806      1      0  3    0x100083  ttyin         getty
 86740  299346      1      0  3        0x80  select        sshd
  7159  336840  37284     74  3    0x100092  bpf           pflogd
 37284  420034      1      0  3        0x80  netio         pflogd
 74243  517547  24000     73  3    0x100090  kqread        syslogd
 24000  242563      1      0  3    0x100082  netio         syslogd
 90035  390957      1     77  3    0x100090  poll          dhclient
 13055  221617      1      0  3        0x80  poll          dhclient
 67771  459463      0      0  2     0x14200                zerothread
 36714  103445      0      0  3     0x14200  aiodoned      aiodoned
 80341  297146      0      0  3     0x14200  syncer        update
 81193   58687      0      0  3     0x14200  cleaner       cleaner
 12956  214972      0      0  3     0x14200  reaper        reaper
 45284  291863      0      0  3     0x14200  pgdaemon      pagedaemon
   581  426561      0      0  3     0x14200  bored         crynlk
 10243  113857      0      0  3     0x14200  bored         crypto
 38164  257487      0      0  3  0x40014200  acpi0         acpi0
 14910   33856      0      0  3  0x40014200                idle1
 69022  491068      0      0  3     0x14200  bored         softnet
 19802  174959      0      0  3     0x14200  bored         systqmp
 22178  200741      0      0  3     0x14200  bored         systq
 32314  207541      0      0  3  0x40014200  bored         softclock
 76568  346534      0      0  3  0x40014200                idle0
 10463  231350      0      0  3     0x14200  bored         smr
     1  450689      0      0  3        0x82  wait          init
     0       0     -1      0  3     0x10200  scheduler     swapper
ddb{1}> show all locks
Process 34207 (syz-executor.1) thread 0xffff800020b7c270 (356172)
exclusive rrwlock inode r = 0 (0xfffffd807ca12708) 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  domknodat+0xa1 sys/kern/vfs_syscalls.c:1405
#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
exclusive kernel_lock &kernel_lock r = 0 (0xffffffff82349ce8) locked @ /syzkaller/managers/multicore/kernel/sys/sys/syscall_mi.h:90
#0  witness_lock+0x594 sys/kern/subr_witness.c:1201
#1  syscall+0x48b mi_syscall sys/sys/syscall_mi.h:91 [inline]
#1  syscall+0x48b sys/arch/amd64/amd64/trap.c:574
#2  Xsyscall+0x128
ddb{1}> show malloc
           Type InUse  MemUse  HighUse   Limit  Requests Type Lim Kern Lim
         devbuf  9498   6399K    6404K  78643K     10653        0        0
            pcb    25      9K      10K  78643K       149        0        0
         rtable   100      3K       4K  78643K       266        0        0
         ifaddr    52     12K      13K  78643K        88        0        0
       counters    39     33K      33K  78643K        39        0        0
       ioctlops     0      0K       4K  78643K      1472        0        0
            iov     0      0K      16K  78643K        16        0        0
          mount     1      1K       1K  78643K         1        0        0
         vnodes  1201     75K      75K  78643K      1310        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         4        0        0
         VM map     2      1K       1K  78643K         2        0        0
            sem    12      1K       1K  78643K        24        0        0
        dirhash    12      2K       2K  78643K        12        0        0
           ACPI  1808    196K     290K  78643K     12628        0        0
      file desc     6     17K      21K  78643K       164        0        0
           proc    57     63K      71K  78643K       380        0        0
        subproc    64  65538K   67586K  78643K       102        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        24        0        0
       in_multi    33      2K       2K  78643K        48        0        0
    ether_multi     1      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    48    212K     212K  78643K        48        0        0
           exec     0      0K       1K  78643K       211        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    82     20K      21K  78643K      1373        0        0
       UVM aobj     8      2K       2K  78643K         9        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        14        0        0
            NDP    10      0K       0K  78643K        24        0        0
           temp   122   2366K    2433K  78643K      3674        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        5    0        1     1     0     1     1     0     8    0
inpcbpl    280      119    0      112     1     0     1     1     0     8    0
plimitpl   152       21    0       13     1     0     1     1     0     8    0
plcache    128       20    0        0     1     0     1     1     0     8    0
rtentry    112       50    0       10     2     0     2     2     0     8    0
syncache   264        4    0        4     1     1     0     1     0     8    0
tcpqe       32       49    0       49     1     1     0     1     0     8    0
tcpcb      544       34    0       30     1     0     1     1     0     8    0
nd6         48        6    0        2     1     0     1     1     0     8    0
ppxss      1128       7    0        7     2     1     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       15    0        2     1     0     1     1     0     8    0
pfstkey    112       15    0        2     1     0     1     1     0     8    0
pfstate    328       15    0        2     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      226    0       41    12     0    12    12     0     8    0
art_table   32      227    0       41     2     0     2     2     0     8    0
art_node    16       49    0       15     1     0     1     1     0     8    0
semapl     112       22    0       12     1     0     1     1     0     8    0
shmpl      112        7    0        1     1     0     1     1     0     8    0
dirhash    1024      17    0        0     3     0     3     3     0     8    0
dino1pl    128     1708    0      282    47     0    47    47     0     8    0
ffsino     272     1708    0      282    96     0    96    96     0     8    0
nchpl      144     2148    0      514    61     0    61    61     0     8    0
uvmvnodes   72     1784    0        0    33     0    33    33     0     8    0
vnodes     200     1784    0        0    94     0    94    94     0     8    0
namei      1024    5840    0     5839     2     1     1     1     0     8    0
percpumem   16       30    0        0     1     0     1     1     0     8    0
scxspl     192     5345    0     5345    10     8     2     6     0     8    2
sigapl     432      360    0      344     2     0     2     2     0     8    0
futexpl     56     1858    0     1858     1     0     1     1     0     8    1
knotepl    112       98    0       79     1     0     1     1     0     8    0
kqueuepl   104       36    0       34     1     0     1     1     0     8    0
pipepl     112      242    0      223     2     1     1     1     0     8    0
fdescpl    488      361    0      344     3     0     3     3     0     8    0
filepl     152     2067    0     1965     5     0     5     5     0     8    1
lockfpl    104       55    0       55     2     1     1     1     0     8    1
lockfspl    32       77    0       77     2     1     1     1     0     8    1
sessionpl  112       19    0        8     1     0     1     1     0     8    0
pgrppl      48       23    0       12     1     0     1     1     0     8    0
ucredpl     96      330    0      321     1     0     1     1     0     8    0
zombiepl   144      344    0      344     2     1     1     1     0     8    1
processpl  840      377    0      344     4     0     4     4     0     8    0
procpl     600      708    0      663     4     0     4     4     0     8    0
srpgc       64        6    0        6     1     1     0     1     0     8    0
sosppl     128        3    0        3     1     1     0     1     0     8    0
sockpl     384      233    0      214     3     0     3     3     0     8    1
mcl64k     65536      3    0        0     1     0     1     1     0     8    0
mcl16k     16384      2    0        0     1     0     1     1     0     8    0
mcl12k     12288      2    0        0     1     0     1     1     0     8    0
mcl9k      9216       2    0        0     1     0     1     1     0     8    0
mcl8k      8192       3    0        0     1     0     1     1     0     8    0
mcl4k      4096       2    0        0     1     0     1     1     0     8    0
mcl2k2     2112       2    0        0     1     0     1     1     0     8    0
mcl2k      2048     129    0        0    16     0    16    16     0     8    0
mtagpl      80        1    0        0     1     0     1     1     0     8    0
mbufpl     256      148    0        0     9     0     9     9     0     8    0
bufpl      256     5936    0     1143   300     0   300   300     0     8    0
anonpl      16    45134    0    36446    53     2    51    51     0   125   16
amapchunkpl 152    1624    0     1533     6     1     5     5     0   158    0
amappl16   192     1386    0      932    34     0    34    34     0     8   11
amappl15   184       63    0       58     1     0     1     1     0     8    0
amappl14   176       99    0       95     2     1     1     1     0     8    0
amappl13   168       26    0       23     1     0     1     1     0     8    0
amappl12   160       66    0       62     1     0     1     1     0     8    0
amappl11   152       26    0       11     1     0     1     1     0     8    0
amappl10   144       83    0       78     1     0     1     1     0     8    0
amappl9    136      580    0      577     1     0     1     1     0     8    0
amappl8    128      134    0      122     1     0     1     1     0     8    0
amappl7    120       43    0       39     1     0     1     1     0     8    0
amappl6    112       58    0       51     1     0     1     1     0     8    0
amappl5    104      177    0      162     1     0     1     1     0     8    0
amappl4     96      582    0      552     2     1     1     2     0     8    0
amappl3     88      191    0      185     1     0     1     1     0     8    0
amappl2     80     1975    0     1912     2     0     2     2     0     8    0
amappl1     72    17240    0    16780    26    16    10    20     0     8    0
amappl      72      946    0      908     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        8    0        1     1     0     1     1     0     8    0
uaddrrnd    24      361    0      344     1     0     1     1     0     8    0
uaddrbest   32        2    0        0     1     0     1     1     0     8    0
uaddr       24      361    0      344     1     0     1     1     0     8    0
vmmpekpl   168     7019    0     6993     2     0     2     2     0     8    0
vmmpepl    168    45963    0    44413    99    21    78    78     0   357   10
vmsppl     360      360    0      344     2     0     2     2     0     8    0
pdppl      4096     730    0      688     6     0     6     6     0     8    0
pvpl        32   155955    0   143934   143    11   132   132     0   265   35
pmappl     224      360    0      344     2     1     1     2     0     8    0
extentpl    40       39    0       25     1     0     1     1     0     8    0
phpool     112      454    0        4    13     0    13    13     0     8    0

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/03/26 10:30 openbsd 6a51f920f2c9 55684ce1 .config console log report ci-openbsd-multicore
* Struck through repros no longer work on HEAD.