syzbot


uvm_fault: rtable_satoplen

Status: fixed on 2019/03/22 16:06
Reported-by: syzbot+8e29400e09a351f17884@syzkaller.appspotmail.com
Fix commit: fab4809e7ec2 Make sure pointer is within bounds before dereferencing it.
First crash: 2049d, last: 2033d
Duplicate bugs (1)
duplicates (1):
Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
kernel: page fault trap, code=0 (2) 2 2040d 2040d 0/3 closed as dup on 2019/03/15 22:11
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
openbsd uvm_fault: rtable_satoplen (2) syz 101 2023d 2032d 3/3 fixed on 2019/04/04 06:33
openbsd uvm_fault: rtable_satoplen (3) syz 237 1817d 1860d 0/3 closed as invalid on 2020/02/21 15:01

Sample crash report:
uvm_fault(0xffffffff8233ef50, 0xffff8000019bc002, 0, 1) -> e
kernel: page fault trap, code=0
Stopped at      rtable_satoplen+0x150:  movzbl  0xffffffffffffffff(%r13),%r12d
ddb{0}> 
ddb{0}> set $lines = 0
ddb{0}> set $maxwidth = 0
ddb{0}> show panic
kernel page fault
uvm_fault(0xffffffff8233ef50, 0xffff8000019bc002, 0, 1) -> e
rtable_satoplen(21,ffff8000019bbf59) at rtable_satoplen+0x150 sys/net/rtable.c:888
end trace frame: 0xffff800020c46c50, count: 0
ddb{0}> trace
rtable_satoplen(21,ffff8000019bbf59) at rtable_satoplen+0x150 sys/net/rtable.c:888
rtable_lookup(0,ffff8000019bbf09,ffff8000019bbf59,ffff8000019bbf11,21) at rtable_lookup+0xfd sys/net/rtable.c:391
rtm_output(ffff8000019bbf00,ffff800020c46d40,ffff800020c46d48,21,0) at rtm_output+0x10c sys/net/rtsock.c:1122
route_output(fffffd807d7c7100,fffffd806b876310,0,0) at route_output+0x79b sys/net/rtsock.c:806
route_usrreq(fffffd806b876310,9,fffffd807d7c7100,0,0,ffff800020b292d8) at route_usrreq+0x35d sys/net/rtsock.c:271
sosend(fffffd806b876310,0,ffff800020c47008,0,0,0) at sosend+0x6eb sys/kern/uipc_socket.c:513
sendit(ffff800020b292d8,3,ffff800020c470c8,0,ffff800020c47190) at sendit+0x590 sys/kern/uipc_syscalls.c:662
sys_sendto(ffff800020b292d8,ffff800020c471a8,ffff800020c47190) at sys_sendto+0x92
syscall(ffff800020c47240) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline]
syscall(ffff800020c47240) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574
Xsyscall(6,0,ffffffffffffffd8,0,6,87c7d635010) at Xsyscall+0x128
end of kernel
end trace frame: 0x87ea9c222a0, count: -10
ddb{0}> show registers
rdi                                0
rsi                             0xaa
rbp               0xffff800020c46bb0
rbx               0xffffffffffffff5a
rdx               0xffff8000019bbf5d
rcx               0xffff8000019bc003
rax               0xffff8000019bc003
r8                              0x21
r9                               0x1
r10                              0x4
r11               0xf44328aa6f578d8a
r12                                0
r13               0xffff8000019bc003
r14               0xffffffff82188408    mplsdomain
r15                              0x4
rip               0xffffffff812ab6d0    rtable_satoplen+0x150
cs                               0x8
rflags                       0x10287    __ALIGN_SIZE+0xf287
rsp               0xffff800020c46b60
ss                              0x10
rtable_satoplen+0x150:  movzbl  0xffffffffffffffff(%r13),%r12d
ddb{0}> show proc
PROC (syz-executor.1) pid=308849 stat=onproc
    flags process=0 proc=4000000<THREAD>
    pri=65, usrpri=65, nice=20
    forw=0xffffffffffffffff, list=0xffff800020b29788,0xffffffff823ddcc0
    process=0xffff800020b7c018 user=0xffff800020c42000, vmspace=0xfffffd807f00b9d8
    estcpu=31, cpticks=0, pctcpu=0.0
    user=0, sys=0, intr=0
ddb{0}> ps
   PID     TID   PPID    UID  S       FLAGS  WAIT          COMMAND
 42623  246740  51441      0  2           0                syz-executor.1
*42623  308849  51441      0  7   0x4000000                syz-executor.1
 58603   57691  51249      0  2           0                syz-executor.0
 58603  474856  51249      0  3   0x4000080  msgwait       syz-executor.0
 18417  115145      1      0  3    0x100083  ttyin         getty
 77460  466251      0      0  3     0x14200  bored         sosplice
 51441  224734   6380      0  3        0x82  nanosleep     syz-executor.1
 51249   71979   6380      0  3        0x82  nanosleep     syz-executor.0
  6380  204357  98680      0  3        0x82  thrsleep      syz-fuzzer
  6380   96541  98680      0  3   0x4000082  thrsleep      syz-fuzzer
  6380   49350  98680      0  3   0x4000082  thrsleep      syz-fuzzer
  6380  411882  98680      0  3   0x4000082  kqread        syz-fuzzer
  6380  193544  98680      0  3   0x4000082  thrsleep      syz-fuzzer
  6380  377417  98680      0  3   0x4000082  thrsleep      syz-fuzzer
  6380  381129  98680      0  3   0x4000082  thrsleep      syz-fuzzer
  6380  445114  98680      0  3   0x4000082  thrsleep      syz-fuzzer
  6380  341268  98680      0  3   0x4000082  thrsleep      syz-fuzzer
  6380  155087  98680      0  3   0x4000082  thrsleep      syz-fuzzer
  6380  496500  98680      0  3   0x4000082  thrsleep      syz-fuzzer
  6380  283303  98680      0  3   0x4000082  thrsleep      syz-fuzzer
 98680  508528   4013      0  3    0x10008a  pause         ksh
  4013  386042  93551      0  3        0x92  select        sshd
 93551  246008      1      0  3        0x80  select        sshd
 46010  365321  48680     74  3    0x100092  bpf           pflogd
 48680  464542      1      0  3        0x80  netio         pflogd
 23458  509322   5851     73  7    0x100090                syslogd
  5851  414659      1      0  3    0x100082  netio         syslogd
 24321  486696      1     77  3    0x100090  poll          dhclient
 70698  129519      1      0  3        0x80  poll          dhclient
  2928  356016      0      0  2     0x14200                zerothread
 97963  333752      0      0  3     0x14200  aiodoned      aiodoned
 36561  160281      0      0  3     0x14200  syncer        update
 13935  403707      0      0  3     0x14200  cleaner       cleaner
  7403  450437      0      0  3     0x14200  reaper        reaper
 17018   81218      0      0  3     0x14200  pgdaemon      pagedaemon
 66344  232614      0      0  3     0x14200  bored         crynlk
 57692   67380      0      0  3     0x14200  bored         crypto
 80163  420715      0      0  3  0x40014200  acpi0         acpi0
 42754   58019      0      0  3  0x40014200                idle1
 82416  441974      0      0  3     0x14200  bored         softnet
 59779  435008      0      0  3     0x14200  bored         systqmp
 43835   17329      0      0  3     0x14200  bored         systq
 68658  445737      0      0  3  0x40014200  bored         softclock
 74045   77969      0      0  3  0x40014200                idle0
  9225  389335      0      0  3     0x14200  bored         smr
     1  460641      0      0  3        0x82  wait          init
     0       0     -1      0  3     0x10200  scheduler     swapper
ddb{0}> show all locks
Process 42623 (syz-executor.1) thread 0xffff800020b292d8 (308849)
exclusive kernel_lock &kernel_lock r = 1 (0xffffffff823d1188) locked @ /syzkaller/managers/multicore/kernel/sys/arch/amd64/amd64/trap.c:161
#0  witness_lock+0x594 sys/kern/subr_witness.c:1201
#1  solock+0x7e sys/kern/uipc_socket2.c:292
#2  sosend+0x586 sys/kern/uipc_socket.c:501
#3  sendit+0x590 sys/kern/uipc_syscalls.c:662
#4  sys_sendto+0x92
#5  syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline]
#5  syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574
#6  Xsyscall+0x128
ddb{0}> show malloc
           Type InUse  MemUse  HighUse   Limit  Requests Type Lim Kern Lim
         devbuf  9529   6416K    6419K  78643K     10732        0        0
            pcb    27      9K      11K  78643K       275        0        0
         rtable   101      4K       4K  78643K       253        0        0
         ifaddr    62     13K      13K  78643K        95        0        0
       counters    39     33K      33K  78643K        39        0        0
       ioctlops     0      0K       4K  78643K      1474        0        0
            iov     0      0K      16K  78643K        51        0        0
          mount     1      1K       1K  78643K         1        0        0
         vnodes  1204     75K      76K  78643K      1436        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         9        0        0
         VM map     2      1K       1K  78643K         2        0        0
            sem    12      0K       1K  78643K        87        0        0
        dirhash    12      2K       2K  78643K        12        0        0
           ACPI  1808    196K     290K  78643K     12628        0        0
      file desc     6     17K      21K  78643K       395        0        0
          sigio     0      0K       0K  78643K         6        0        0
           proc    54     51K      71K  78643K       404        0        0
        subproc    64  65538K   67586K  78643K        70        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        57        0        0
       in_multi    33      2K       2K  78643K        42        0        0
    ether_multi     1      0K       0K  78643K         2        0        0
    ISOFS mount     1     32K      32K  78643K         1        0        0
  MSDOSFS mount     1     16K      16K  78643K         1        0        0
           ttys    78    344K     344K  78643K        78        0        0
           exec     0      0K       1K  78643K       225        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    97     21K      21K  78643K      2122        0        0
       UVM aobj    33      2K       2K  78643K        38        0        0
        memdesc     1      4K       4K  78643K         1        0        0
    crypto data     1      1K       1K  78643K         1        0        0
    ip6_options     0      0K       1K  78643K        30        0        0
            NDP    13      0K       0K  78643K        25        0        0
           temp   168   2373K    2439K  78643K      4178        0        0
         kqueue     0      0K       0K  78643K         4        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        4    0        0     1     0     1     1     0     8    0
inpcbpl    280      242    0      235     1     0     1     1     0     8    0
plimitpl   152       29    0       21     1     0     1     1     0     8    0
plcache    128       20    0        0     1     0     1     1     0     8    0
rtentry    112       41    0        1     2     0     2     2     0     8    0
syncache   264        4    0        4     1     1     0     1     0     8    0
tcpcb      544       93    0       89     1     0     1     1     0     8    0
nd6         48        4    0        0     1     0     1     1     0     8    0
ppxss      1128       6    0        6     2     2     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       17    0        4     1     0     1     1     0     8    0
pfstkey    112       17    0        4     1     0     1     1     0     8    0
pfstate    328       17    0        4     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      185    0        0    12     0    12    12     0     8    0
art_table   32      186    0        0     2     0     2     2     0     8    0
art_node    16       40    0        6     1     0     1     1     0     8    0
sysvmsgpl   40       11    0        4     1     0     1     1     0     8    0
semupl     112        1    0        1     1     1     0     1     0     8    0
semapl     112       85    0       75     1     0     1     1     0     8    0
shmpl      112       36    0        5     1     0     1     1     0     8    0
dirhash    1024      17    0        0     3     0     3     3     0     8    0
dino1pl    128     2184    0      766    46     0    46    46     0     8    0
ffsino     272     2184    0      766    95     0    95    95     0     8    0
nchpl      144     2999    0     1370    61     0    61    61     0     8    0
uvmvnodes   72     2267    0        0    42     0    42    42     0     8    0
vnodes     200     2267    0        0   120     0   120   120     0     8    0
namei      1024    8300    0     8300     1     0     1     1     0     8    1
percpumem   16       30    0        0     1     0     1     1     0     8    0
scxspl     192     7465    0     7465     7     6     1     5     0     8    1
sigapl     432      592    0      576     2     0     2     2     0     8    0
futexpl     56     5018    0     5018     1     0     1     1     0     8    1
knotepl    112      178    0      151     2     1     1     2     0     8    0
kqueuepl   104      144    0      142     1     0     1     1     0     8    0
pipepl     112      372    0      353     2     1     1     2     0     8    0
fdescpl    488      593    0      576     3     0     3     3     0     8    0
filepl     152     3482    0     3381     6     1     5     6     0     8    1
lockfpl    104      129    0      129     2     1     1     1     0     8    1
lockfspl    32      156    0      156     2     1     1     1     0     8    1
sessionpl  112       19    0        8     1     0     1     1     0     8    0
pgrppl      48       25    0       14     1     0     1     1     0     8    0
ucredpl     96      685    0      676     1     0     1     1     0     8    0
zombiepl   144      576    0      576     1     0     1     1     0     8    1
processpl  840      609    0      576     4     0     4     4     0     8    0
procpl     600     1457    0     1411     4     0     4     4     0     8    0
sosppl     128        4    0        4     2     2     0     1     0     8    0
sockpl     384      470    0      449     4     1     3     4     0     8    0
mcl64k     65536      7    0        0     1     0     1     1     0     8    0
mcl16k     16384      2    0        0     1     0     1     1     0     8    0
mcl12k     12288      6    0        0     1     0     1     1     0     8    0
mcl9k      9216       2    0        0     1     0     1     1     0     8    0
mcl8k      8192       2    0        0     1     0     1     1     0     8    0
mcl4k      4096       5    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      141    0        0     8     0     8     8     0     8    0
bufpl      256     6059    0     1045   314     0   314   314     0     8    0
anonpl      16    54852    0    46034    39     2    37    37     0   125    0
amapchunkpl 152    2863    0     2751     7     2     5     6     0   158    0
amappl16   192     2205    0     1750    25     1    24    24     0     8    1
amappl15   184      199    0      197     1     0     1     1     0     8    0
amappl14   176       29    0       23     1     0     1     1     0     8    0
amappl13   168       26    0       23     1     0     1     1     0     8    0
amappl12   160       22    0       19     1     0     1     1     0     8    0
amappl11   152      397    0      382     1     0     1     1     0     8    0
amappl10   144       71    0       65     1     0     1     1     0     8    0
amappl9    136      545    0      541     1     0     1     1     0     8    0
amappl8    128      135    0      119     1     0     1     1     0     8    0
amappl7    120       26    0       23     1     0     1     1     0     8    0
amappl6    112       56    0       48     1     0     1     1     0     8    0
amappl5    104      314    0      299     1     0     1     1     0     8    0
amappl4     96      325    0      300     2     1     1     2     0     8    0
amappl3     88      145    0      140     1     0     1     1     0     8    0
amappl2     80     4496    0     4429     2     0     2     2     0     8    0
amappl1     72    22135    0    21672    24    14    10    19     0     8    0
amappl      72     1691    0     1649     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       37    0        5     1     0     1     1     0     8    0
uaddrrnd    24      593    0      576     1     0     1     1     0     8    0
uaddrbest   32        2    0        0     1     0     1     1     0     8    0
uaddr       24      593    0      576     1     0     1     1     0     8    0
vmmpekpl   168     8980    0     8957     2     0     2     2     0     8    0
vmmpepl    168    68499    0    66939    86    16    70    75     0   357    2
vmsppl     360      592    0      576     2     0     2     2     0     8    0
pdppl      4096    1194    0     1152     6     0     6     6     0     8    0
pvpl        32   192995    0   180938   110     6   104   104     0   265    6
pmappl     224      592    0      576     2     1     1     2     0     8    0
extentpl    40       39    0       25     1     0     1     1     0     8    0
phpool     112      464    0        3    14     0    14    14     0     8    0

Crashes (158):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/03/22 09:51 openbsd 31520b764003 dce6e62f .config console log report ci-openbsd-multicore
2019/03/22 08:09 openbsd 31520b764003 dce6e62f .config console log report ci-openbsd-main
2019/03/22 06:23 openbsd 31520b764003 dce6e62f .config console log report ci-openbsd-multicore
2019/03/22 03:39 openbsd 31520b764003 dce6e62f .config console log report ci-openbsd-multicore
2019/03/22 02:05 openbsd 31520b764003 dce6e62f .config console log report ci-openbsd-multicore
2019/03/21 23:55 openbsd 31520b764003 dce6e62f .config console log report ci-openbsd-main
2019/03/21 19:11 openbsd f475d39eb98b f6094a8c .config console log report ci-openbsd-multicore
2019/03/21 17:52 openbsd f475d39eb98b f6094a8c .config console log report ci-openbsd-main
2019/03/21 13:17 openbsd f475d39eb98b f6094a8c .config console log report ci-openbsd-multicore
2019/03/21 09:51 openbsd db552f66a6b6 427ea487 .config console log report ci-openbsd-main
2019/03/21 08:36 openbsd db552f66a6b6 427ea487 .config console log report ci-openbsd-main
2019/03/21 07:08 openbsd db552f66a6b6 427ea487 .config console log report ci-openbsd-multicore
2019/03/21 05:54 openbsd db552f66a6b6 427ea487 .config console log report ci-openbsd-main
2019/03/21 01:25 openbsd db552f66a6b6 427ea487 .config console log report ci-openbsd-multicore
2019/03/20 22:16 openbsd 180e3f4c9de8 142c38ee .config console log report ci-openbsd-main
2019/03/20 15:58 openbsd 180e3f4c9de8 142c38ee .config console log report ci-openbsd-main
2019/03/20 10:13 openbsd 6a543b343b5b 2458c1c6 .config console log report ci-openbsd-multicore
2019/03/20 03:44 openbsd 6a543b343b5b 2458c1c6 .config console log report ci-openbsd-main
2019/03/20 02:18 openbsd 6a543b343b5b 2458c1c6 .config console log report ci-openbsd-multicore
2019/03/19 23:12 openbsd a5f4ee4e3f8f e4549234 .config console log report ci-openbsd-main
2019/03/19 21:57 openbsd a5f4ee4e3f8f e4549234 .config console log report ci-openbsd-main
2019/03/19 17:38 openbsd a5f4ee4e3f8f e4549234 .config console log report ci-openbsd-main
2019/03/19 14:27 openbsd a5f4ee4e3f8f e4549234 .config console log report ci-openbsd-main
2019/03/19 08:52 openbsd e6d0a5bd63d6 46264c32 .config console log report ci-openbsd-main
2019/03/19 06:55 openbsd e6d0a5bd63d6 46264c32 .config console log report ci-openbsd-main
2019/03/19 01:45 openbsd e6d0a5bd63d6 46264c32 .config console log report ci-openbsd-multicore
2019/03/18 21:59 openbsd 5f6e3232931a 4656beca .config console log report ci-openbsd-main
2019/03/18 20:27 openbsd 5f6e3232931a 4656beca .config console log report ci-openbsd-main
2019/03/18 17:21 openbsd 5f6e3232931a 4656beca .config console log report ci-openbsd-main
2019/03/18 15:53 openbsd 5f6e3232931a 4656beca .config console log report ci-openbsd-main
2019/03/18 13:09 openbsd 5f6e3232931a 4656beca .config console log report ci-openbsd-main
2019/03/18 10:33 openbsd 990bad0aa091 f8757044 .config console log report ci-openbsd-main
2019/03/18 06:33 openbsd 990bad0aa091 f8757044 .config console log report ci-openbsd-main
2019/03/18 02:33 openbsd 990bad0aa091 f8757044 .config console log report ci-openbsd-multicore
2019/03/18 01:17 openbsd 990bad0aa091 f8757044 .config console log report ci-openbsd-main
2019/03/17 21:19 openbsd 0dd6b0da8efb ba18afea .config console log report ci-openbsd-main
2019/03/17 20:08 openbsd 0dd6b0da8efb ba18afea .config console log report ci-openbsd-multicore
2019/03/17 18:30 openbsd 0dd6b0da8efb ba18afea .config console log report ci-openbsd-multicore
2019/03/17 16:07 openbsd 0dd6b0da8efb ba18afea .config console log report ci-openbsd-multicore
2019/03/17 14:34 openbsd 0dd6b0da8efb ba18afea .config console log report ci-openbsd-main
2019/03/17 07:48 openbsd b3e6a3251dfa bab43553 .config console log report ci-openbsd-main
2019/03/16 23:16 openbsd 2821cfa0fbbc bab43553 .config console log report ci-openbsd-multicore
2019/03/16 18:17 openbsd 2821cfa0fbbc bab43553 .config console log report ci-openbsd-multicore
2019/03/16 14:48 openbsd 2821cfa0fbbc bab43553 .config console log report ci-openbsd-main
2019/03/16 13:34 openbsd 2821cfa0fbbc bab43553 .config console log report ci-openbsd-multicore
2019/03/16 09:35 openbsd fe57de0c7337 bab43553 .config console log report ci-openbsd-multicore
2019/03/15 07:05 openbsd fee69528d2cd d72db19b .config console log report ci-openbsd-setuid
2019/03/05 12:28 openbsd da8fceb276ba 3419571c .config console log report ci-openbsd-main
* Struck through repros no longer work on HEAD.