syzbot


assert "tname->un_flags & UNVEIL_USERSET" failed: file "/syzkaller/managers/panic: kernel diagnostic assertion "!_kernel

Status: closed as dup on 2019/03/25 07:10
Reported-by: syzbot+6546581db71db298373f@syzkaller.appspotmail.com
First crash: 1238d, last: 1238d
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 1236d 1238d

Sample crash report:
login: panic: kernel diagnostic assertion "tname->un_flags & UNVEIL_USERSET" failed: file "/syzkaller/managers/panic: kernel diagnostic assertion "!_kernel_lock_held()" failed: file "/syzkaller/managers/setuid/kernel/sys/kern/kern_fork.c", line 689
Stopped at      db_enter+0x18:  addq    $0x8,%rsp
    TID    PID    UID     PRFLAGS     PFLAGS  CPU  COMMAND
 186946  21492  32767        0x10  0x4000000    0  syz-executor.1
*214427  21492  32767        0x10  0x4000000    1  syz-executor.1
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(ffffffff81f7dcd5,ffffffff81f56a8f,2b1,ffffffff81f50a83) 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/setuid/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(ffffffff81f7dcd5,ffffffff81f56a8f,2b1,ffffffff81f50a83) 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               0xffff800020c619f0
rbx               0xffff800020c61aa0
rdx               0xffffffff81f1fdc9    cmd0646_9_tim_udma+0x134a6
rcx                                0
rax                                0
r8                0xffffffff814ea2c3    kprintf+0x183
r9                               0x1
r10                             0x25
r11               0x27b0ba416fead41c
r12                     0x3000000008
r13               0xffff800020c61a00
r14                            0x104
r15                              0x1
rip               0xffffffff81c97598    db_enter+0x18
cs                               0x8
rflags                         0x246
rsp               0xffff800020c619e0
ss                              0x10
db_enter+0x18:  addq    $0x8,%rsp
ddb{1}> show proc
PROC (syz-executor.1) pid=214427 stat=onproc
    flags process=10<SUGID> proc=4000000<THREAD>
    pri=66, usrpri=66, nice=20
    forw=0xffffffffffffffff, list=0xffff800020b28270,0xffff800020b28730
    process=0xffff800020b2b708 user=0xffff800020c5c000, vmspace=0xfffffd807effe5a0
    estcpu=16, cpticks=1, pctcpu=0.0
    user=0, sys=1, intr=0
ddb{1}> ps
   PID     TID   PPID    UID  S       FLAGS  WAIT          COMMAND
 71771  272879  42432  32767  2        0x10                syz-executor.0
 71771  505455  42432  32767  3   0x4000090  fsleep        syz-executor.0
 71771   43934  42432  32767  3   0x4000090  fsleep        syz-executor.0
 21492  322313  86147  32767  2        0x10                syz-executor.1
 21492  469162  86147  32767  2   0x4000010                syz-executor.1
 21492  186946  86147  32767  7   0x4000010                syz-executor.1
*21492  214427  86147  32767  7   0x4000010                syz-executor.1
 21492  233832  86147  32767  2   0x4000010                syz-executor.1
 86147  299491  99844  32767  3        0x90  nanosleep     syz-executor.1
 99844  292351  82889      0  3        0x82  wait          syz-executor.1
 42432  504561  32691  32767  3        0x90  nanosleep     syz-executor.0
 32691  224079  82889      0  3        0x82  wait          syz-executor.0
 18876  206128      0      0  3     0x14200  bored         sosplice
 82889   21077  41896      0  3        0x82  thrsleep      syz-fuzzer
 82889  297618  41896      0  3   0x4000082  nanosleep     syz-fuzzer
 82889  341628  41896      0  3   0x4000082  thrsleep      syz-fuzzer
 82889   49576  41896      0  3   0x4000082  kqread        syz-fuzzer
 82889  182227  41896      0  3   0x4000082  thrsleep      syz-fuzzer
 82889  394394  41896      0  3   0x4000082  thrsleep      syz-fuzzer
 82889  182980  41896      0  3   0x4000082  thrsleep      syz-fuzzer
 82889  133780  41896      0  3   0x4000082  thrsleep      syz-fuzzer
 82889  451952  41896      0  3   0x4000082  thrsleep      syz-fuzzer
 82889  160989  41896      0  3   0x4000082  thrsleep      syz-fuzzer
 41896    5914  86029      0  3    0x10008a  pause         ksh
 86029  515452  61185      0  3        0x92  select        sshd
 17190  403347      1      0  3    0x100083  ttyin         getty
 61185  515453      1      0  3        0x80  select        sshd
 27814  328917  80731     73  3    0x100090  kqread        syslogd
 80731  382034      1      0  3    0x100082  netio         syslogd
 67258  176650      1     77  3    0x100090  poll          dhclient
 13852  430882      1      0  3        0x80  poll          dhclient
 95623  270973      0      0  2     0x14200                zerothread
 51873  262925      0      0  3     0x14200  aiodoned      aiodoned
 90487  443108      0      0  3     0x14200  syncer        update
 13987  101286      0      0  3     0x14200  cleaner       cleaner
 75065   39041      0      0  3     0x14200  reaper        reaper
 69643  359746      0      0  3     0x14200  pgdaemon      pagedaemon
  8685  437542      0      0  3     0x14200  bored         crynlk
 96248  288969      0      0  3     0x14200  bored         crypto
 93269  139018      0      0  3  0x40014200  acpi0         acpi0
 16046  436341      0      0  3  0x40014200                idle1
 97122  236210      0      0  3     0x14200  bored         softnet
 77370  136840      0      0  3     0x14200  bored         systqmp
 89640  346731      0      0  3     0x14200  bored         systq
 36355   80789      0      0  3  0x40014200  bored         softclock
 87509  178619      0      0  3  0x40014200                idle0
 19075  402149      0      0  3     0x14200  bored         smr
     1  333115      0      0  3        0x82  wait          init
     0       0     -1      0  3     0x10200  scheduler     swapper
ddb{1}> show all locks
Process 21492 (syz-executor.1) thread 0xffff800020b28bd0 (186946)
exclusive rrwlock inode r = 0 (0xfffffd80693951b8) locked @ /syzkaller/managers/setuid/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  ufs_ihashget+0x151 sys/ufs/ufs/ufs_ihash.c:119
#7  ffs_vget+0x84 sys/ufs/ffs/ffs_vfsops.c:1323
#8  ufs_lookup+0x15d3 sys/ufs/ufs/ufs_lookup.c:487
#9  VOP_LOOKUP+0x67 sys/kern/vfs_vops.c:90
#10 vfs_lookup+0x556 sys/kern/vfs_lookup.c:523
#11 namei+0x4b2 sys/kern/vfs_lookup.c:224
#12 dounlinkat+0xa5 sys/kern/vfs_syscalls.c:1673
#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 rrwlock inode r = 0 (0xfffffd8069395708) locked @ /syzkaller/managers/setuid/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  dounlinkat+0xa5 sys/kern/vfs_syscalls.c:1673
#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 (0xffffffff82350b68) locked @ /syzkaller/managers/setuid/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  9459   6321K    6321K  78643K     10661        0        0
            pcb    23      9K      10K  78643K       413        0        0
         rtable    97      3K       3K  78643K       907        0        0
         ifaddr    36     10K      10K  78643K       178        0        0
       counters    39     33K      33K  78643K        39        0        0
       ioctlops     0      0K       2K  78643K        40        0        0
            iov     0      0K      28K  78643K        65        0        0
          mount     1      1K       1K  78643K         1        0        0
         vnodes  1201     75K      75K  78643K      1729        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         7        0        0
         VM map     2      1K       1K  78643K         2        0        0
            sem    12      0K       0K  78643K       123        0        0
        dirhash    12      2K       2K  78643K        12        0        0
           ACPI  1808    196K     290K  78643K     12628        0        0
      file desc     8     25K      33K  78643K       699        0        0
          sigio     0      0K       0K  78643K         6        0        0
           proc    44     50K      58K  78643K       786        0        0
        subproc    68  69634K   69634K  78643K       850        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        98        0        0
       in_multi    33      2K       2K  78643K       299        0        0
    ether_multi     1      0K       0K  78643K         4        0        0
    ISOFS mount     1     32K      32K  78643K         1        0        0
  MSDOSFS mount     1     16K      16K  78643K         1        0        0
           ttys    54    238K     238K  78643K        54        0        0
           exec     0      0K       1K  78643K       317        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    86     21K      30K  78643K      2925        0        0
       UVM aobj    25      2K       2K  78643K        27        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        30        0        0
            NDP     5      0K       0K  78643K        78        0        0
           temp   100   2369K    2434K  78643K      5843        0        0
         kqueue     0      0K       0K  78643K         7        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       23     1     0     1     1     0     8    0
inpcbpl    280      364    0      357     1     0     1     1     0     8    0
plimitpl   152       95    0       86     1     0     1     1     0     8    0
plcache    128       20    0        0     1     0     1     1     0     8    0
rtentry    112      248    0      208     2     0     2     2     0     8    0
syncache   264        4    0        4     1     1     0     1     0     8    0
tcpcb      544      132    0      128     1     0     1     1     0     8    0
nd6         48       50    0       46     1     0     1     1     0     8    0
art_heap8  4096       1    0        0     1     0     1     1     0     8    0
art_heap4  256     1157    0      969    12     0    12    12     0     8    0
art_table   32     1158    0      969     2     0     2     2     0     8    0
art_node    16      247    0      213     1     0     1     1     0     8    0
semapl     112      121    0      111     1     0     1     1     0     8    0
shmpl      112       25    0        2     1     0     1     1     0     8    0
dirhash    1024      17    0        0     3     0     3     3     0     8    0
dino1pl    128     2196    0      771    47     0    47    47     0     8    0
ffsino     272     2196    0      771    96     0    96    96     0     8    0
nchpl      144     3307    0     1692    61     0    61    61     0     8    0
uvmvnodes   72     2630    0        0    48     0    48    48     0     8    0
vnodes     200     2630    0        0   139     0   139   139     0     8    0
namei      1024   10624    0    10623     2     1     1     1     0     8    0
percpumem   16       30    0        0     1     0     1     1     0     8    0
scxspl     192     8906    0     8906    14    10     4     6     0     8    4
sigapl     432      800    0      784     3     1     2     3     0     8    0
futexpl     56     5956    0     5954     1     0     1     1     0     8    0
knotepl    112      654    0      635     1     0     1     1     0     8    0
kqueuepl   104      147    0      144     1     0     1     1     0     8    0
pipepl     112      674    0      655     3     2     1     2     0     8    0
fdescpl    488      801    0      784     3     0     3     3     0     8    0
filepl     152     5135    0     5036     6     1     5     5     0     8    1
lockfpl    104      144    0      144     3     2     1     1     0     8    1
lockfspl    32      331    0      331     3     2     1     1     0     8    1
sessionpl  112       40    0       30     1     0     1     1     0     8    0
pgrppl      48       44    0       34     1     0     1     1     0     8    0
ucredpl     96     1261    0     1252     1     0     1     1     0     8    0
zombiepl   144      784    0      784     2     1     1     1     0     8    1
processpl  840      817    0      784     4     0     4     4     0     8    0
procpl     600     1909    0     1861     4     0     4     4     0     8    0
srpgc       64      134    0      134     1     0     1     1     0     8    1
sosppl     128       10    0       10     3     3     0     1     0     8    0
sockpl     384      766    0      749     4     1     3     4     0     8    1
mcl64k     65536      2    0        0     1     0     1     1     0     8    0
mcl12k     12288      2    0        0     1     0     1     1     0     8    0
mcl9k      9216       4    0        0     1     0     1     1     0     8    0
mcl8k      8192       4    0        0     1     0     1     1     0     8    0
mcl4k      4096      15    0        0     2     0     2     2     0     8    0
mcl2k2     2112       3    0        0     1     0     1     1     0     8    0
mcl2k      2048     115    0        0    14     0    14    14     0     8    0
mtagpl      80        1    0        0     1     0     1     1     0     8    0
mbufpl     256      151    0        0     9     0     9     9     0     8    0
bufpl      256     6705    0     1122   349     0   349   349     0     8    0
anonpl      16    88216    0    78000    53    11    42    42     0   125    0
amapchunkpl 152    5422    0     5316    15     6     9    11     0   158    4
amappl16   192     3049    0     2468    40    10    30    30     0     8    0
amappl15   184       58    0       54     1     0     1     1     0     8    0
amappl14   176      302    0      297     2     1     1     1     0     8    0
amappl13   168       83    0       78     1     0     1     1     0     8    0
amappl12   160      178    0      172     1     0     1     1     0     8    0
amappl11   152       71    0       60     1     0     1     1     0     8    0
amappl10   144      173    0      173     3     3     0     1     0     8    0
amappl9    136      726    0      719     1     0     1     1     0     8    0
amappl8    128      330    0      307     1     0     1     1     0     8    0
amappl7    120      108    0      103     1     0     1     1     0     8    0
amappl6    112      123    0      111     1     0     1     1     0     8    0
amappl5    104      248    0      235     1     0     1     1     0     8    0
amappl4     96      854    0      825     2     1     1     2     0     8    0
amappl3     88      423    0      416     1     0     1     1     0     8    0
amappl2     80     5136    0     5068     2     0     2     2     0     8    0
amappl1     72    28055    0    27573    23    13    10    19     0     8    0
amappl      72     2303    0     2264     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       26    0        2     1     0     1     1     0     8    0
uaddrrnd    24      801    0      784     1     0     1     1     0     8    0
uaddrbest   32        2    0        0     1     0     1     1     0     8    0
uaddr       24      801    0      784     1     0     1     1     0     8    0
vmmpekpl   168    10295    0    10272     2     0     2     2     0     8    0
vmmpepl    168    98475    0    96717    97    20    77    77     0   357    0
vmsppl     360      800    0      784     2     0     2     2     0     8    0
pdppl      4096    1610    0     1568     6     0     6     6     0     8    0
pvpl        32   275817    0   262247   142    32   110   111     0   265    0
pmappl     224      800    0      784     3     2     1     2     0     8    0
extentpl    40       39    0       25     1     0     1     1     0     8    0
phpool     112      499    0        3    15     0    15    15     0     8    0

Crashes (1):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-openbsd-setuid 2019/03/24 23:23 openbsd b3dbd5f2ca08 2c86e0a5 .config log report