syzbot


assert "tname->un_flags & UNVEIL_USERSET" failed: file "/syzkaller/managers/multicore/kernpanic: kernel diagnostic asser

Status: closed as dup on 2019/03/25 20:13
Reported-by: syzbot+487596040123de1a4a9c@syzkaller.appspotmail.com
First crash: 1857d, last: 1857d
Duplicate of
Title Repro Cause bisect Fix bisect Count Last Reported
assert "tname->un_flags & UNVEIL_USERSET" failed in kern_unveil.c C 1447 1856d 1858d

Sample crash report:
panic: kernel diagnostic assertion "tname->un_flags & UNVEIL_USERSET" failed: file "/syzkaller/managers/multicore/kernpanic: 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
*150149  72230      0           0  0x4000000    1  syz-executor.1
 165198   7301      0           0  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(ffffffff81f7cec5,ffffffff81f6c058,2b1,ffffffff81f4ee5e) 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(ffffffff81f7cec5,ffffffff81f6c058,2b1,ffffffff81f4ee5e) 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               0xffff800020c5f750
rbx               0xffff800020c5f800
rdx               0xffffffff81f8b3e6    apollo_pio_rec+0x9d5d
rcx                                0
rax                                0
r8                0xffffffff81b94ad3    kprintf+0x183
r9                               0x1
r10                             0x25
r11               0x7be823e6b0368fc6
r12                     0x3000000008
r13               0xffff800020c5f760
r14                            0x104
r15                              0x1
rip               0xffffffff81d528d8    db_enter+0x18
cs                               0x8
rflags                         0x246
rsp               0xffff800020c5f740
ss                              0x10
db_enter+0x18:  addq    $0x8,%rsp
ddb{1}> show proc
PROC (syz-executor.1) pid=150149 stat=onproc
    flags process=0 proc=4000000<THREAD>
    pri=86, usrpri=86, nice=20
    forw=0xffffffffffffffff, list=0xffff800020b28270,0xffffffff82377160
    process=0xffff800020aeb3b8 user=0xffff800020c5a000, vmspace=0xfffffd807effe168
    estcpu=36, cpticks=1, pctcpu=0.0
    user=0, sys=1, intr=0
ddb{1}> ps
   PID     TID   PPID    UID  S       FLAGS  WAIT          COMMAND
 72230    2108  15381      0  2           0                syz-executor.1
 72230   15162  15381      0  3   0x4000080  msgwait       syz-executor.1
*72230  150149  15381      0  7   0x4000000                syz-executor.1
  7301  265216  43166      0  2           0                syz-executor.0
  7301  122368  43166      0  2   0x4000000                syz-executor.0
  7301  165198  43166      0  7   0x4000000                syz-executor.0
  7301  483078  43166      0  3   0x4000000  inode         syz-executor.0
 15381  225051  77186      0  3        0x82  nanosleep     syz-executor.1
 22670  335060      1      0  3    0x100083  ttyin         getty
 43166  199467  77186      0  2         0x2                syz-executor.0
 54249  483943      0      0  3     0x14200  bored         sosplice
 77186   15166  60825      0  3        0x82  kqread        syz-fuzzer
 77186   89602  60825      0  3   0x4000082  thrsleep      syz-fuzzer
 77186   67070  60825      0  3   0x4000082  thrsleep      syz-fuzzer
 77186  163118  60825      0  3   0x4000082  thrsleep      syz-fuzzer
 77186  445613  60825      0  3   0x4000082  thrsleep      syz-fuzzer
 77186  354813  60825      0  3   0x4000082  thrsleep      syz-fuzzer
 77186   54760  60825      0  3   0x4000082  thrsleep      syz-fuzzer
 77186  405993  60825      0  3   0x4000082  thrsleep      syz-fuzzer
 77186  415919  60825      0  3   0x4000082  thrsleep      syz-fuzzer
 77186  196287  60825      0  3   0x4000082  thrsleep      syz-fuzzer
 60825  288477  94592      0  3    0x10008a  pause         ksh
 94592  182759  34648      0  3        0x92  select        sshd
 34648  112243      1      0  3        0x80  select        sshd
 18136  358788  47588     74  3    0x100092  bpf           pflogd
 47588  269556      1      0  3        0x80  netio         pflogd
 63801  338353  28901     73  3    0x100090  kqread        syslogd
 28901  364564      1      0  3    0x100082  netio         syslogd
 45375  327906      1     77  3    0x100090  poll          dhclient
 45056  156803      1      0  3        0x80  poll          dhclient
 31637   18382      0      0  2     0x14200                zerothread
 66142  224550      0      0  3     0x14200  aiodoned      aiodoned
 13342  188301      0      0  3     0x14200  syncer        update
 89729  188596      0      0  3     0x14200  cleaner       cleaner
 17404   69151      0      0  3     0x14200  reaper        reaper
 71438  433640      0      0  3     0x14200  pgdaemon      pagedaemon
 38017  102965      0      0  3     0x14200  bored         crynlk
 11555  357868      0      0  3     0x14200  bored         crypto
  6855  128339      0      0  3  0x40014200  acpi0         acpi0
 34217  326135      0      0  3  0x40014200                idle1
 56550  488940      0      0  3     0x14200  bored         softnet
 51399  501036      0      0  3     0x14200  bored         systqmp
 25920  132174      0      0  3     0x14200  bored         systq
 93950  149463      0      0  3  0x40014200  bored         softclock
   166  245736      0      0  3  0x40014200                idle0
 75770  248918      0      0  3     0x14200  bored         smr
     1  443318      0      0  3        0x82  wait          init
     0       0     -1      0  3     0x10200  scheduler     swapper
ddb{1}> show all locks
Process 7301 (syz-executor.0) thread 0xffff800020b29080 (165198)
exclusive kernel_lock &kernel_lock r = 0 (0xffffffff823e9b78) 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  _rw_enter+0x355 sys/kern/kern_rwlock.c:256
#5  _rrw_enter+0x60 sys/kern/kern_rwlock.c:410
#6  VOP_LOCK+0x57 sys/kern/vfs_vops.c:602
#7  vn_lock+0x6e sys/kern/vfs_vnops.c:549
#8  vget+0x1c3 sys/kern/vfs_subr.c:672
#9  cache_lookup+0x300 sys/kern/vfs_cache.c:224
#10 ufs_lookup+0x1d7 sys/ufs/ufs/ufs_lookup.c:162
#11 VOP_LOOKUP+0x67 sys/kern/vfs_vops.c:90
#12 vfs_lookup+0x556 sys/kern/vfs_lookup.c:523
#13 namei+0x4b2 sys/kern/vfs_lookup.c:224
#14 domknodat+0xa1 sys/kern/vfs_syscalls.c:1405
#15 syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline]
#15 syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574
#16 Xsyscall+0x128
exclusive rrwlock inode r = 0 (0xfffffd807af592c0) 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
ddb{1}> show malloc
           Type InUse  MemUse  HighUse   Limit  Requests Type Lim Kern Lim
         devbuf  9527   6425K    6434K  78643K     10906        0        0
            pcb    26      9K      10K  78643K       389        0        0
         rtable   100      3K       4K  78643K       623        0        0
         ifaddr    61     13K      14K  78643K       218        0        0
       counters    39     33K      33K  78643K        39        0        0
       ioctlops     0      0K       4K  78643K      1489        0        0
            iov     0      0K      24K  78643K       110        0        0
          mount     1      1K       1K  78643K         1        0        0
         vnodes  1202     75K      76K  78643K      1662        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        15        0        0
         VM map     2      1K       1K  78643K         2        0        0
            sem    12      0K       0K  78643K       107        0        0
        dirhash    12      2K       2K  78643K        12        0        0
           ACPI  1808    196K     290K  78643K     12628        0        0
      file desc     6     17K      21K  78643K       832        0        0
          sigio     0      0K       0K  78643K        10        0        0
           proc    57     63K      71K  78643K       617        0        0
        subproc    64  65538K   67586K  78643K       346        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       115        0        0
       in_multi    33      2K       2K  78643K       162        0        0
    ether_multi     1      0K       0K  78643K         9        0        0
            mrt     0      0K       0K  78643K         7        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     0      0K       1K  78643K       313        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    89     21K      30K  78643K      3537        0        0
       UVM aobj    53      2K       2K  78643K        60        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        47        0        0
            NDP    15      0K       0K  78643K        68        0        0
           temp   176   2379K    2444K  78643K      5918        0        0
         kqueue     0      0K       0K  78643K         5        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       12    0        8     1     0     1     1     0     8    0
inpcbpl    280      474    0      467     1     0     1     1     0     8    0
plimitpl   152       50    0       42     1     0     1     1     0     8    0
plcache    128       20    0        0     1     0     1     1     0     8    0
rtentry    112      114    0       74     2     0     2     2     0     8    0
syncache   264        4    0        4     1     1     0     1     0     8    0
tcpqe       32        2    0        2     1     1     0     1     0     8    0
tcpcb      544      160    0      156     1     0     1     1     0     8    0
rttmr       72        1    0        1     1     0     1     1     0     8    1
nd6         48       20    0       16     1     0     1     1     0     8    0
ppxss      1128      26    0       26     4     3     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       36    0       24     1     0     1     1     0     8    0
pfstkey    112       36    0       24     1     0     1     1     0     8    0
pfstate    328       36    0       24     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      528    0      337    12     0    12    12     0     8    0
art_table   32      529    0      337     2     0     2     2     0     8    0
art_node    16      113    0       79     1     0     1     1     0     8    0
sysvmsgpl   40       13    0        4     1     0     1     1     0     8    0
semapl     112      105    0       95     1     0     1     1     0     8    0
shmpl      112       58    0        7     2     0     2     2     0     8    0
dirhash    1024      17    0        0     3     0     3     3     0     8    0
dino1pl    128     2758    0     1302    48     0    48    48     0     8    0
ffsino     272     2758    0     1302    98     0    98    98     0     8    0
nchpl      144     4121    0     2457    62     0    62    62     0     8    0
uvmvnodes   72     3015    0        0    55     0    55    55     0     8    0
vnodes     200     3015    0        0   159     0   159   159     0     8    0
namei      1024   12572    0    12570     2     1     1     1     0     8    0
percpumem   16       30    0        0     1     0     1     1     0     8    0
scsiplug    64        1    0        1     1     1     0     1     0     8    0
scxspl     192    11517    0    11517    12     9     3     6     0     8    3
sigapl     432     1008    0      992     2     0     2     2     0     8    0
futexpl     56     9150    0     9150     1     0     1     1     0     8    1
knotepl    112      362    0      343     1     0     1     1     0     8    0
kqueuepl   104      190    0      188     1     0     1     1     0     8    0
pipepl     112      656    0      637     2     1     1     1     0     8    0
fdescpl    488     1009    0      992     3     0     3     3     0     8    0
filepl     152     6131    0     6030     5     0     5     5     0     8    1
lockfpl    104      237    0      236     2     1     1     1     0     8    0
lockfspl    32      296    0      295     2     1     1     1     0     8    0
sessionpl  112       27    0       16     1     0     1     1     0     8    0
pgrppl      48       37    0       26     1     0     1     1     0     8    0
ucredpl     96     1238    0     1229     1     0     1     1     0     8    0
zombiepl   144      992    0      992     2     1     1     1     0     8    1
processpl  840     1025    0      992     4     0     4     4     0     8    0
procpl     600     2672    0     2625     4     0     4     4     0     8    0
srpgc       64       49    0       49     4     3     1     1     0     8    1
sosppl     128       13    0       13     4     4     0     1     0     8    0
sockpl     384      784    0      764     3     0     3     3     0     8    1
mcl64k     65536      8    0        0     1     0     1     1     0     8    0
mcl16k     16384      2    0        0     1     0     1     1     0     8    0
mcl12k     12288     15    0        0     2     0     2     2     0     8    0
mcl9k      9216       6    0        0     1     0     1     1     0     8    0
mcl8k      8192       3    0        0     1     0     1     1     0     8    0
mcl4k      4096      17    0        0     3     0     3     3     0     8    0
mcl2k2     2112       2    0        0     1     0     1     1     0     8    0
mcl2k      2048     125    0        0    15     1    14    15     0     8    0
mtagpl      80        1    0        0     1     0     1     1     0     8    0
mbufpl     256      194    0        0     9     1     8     8     0     8    0
bufpl      256     7442    0     1149   394     0   394   394     0     8    0
anonpl      16   108338    0   100778    68    26    42    52     0   125    5
amapchunkpl 152    5590    0     5501    15     7     8     9     0   158    4
amappl16   192     4636    0     4146    54    29    25    35     0     8    0
amappl15   184      209    0      205     1     0     1     1     0     8    0
amappl14   176      289    0      284     2     1     1     1     0     8    0
amappl13   168       27    0       24     1     0     1     1     0     8    0
amappl12   160      309    0      303     1     0     1     1     0     8    0
amappl11   152      100    0       85     1     0     1     1     0     8    0
amappl10   144      274    0      268     1     0     1     1     0     8    0
amappl9    136      639    0      636     1     0     1     1     0     8    0
amappl8    128      214    0      195     1     0     1     1     0     8    0
amappl7    120      136    0      128     1     0     1     1     0     8    0
amappl6    112      142    0      135     1     0     1     1     0     8    0
amappl5    104      422    0      406     1     0     1     1     0     8    0
amappl4     96      986    0      957     2     1     1     2     0     8    0
amappl3     88      399    0      392     1     0     1     1     0     8    0
amappl2     80     7556    0     7491     2     0     2     2     0     8    0
amappl1     72    31998    0    31530    26    16    10    20     0     8    0
amappl      72     2982    0     2944     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       59    0        7     1     0     1     1     0     8    0
uaddrrnd    24     1009    0      992     1     0     1     1     0     8    0
uaddrbest   32        2    0        0     1     0     1     1     0     8    0
uaddr       24     1009    0      992     1     0     1     1     0     8    0
vmmpekpl   168    11964    0    11942     3     1     2     2     0     8    0
vmmpepl    168   115580    0   113984   117    36    81    81     0   357   11
vmsppl     360     1008    0      992     2     0     2     2     0     8    0
pdppl      4096    2026    0     1984     6     0     6     6     0     8    0
pvpl        32   318890    0   307984   160    46   114   134     0   265   14
pmappl     224     1008    0      992     2     1     1     2     0     8    0
extentpl    40       39    0       25     1     0     1     1     0     8    0
phpool     112      551    0        6    16     0    16    16     0     8    0

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/03/25 19:45 openbsd 13a73e99f6f8 52a20ba4 .config console log report ci-openbsd-multicore
* Struck through repros no longer work on HEAD.