syzbot


uvm_fault: rtm_report

Status: fixed on 2019/05/12 05:56
Reported-by: syzbot+86344a9e31c27aa6f15b@syzkaller.appspotmail.com
Fix commit: 1b18c0494f67 Make rt_mpls_set() be more strict in what it accepts. Also ensure that the RTF_MPLS can't be toggled without rt_mpls_set() being called. While RTF_MPLS is part of RTF_FMASK it should be excluded from the flags and mask when they are applied to the route since toggling it requires a call to rt_mpls_set(). OK bluhm@
First crash: 1826d, last: 1826d

Sample crash report:
login: uvm_fault(0xfffffd803f014d68, 0x0, 0, 1) -> e
kernel: page fault trap, code=0
Stopped at      rtm_report+0xe4:        movl    0(%rax),%ecx
ddb> 
ddb> set $lines = 0
ddb> set $maxwidth = 0
ddb> show panic
kernel page fault
uvm_fault(0xfffffd803f014d68, 0x0, 0, 1) -> e
rtm_report(fffffd8036fe73f0,3,35d33fc7,0) at rtm_report+0xe4 sys/net/rtsock.c:631
end trace frame: 0xffff8000220ea210, count: 0
ddb> trace
rtm_report(fffffd8036fe73f0,3,35d33fc7,0) at rtm_report+0xe4 sys/net/rtsock.c:631
route_output(fffffd8037054700,fffffd8036445008,0,0) at route_output+0x88a sys/net/rtsock.c:819
route_usrreq(fffffd8036445008,9,fffffd8037054700,0,0,ffff8000ffff5528) at route_usrreq+0x363 sys/net/rtsock.c:271
sosend(fffffd8036445008,0,ffff8000220ea380,0,0,80) at sosend+0x660 sys/kern/uipc_socket.c:513
sendit(ffff8000ffff5528,3,ffff8000220ea460,0,ffff8000220ea570) at sendit+0x53c sys/kern/uipc_syscalls.c:662
sys_sendto(ffff8000ffff5528,ffff8000220ea508,ffff8000220ea570) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:527
syscall(ffff8000220ea5e0) at syscall+0x511
Xsyscall(6,0,7f7fffff7458,0,1,3) at Xsyscall+0x128
end of kernel
end trace frame: 0x7f7fffff7440, count: -8
ddb> show registers
rdi                                0
rsi                         0x100000    acpi_pdirpa+0xebe68
rbp               0xffff8000220ea0d0
rbx                         0x100000    acpi_pdirpa+0xebe68
rdx                              0x2
rcx                              0x1
rax                                0
r8                              0xa0
r9                               0x1
r10               0x929953d17fcde89c
r11               0xde937267ab23acdf
r12               0xfffffd8036fe73f0
r13                       0x35d33fc7
r14                         0x100403    acpi_pdirpa+0xec26b
r15                             0xb1
rip               0xffffffff817ae544    rtm_report+0xe4
cs                               0x8
rflags                       0x10246    __ALIGN_SIZE+0xf246
rsp               0xffff8000220e9f40
ss                              0x10
rtm_report+0xe4:        movl    0(%rax),%ecx
ddb> show proc
PROC (syz-executor8108) pid=311943 stat=onproc
    flags process=2<EXEC> proc=0
    pri=50, usrpri=50, nice=20
    forw=0xffffffffffffffff, list=0xffff8000ffff4970,0xffffffff822ba438
    process=0xffff8000220b2360 user=0xffff8000220e5000, vmspace=0xfffffd803f014d68
    estcpu=0, cpticks=1, pctcpu=0.0
    user=0, sys=1, intr=0
ddb> ps
   PID     TID   PPID    UID  S       FLAGS  WAIT          COMMAND
* 5680  311943  31079      0  7         0x2                syz-executor8108
 31079  425103  37785      0  3    0x10008a  pause         ksh
 37785  350368  55964      0  2        0x12                sshd
 28357  454899      1      0  3    0x100083  ttyin         getty
 55964  221281      1      0  3        0x80  select        sshd
 78514  319183  84478     73  2    0x100090                syslogd
 84478  390303      1      0  3    0x100082  netio         syslogd
 82138   42968      1     77  3    0x100090  poll          dhclient
 63317  445796      1      0  3        0x80  poll          dhclient
  8905  432738      0      0  2     0x14200                zerothread
 27058   94701      0      0  3     0x14200  aiodoned      aiodoned
 81989  218404      0      0  3     0x14200  syncer        update
 63596  248558      0      0  3     0x14200  cleaner       cleaner
 35398  299482      0      0  3     0x14200  reaper        reaper
 41947  315248      0      0  3     0x14200  pgdaemon      pagedaemon
 23196  519600      0      0  3     0x14200  bored         crynlk
 57515  277532      0      0  3     0x14200  bored         crypto
   327  144286      0      0  3  0x40014200  acpi0         acpi0
   611   72814      0      0  3     0x14200  bored         softnet
 79228   52475      0      0  3     0x14200  bored         systqmp
 91749  289799      0      0  3     0x14200  bored         systq
 87599  284077      0      0  2  0x40014200                softclock
 32455  491240      0      0  3  0x40014200                idle0
 79612  294861      0      0  3     0x14200  bored         smr
     1  520305      0      0  3        0x82  wait          init
     0       0     -1      0  3     0x10200  scheduler     swapper
ddb> show all locks
No such command
ddb> show malloc
           Type InUse  MemUse  HighUse   Limit  Requests Type Lim Kern Lim
         devbuf  9426   6306K    6307K  78643K     10519        0        0
            pcb    24      9K       9K  78643K        56        0        0
         rtable    61      1K       2K  78643K       116        0        0
         ifaddr    21      7K       7K  78643K        21        0        0
       counters    19     16K      16K  78643K        19        0        0
       ioctlops     0      0K       2K  78643K        13        0        0
          mount     1      1K       1K  78643K         1        0        0
         vnodes  1166     73K      73K  78643K      1171        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      0K       0K  78643K         2        0        0
            sem     2      0K       0K  78643K         2        0        0
        dirhash    12      2K       2K  78643K        12        0        0
           ACPI  1793    195K     288K  78643K     12537        0        0
      file desc     1      0K       0K  78643K         1        0        0
           proc    40     30K      38K  78643K       207        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       152        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    46      2K       3K  78643K       667        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     3      0K       0K  78643K         3        0        0
           temp    30   2675K    2739K  78643K      1706        0        0
      SYN cache     2     16K      16K  78643K         2        0        0
ddb> 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       22    0       16     1     0     1     1     0     8    0
plimitpl   152       13    0        8     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
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     1381    0       16    45     0    45    45     0     8    0
ffsino     240     1381    0       16    81     0    81    81     0     8    0
nchpl      144     1554    0       30    57     0    57    57     0     8    0
uvmvnodes   72     1390    0        0    26     0    26    26     0     8    0
vnodes     200     1390    0        0    74     0    74    74     0     8    0
namei      1024    3272    0     3272     2     1     1     1     0     8    1
scxspl     192     2356    0     2356     9     2     7     7     0     8    7
sigapl     432      176    0      166     2     0     2     2     0     8    0
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      118    0      111     2     1     1     1     0     8    0
fdescpl    424      177    0      166     2     0     2     2     0     8    0
filepl     120      817    0      774     2     0     2     2     0     8    0
lockfpl    104        6    0        6     1     1     0     1     0     8    0
lockfspl    32        3    0        3     1     1     0     1     0     8    0
sessionpl  112       17    0        9     1     0     1     1     0     8    0
pgrppl      48       17    0        9     1     0     1     1     0     8    0
ucredpl     96       47    0       40     1     0     1     1     0     8    0
zombiepl   144      166    0      166     2     1     1     1     0     8    1
processpl  840      191    0      166     4     0     4     4     0     8    0
procpl     600      191    0      166     3     0     3     3     0     8    0
sockpl     384       65    0       48     2     0     2     2     0     8    0
mcl4k      4096      10    0       10     1     0     1     1     0     8    1
mcl2k      2048    5780    0     5752     6     0     6     6     0     8    2
mtagpl      80        2    0        2     1     1     0     1     0     8    0
mbufpl     256     9945    0     9900     5     1     4     4     0     8    0
bufpl      256     2026    0      245   112     0   112   112     0     8    0
anonpl      16    17472    0    16373     8     2     6     7     0    62    1
amapchunkpl 152     507    0      472     2     0     2     2     0   158    0
amappl16   192       73    0       68     1     0     1     1     0     8    0
amappl14   176       14    0       13     2     1     1     1     0     8    0
amappl12   160        7    0        7     1     0     1     1     0     8    1
amappl11   152       41    0       27     1     0     1     1     0     8    0
amappl10   144       48    0       48     2     1     1     1     0     8    1
amappl9    136      368    0      367     1     0     1     1     0     8    0
amappl8    128       82    0       78     1     0     1     1     0     8    0
amappl7    120       14    0       13     1     0     1     1     0     8    0
amappl6    112       42    0       37     1     0     1     1     0     8    0
amappl5    104      151    0      141     1     0     1     1     0     8    0
amappl4     96      376    0      351     1     0     1     1     0     8    0
amappl3     88      108    0      102     1     0     1     1     0     8    0
amappl2     80      552    0      516     1     0     1     1     0     8    0
amappl1     72    11752    0    11366    16     7     9    16     0     8    0
amappl      72      377    0      358     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        1    0        0     1     0     1     1     0     8    0
uaddrrnd    24      177    0      166     1     0     1     1     0     8    0
uaddrbest   32        2    0        0     1     0     1     1     0     8    0
uaddr       24      177    0      166     1     0     1     1     0     8    0
vmmpekpl   168     5286    0     5271     1     0     1     1     0     8    0
vmmpepl    168    23781    0    23088    50    16    34    47     0   357    2
vmsppl     264      176    0      166     1     0     1     1     0     8    0
pdppl      4096     360    0      332     5     0     5     5     0     8    0
pvpl        32    71104    0    68418    31     5    26    26     0   265    3
pmappl     200      176    0      166     1     0     1     1     0     8    0
extentpl    40       39    0       25     1     0     1     1     0     8    0
phpool     112      225    0        4     7     0     7     7     0     8    0
ddb> 

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/04/26 07:05 openbsd 7d9a3feb9d7f b617407b .config console log report syz C ci-openbsd-main
2019/04/26 06:47 openbsd 7d9a3feb9d7f b617407b .config console log report ci-openbsd-main
* Struck through repros no longer work on HEAD.