syzbot


uvm_fault: wsmux_do_ioctl (4)

Status: fixed on 2019/05/22 04:45
Reported-by: syzbot+f6c2ed7901eb4b970720@syzkaller.appspotmail.com
Fix commit: 78fe050fe549 A problem fixed in wskbd is also present in wsmux. Repeating the previous commit message:
First crash: 2040d, last: 2016d
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
openbsd uvm_fault: wsmux_do_ioctl 2 2198d 2236d 3/3 fixed on 2018/12/18 19:33
openbsd uvm_fault: wsmux_do_ioctl (3) C 2 2106d 2114d 0/3 closed as dup on 2019/02/10 09:16
openbsd uvm_fault: wsmux_do_ioctl (2) C 17 2124d 2128d 3/3 fixed on 2019/02/01 17:26

Sample crash report:
login: uvm_fault(0xfffffd806e813710, 0x28, 0, 2) -> e
kernel: page fault trap, code=0
Stopped at      wsmux_do_ioctl+0x736:   movq    %rax,0x10(%rdx,%r15,8)
ddb{0}> 
ddb{0}> set $lines = 0
ddb{0}> set $maxwidth = 0
ddb{0}> show panic
kernel page fault
uvm_fault(0xfffffd806e813710, 0x28, 0, 2) -> e
wsmux_do_ioctl(ffff800000992a00,80185760,ffff800020bc9c50,f,ffff800020b84718) at wsmux_do_ioctl+0x736 sys/dev/wscons/wsmux.c:426
end trace frame: 0xffff800020bc9b30, count: 0
ddb{0}> trace
wsmux_do_ioctl(ffff800000992a00,80185760,ffff800020bc9c50,f,ffff800020b84718) at wsmux_do_ioctl+0x736 sys/dev/wscons/wsmux.c:426
VOP_IOCTL(fffffd806dd63e18,80185760,ffff800020bc9c50,f,fffffd807f7c6a20,ffff800020b84718) at VOP_IOCTL+0x88 sys/kern/vfs_vops.c:290
vn_ioctl(fffffd807060a260,80185760,ffff800020bc9c50,ffff800020b84718) at vn_ioctl+0xb6 sys/kern/vfs_vnops.c:512
sys_ioctl(ffff800020b84718,ffff800020bc9d78,ffff800020bc9de0) at sys_ioctl+0x5b8
syscall(ffff800020bc9e50) at syscall+0x552 mi_syscall sys/sys/syscall_mi.h:99 [inline]
syscall(ffff800020bc9e50) at syscall+0x552 sys/arch/amd64/amd64/trap.c:574
Xsyscall(6,0,d6111b8e0f0,0,d6111b8e0d0,d6111b8e0c8) at Xsyscall+0x128
end of kernel
end trace frame: 0xd6345628200, count: -6
ddb{0}> show registers
rdi                             0xff
rsi                              0x2
rbp               0xffff800020bc9a80
rbx                              0x2
rdx                                0
rcx                              0x7
rax                              0x3
r8                0xffffffff81979171    wsmux_do_ioctl+0x201
r9                               0x7
r10               0x2fb0b98c8f01f8f9
r11               0x2fb0b98c8f01f8f9
r12               0xffff800000992a50
r13                                0
r14               0xffff800020bc9c50
r15                              0x3
rip               0xffffffff819796a6    wsmux_do_ioctl+0x736
cs                               0x8
rflags                       0x10297    __ALIGN_SIZE+0xf297
rsp               0xffff800020bc9a00
ss                              0x10
wsmux_do_ioctl+0x736:   movq    %rax,0x10(%rdx,%r15,8)
ddb{0}> show proc
PROC (syz-executor6354) pid=32589 stat=onproc
    flags process=2<EXEC> proc=4000000<THREAD>
    pri=50, usrpri=50, nice=20
    forw=0xffffffffffffffff, list=0xffff800020b852d0,0xffffffff8234cb80
    process=0xffff800020b3a9e8 user=0xffff800020bc4000, vmspace=0xfffffd806e813710
    estcpu=0, cpticks=1, pctcpu=0.0
    user=0, sys=1, intr=0
ddb{0}> ps
   PID     TID   PPID    UID  S       FLAGS  WAIT          COMMAND
 24508  215682  35806      0  2         0x2                syz-executor6354
 24508  408664  35806      0  2   0x4000002                syz-executor6354
*24508   32589  35806      0  7   0x4000002                syz-executor6354
 35806  298500   9999      0  3    0x10008a  pause         ksh
  9999   69146  23351      0  3        0x92  select        sshd
 18165   53610      1      0  3    0x100083  ttyin         getty
 23351  224816      1      0  3        0x80  select        sshd
 68193  484510  13284     74  3    0x100092  bpf           pflogd
 13284  379448      1      0  3        0x80  netio         pflogd
 77699  160857  82947     73  7    0x100090                syslogd
 82947  330506      1      0  3    0x100082  netio         syslogd
 55070  440467      1     77  3    0x100090  poll          dhclient
 26035  217244      1      0  3        0x80  poll          dhclient
 65545  381487      0      0  3     0x14200  pgzero        zerothread
 79270  488104      0      0  3     0x14200  aiodoned      aiodoned
 36420  109677      0      0  3     0x14200  syncer        update
 85873  393036      0      0  3     0x14200  cleaner       cleaner
 89703  498244      0      0  3     0x14200  reaper        reaper
 66249  289612      0      0  3     0x14200  pgdaemon      pagedaemon
 67740  282609      0      0  3     0x14200  bored         crynlk
 96724   57019      0      0  3     0x14200  bored         crypto
  4327  252697      0      0  3  0x40014200  acpi0         acpi0
 87185   18435      0      0  3  0x40014200                idle1
 55671  201811      0      0  3     0x14200  bored         softnet
 14497   34778      0      0  3     0x14200  bored         systqmp
 46546   36674      0      0  3     0x14200  bored         systq
 65205  399964      0      0  3  0x40014200  bored         softclock
 88544  419445      0      0  3  0x40014200                idle0
 36065    4001      0      0  3     0x14200  bored         smr
     1  378194      0      0  3        0x82  wait          init
     0       0     -1      0  3     0x10200  scheduler     swapper
ddb{0}> show all locks
Process 24508 (syz-executor6354) thread 0xffff800020b84718 (32589)
exclusive kernel_lock &kernel_lock r = 1 (0xffffffff8236ed40)
#0  witness_lock+0x52e sys/kern/subr_witness.c:1161
#1  syscall+0x43a mi_syscall sys/sys/syscall_mi.h:91 [inline]
#1  syscall+0x43a sys/arch/amd64/amd64/trap.c:574
#2  Xsyscall+0x128
ddb{0}> show malloc
           Type InUse  MemUse  HighUse   Limit  Requests Type Lim Kern Lim
         devbuf  9451   6382K    6390K  78643K     10540        0        0
            pcb    25      9K       9K  78643K        57        0        0
         rtable    61      2K       2K  78643K       125        0        0
         ifaddr    25      7K       7K  78643K        26        0        0
       counters    39     33K      33K  78643K        39        0        0
       ioctlops     0      0K       4K  78643K      1467        0        0
          mount     1      1K       1K  78643K         1        0        0
         vnodes  1176     74K      74K  78643K      1181        0        0
      UFS quota     1     32K      32K  78643K         1        0        0
      UFS mount     5     36K      36K  78643K         5        0        0
            shm     2      1K       1K  78643K         2        0        0
         VM map     2      1K       1K  78643K         2        0        0
            sem     2      0K       0K  78643K         2        0        0
        dirhash    12      2K       2K  78643K        12        0        0
           ACPI  1808    196K     290K  78643K     12628        0        0
      file desc     1      0K       0K  78643K         1        0        0
           proc    52     50K      58K  78643K       279        0        0
    NFS srvsock     1      0K       0K  78643K         1        0        0
     NFS daemon     1     16K      16K  78643K         1        0        0
       in_multi    11      0K       0K  78643K        11        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    18     79K      79K  78643K        18        0        0
           exec     0      0K       1K  78643K       179        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    56      3K       3K  78643K       767        0        0
       UVM aobj     2      2K       2K  78643K         2        0        0
        memdesc     1      4K       4K  78643K         1        0        0
    crypto data     1      1K       1K  78643K         1        0        0
            NDP     4      0K       0K  78643K         4        0        0
           temp    39   2712K    2776K  78643K      1985        0        0
      SYN cache     2     16K      16K  78643K         2        0        0
ddb{0}> show all pools
Name      Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle
arp         64        2    0        0     1     0     1     1     0     8    0
inpcbpl    280       29    0       23     1     0     1     1     0     8    0
plimitpl   152       14    0        8     1     0     1     1     0     8    0
plcache    128       20    0        0     1     0     1     1     0     8    0
rtentry    112       23    0        1     1     0     1     1     0     8    0
syncache   264        5    0        5     1     0     1     1     0     8    1
tcpcb      544        8    0        5     1     0     1     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        8    0        0     1     0     1     1     0     8    0
pfstkey    112        8    0        0     1     0     1     1     0     8    0
pfstate    328        8    0        0     1     0     1     1     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       96    0        0     6     0     6     6     0     8    0
art_table   32       97    0        0     1     0     1     1     0     8    0
art_node    16       22    0        2     1     0     1     1     0     8    0
dirhash    1024      17    0        0     3     0     3     3     0     8    0
dino1pl    128     1396    0       18    45     0    45    45     0     8    0
ffsino     272     1396    0       18    92     0    92    92     0     8    0
nchpl      144     1568    0       32    57     0    57    57     0     8    0
uvmvnodes   72     1406    0        0    26     0    26    26     0     8    0
vnodes     200     1406    0        0    74     0    74    74     0     8    0
namei      1024    3560    0     3560     2     1     1     1     0     8    1
percpumem   16       30    0        0     1     0     1     1     0     8    0
scxspl     192     2321    0     2321     2     1     1     2     0     8    1
sigapl     432      205    0      193     2     0     2     2     0     8    0
futexpl     56        1    0        1     1     0     1     1     0     8    1
knotepl    112        5    0        0     1     0     1     1     0     8    0
kqueuepl   104        1    0        0     1     0     1     1     0     8    0
pipepl     112      134    0      127     2     1     1     1     0     8    0
fdescpl    488      206    0      193     3     0     3     3     0     8    0
filepl     152      962    0      914     2     0     2     2     0     8    0
lockfpl    104        8    0        8     2     1     1     1     0     8    1
lockfspl    48        4    0        4     2     1     1     1     0     8    1
sessionpl  112       18    0        9     1     0     1     1     0     8    0
pgrppl      48       18    0        9     1     0     1     1     0     8    0
ucredpl     96       52    0       43     1     0     1     1     0     8    0
zombiepl   144      193    0      193     2     1     1     1     0     8    1
processpl  840      221    0      193     4     0     4     4     0     8    0
procpl     600      223    0      193     3     0     3     3     0     8    0
sockpl     384       73    0       55     2     0     2     2     0     8    0
mcl4k      4096       4    0        0     1     0     1     1     0     8    0
mcl2k      2048      72    0        0     9     0     9     9     0     8    0
mtagpl      80        1    0        0     1     0     1     1     0     8    0
mbufpl     256       98    0        0     6     0     6     6     0     8    0
bufpl      256     2138    0      263   118     0   118   118     0     8    0
anonpl      16    19293    0    18043     8     2     6     7     0   125    0
amapchunkpl 152     556    0      515     2     0     2     2     0   158    0
amappl16   192       82    0       77     1     0     1     1     0     8    0
amappl14   176       37    0       34     1     0     1     1     0     8    0
amappl12   160        8    0        8     1     0     1     1     0     8    1
amappl11   152       29    0       14     1     0     1     1     0     8    0
amappl10   144       60    0       58     1     0     1     1     0     8    0
amappl9    136      422    0      421     1     0     1     1     0     8    0
amappl8    128      101    0       96     1     0     1     1     0     8    0
amappl7    120       20    0       18     1     0     1     1     0     8    0
amappl6    112       46    0       42     1     0     1     1     0     8    0
amappl5    104      120    0      107     1     0     1     1     0     8    0
amappl4     96      437    0      414     1     0     1     1     0     8    0
amappl3     88      104    0       98     1     0     1     1     0     8    0
amappl2     80      652    0      606     1     0     1     1     0     8    0
amappl1     72    13333    0    12898    16     6    10    16     0     8    0
amappl      80      428    0      405     1     0     1     1     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
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        1    0        0     1     0     1     1     0     8    0
uaddrrnd    24      206    0      193     1     0     1     1     0     8    0
uaddrbest   32        2    0        0     1     0     1     1     0     8    0
uaddr       24      206    0      193     1     0     1     1     0     8    0
vmmpekpl   168     5583    0     5562     2     0     2     2     0     8    1
vmmpepl    168    27254    0    26445    50    14    36    50     0   357    0
vmsppl     360      205    0      193     2     0     2     2     0     8    0
pdppl      4096     420    0      386     6     0     6     6     0     8    0
pvpl        32    80248    0    77231    32     4    28    28     0   265    3
pmappl     232      205    0      193     1     0     1     1     0     8    0
extentpl    40       41    0       26     1     0     1     1     0     8    0
phpool     112      249    0        4     7     0     7     7     0     8    0
ddb{0}> 

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/05/19 18:53 openbsd 21f0e712e745 5a4461b0 .config console log report syz C ci-openbsd-multicore
2019/05/19 18:35 openbsd 21f0e712e745 5a4461b0 .config console log report ci-openbsd-multicore
2019/04/25 11:23 openbsd a9a1999af47b 8e3c52b1 .config console log report ci-openbsd-main
* Struck through repros no longer work on HEAD.