syzbot


panic: amap_lookups: offset out of range

Status: auto-closed as invalid on 2020/02/21 01:29
Reported-by: syzbot+c2c53f972d17ced169fa@syzkaller.appspotmail.com
First crash: 1825d, last: 1825d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
openbsd panic: amap_lookups: offset out of range (2) 1 1657d 1657d 0/3 auto-closed as invalid on 2020/08/07 06:33

Sample crash report:
panic: amap_lookups: offset out of range
Stopped at      db_enter+0x18:  addq    $0x8,%rsp
    TID    PID    UID     PRFLAGS     PFLAGS  CPU  COMMAND
 236685  50958      0           0          0    0  syz-executor.1
*245877   3598      0         0x2  0x4000000    1K syz-fuzzer
db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398
panic() at panic+0x15c sys/kern/subr_prf.c:207
amap_lookups(fffffd806b18d0d0,6000,ffff800020b49380,8) at amap_lookups+0x2bd sys/uvm/uvm_amap.c:1047
uvm_fault(fffffd806e7bea18,c003119000,1,2) at uvm_fault+0x32a sys/uvm/uvm_fault.c:628
pageflttrap() at pageflttrap+0x20b sys/arch/amd64/amd64/trap.c:199
usertrap(ffff800020b496a0) at usertrap+0x21a sys/arch/amd64/amd64/trap.c:369
recall_trap() at recall_trap+0x8
end of kernel
end trace frame: 0xc00356fd80, count: 8
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
amap_lookups: offset out of range
ddb{1}> trace
db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398
panic() at panic+0x15c sys/kern/subr_prf.c:207
amap_lookups(fffffd806b18d0d0,6000,ffff800020b49380,8) at amap_lookups+0x2bd sys/uvm/uvm_amap.c:1047
uvm_fault(fffffd806e7bea18,c003119000,1,2) at uvm_fault+0x32a sys/uvm/uvm_fault.c:628
pageflttrap() at pageflttrap+0x20b sys/arch/amd64/amd64/trap.c:199
usertrap(ffff800020b496a0) at usertrap+0x21a sys/arch/amd64/amd64/trap.c:369
recall_trap() at recall_trap+0x8
end of kernel
end trace frame: 0xc00356fd80, count: -7
ddb{1}> show registers
rdi                                0
rsi                              0x1
rbp               0xffff800020b49230
rbx               0xffff800020b492e0
rdx               0xffff800020ab0ee8
rcx                                0
rax                                0
r8                0xffffffff81e10fcf    kprintf+0x16f
r9                               0x1
r10                             0x25
r11               0x3954a46a19b685f2
r12                     0x3000000008
r13               0xffff800020b49240
r14                            0x100
r15                              0x1
rip               0xffffffff818ea768    db_enter+0x18
cs                               0x8
rflags                         0x246
rsp               0xffff800020b49220
ss                                 0
db_enter+0x18:  addq    $0x8,%rsp
ddb{1}> show proc
PROC (syz-fuzzer) pid=245877 stat=onproc
    flags process=2<EXEC> proc=4000000<THREAD>
    pri=50, usrpri=50, nice=20
    forw=0xffffffffffffffff, list=0xffff800020ab1650,0xffff800020ab02a0
    process=0xffff800020a8aa90 user=0xffff800020b44000, vmspace=0xfffffd806e7bea18
    estcpu=0, cpticks=0, pctcpu=0.47
    user=0, sys=0, intr=0
ddb{1}> ps
   PID     TID   PPID    UID  S       FLAGS  WAIT          COMMAND
 50958  236685  28734      0  7           0                syz-executor.1
 50958  429025  28734      0  3   0x4000000  biowait       syz-executor.1
 28734  406809   3598      0  3        0x82  nanosleep     syz-executor.1
 85543  280894      1      0  3    0x100083  ttyin         getty
 90387  131659      0      0  3     0x14200  acct          acct
 71344  125669      0      0  3     0x14200  bored         sosplice
  5279  411440   3598      0  3         0x2  biowait       syz-executor.0
  3598  432433  95315      0  3        0x82  thrsleep      syz-fuzzer
  3598  194873  95315      0  3   0x4000082  nanosleep     syz-fuzzer
  3598   80626  95315      0  3   0x4000082  thrsleep      syz-fuzzer
  3598  452834  95315      0  3   0x4000082  thrsleep      syz-fuzzer
  3598  238696  95315      0  3   0x4000082  thrsleep      syz-fuzzer
  3598   95545  95315      0  3   0x4000082  thrsleep      syz-fuzzer
  3598  431664  95315      0  3   0x4000082  nanosleep     syz-fuzzer
  3598  267557  95315      0  3   0x4000082  thrsleep      syz-fuzzer
* 3598  245877  95315      0  7   0x4000002                syz-fuzzer
  3598  123502  95315      0  3   0x4000082  thrsleep      syz-fuzzer
 95315  481409  30011      0  3    0x10008a  pause         ksh
 30011  270994  18318      0  3        0x92  select        sshd
 18318  207977      1      0  3        0x80  select        sshd
  2588  286155  57977     74  3    0x100092  bpf           pflogd
 57977  376039      1      0  3        0x80  netio         pflogd
 13648  109368  24702     73  3    0x100090  kqread        syslogd
 24702    3165      1      0  3    0x100082  netio         syslogd
  2914  385795      1     77  3    0x100090  poll          dhclient
 19393  387225      1      0  3        0x80  poll          dhclient
 64663  445102      0      0  2     0x14200                zerothread
 22632  242769      0      0  3     0x14200  aiodoned      aiodoned
 39653  135730      0      0  3     0x14200  syncer        update
  6250  160135      0      0  3     0x14200  cleaner       cleaner
 41052  444806      0      0  3     0x14200  reaper        reaper
 77968   82358      0      0  3     0x14200  pgdaemon      pagedaemon
 96347  164988      0      0  3     0x14200  bored         crynlk
 59697  107869      0      0  3     0x14200  bored         crypto
  9836  413288      0      0  3  0x40014200  acpi0         acpi0
 53665  297781      0      0  3  0x40014200                idle1
 69955  110742      0      0  3     0x14200  bored         softnet
 62474  392700      0      0  3     0x14200  bored         systqmp
 66059  469219      0      0  3     0x14200  bored         systq
 14498  229097      0      0  3  0x40014200  bored         softclock
 93598  426385      0      0  3  0x40014200                idle0
 59998  126066      0      0  3     0x14200  bored         smr
     1  109323      0      0  3        0x82  wait          init
     0       0     -1      0  3     0x10200  scheduler     swapper
ddb{1}> show all locks
Process 50958 (syz-executor.1) thread 0xffff800020ab0508 (429025)
exclusive rrwlock inode r = 0 (0xfffffd80628d6c50)
#0  witness_lock+0x52e sys/kern/subr_witness.c:1163
#1  rw_enter+0x447 sys/kern/kern_rwlock.c:306
#2  rrw_enter+0x4f sys/kern/kern_rwlock.c:451
#3  VOP_LOCK+0xf0 sys/kern/vfs_vops.c:615
#4  vn_lock+0x81 sys/kern/vfs_vnops.c:571
#5  ufs_rename+0x1bb sys/ufs/ufs/ufs_vnops.c:806
#6  VOP_RENAME+0x106 sys/kern/vfs_vops.c:427
#7  dorenameat+0x2a3 sys/kern/vfs_syscalls.c:2904
#8  syscall+0x4a4 mi_syscall sys/sys/syscall_mi.h:92 [inline]
#8  syscall+0x4a4 sys/arch/amd64/amd64/trap.c:555
#9  Xsyscall+0x128
exclusive rrwlock inode r = 0 (0xfffffd80628d6a30)
#0  witness_lock+0x52e sys/kern/subr_witness.c:1163
#1  rw_enter+0x447 sys/kern/kern_rwlock.c:306
#2  rrw_enter+0x4f sys/kern/kern_rwlock.c:451
#3  VOP_LOCK+0xf0 sys/kern/vfs_vops.c:615
#4  vn_lock+0x81 sys/kern/vfs_vnops.c:571
#5  vfs_lookup+0xe6 sys/kern/vfs_lookup.c:419
#6  namei+0x63c sys/kern/vfs_lookup.c:249
#7  dorenameat+0x106 sys/kern/vfs_syscalls.c:2874
#8  syscall+0x4a4 mi_syscall sys/sys/syscall_mi.h:92 [inline]
#8  syscall+0x4a4 sys/arch/amd64/amd64/trap.c:555
#9  Xsyscall+0x128
Process 5279 (syz-executor.0) thread 0xffff800020ab0018 (411440)
exclusive rrwlock inode r = 0 (0xfffffd80628d6b40)
#0  witness_lock+0x52e sys/kern/subr_witness.c:1163
#1  rw_enter+0x447 sys/kern/kern_rwlock.c:306
#2  rrw_enter+0x4f sys/kern/kern_rwlock.c:451
#3  ufs_ihashins+0x45 sys/ufs/ufs/ufs_ihash.c:140
#4  ffs_vget+0x13e sys/ufs/ffs/ffs_vfsops.c:1352
#5  ffs_inode_alloc+0x1cf sys/ufs/ffs/ffs_alloc.c:392
#6  ufs_mkdir+0xf4 sys/ufs/ufs/ufs_vnops.c:1164
#7  VOP_MKDIR+0xc6 sys/kern/vfs_vops.c:450
#8  domkdirat+0x121 sys/kern/vfs_syscalls.c:2983
#9  syscall+0x4a4 mi_syscall sys/sys/syscall_mi.h:92 [inline]
#9  syscall+0x4a4 sys/arch/amd64/amd64/trap.c:555
#10 Xsyscall+0x128
exclusive rrwlock inode r = 0 (0xfffffd80691c6808)
#0  witness_lock+0x52e sys/kern/subr_witness.c:1163
#1  rw_enter+0x447 sys/kern/kern_rwlock.c:306
#2  rrw_enter+0x4f sys/kern/kern_rwlock.c:451
#3  VOP_LOCK+0xf0 sys/kern/vfs_vops.c:615
#4  vn_lock+0x81 sys/kern/vfs_vnops.c:571
#5  vfs_lookup+0xe6 sys/kern/vfs_lookup.c:419
#6  namei+0x63c sys/kern/vfs_lookup.c:249
#7  domkdirat+0x75 sys/kern/vfs_syscalls.c:2968
#8  syscall+0x4a4 mi_syscall sys/sys/syscall_mi.h:92 [inline]
#8  syscall+0x4a4 sys/arch/amd64/amd64/trap.c:555
#9  Xsyscall+0x128
Process 3598 (syz-fuzzer) thread 0xffff800020ab0ee8 (245877)
shared rwlock vmmaplk r = 0 (0xfffffd806e7bea30)
#0  witness_lock+0x52e sys/kern/subr_witness.c:1163
#1  uvmfault_lookup+0xd9 sys/uvm/uvm_fault.c:1448
#2  uvm_fault+0x7f sys/uvm/uvm_fault.c:524
#3  pageflttrap+0x20b sys/arch/amd64/amd64/trap.c:199
#4  usertrap+0x21a sys/arch/amd64/amd64/trap.c:369
#5  recall_trap+0x8
exclusive kernel_lock &kernel_lock r = 0 (0xffffffff8265d2c0)
#0  witness_lock+0x52e sys/kern/subr_witness.c:1163
#1  pageflttrap+0x6f sys/arch/amd64/amd64/trap.c:162
#2  usertrap+0x21a sys/arch/amd64/amd64/trap.c:369
#3  recall_trap+0x8
ddb{1}> show malloc
           Type InUse  MemUse  HighUse   Limit  Requests Type Lim Kern Lim
         devbuf  9505   6535K    6983K  78643K     10874        0        0
            pcb    13      8K       8K  78643K        31        0        0
         rtable   109      4K       4K  78643K       264        0        0
         ifaddr    59     12K      12K  78643K        74        0        0
       counters    39     33K      33K  78643K        39        0        0
       ioctlops     0      0K       4K  78643K      1474        0        0
            iov     0      0K      16K  78643K        27        0        0
          mount     1      1K       1K  78643K         1        0        0
         vnodes  1220     77K      77K  78643K      1330        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         3        0        0
         VM map     2      1K       1K  78643K         4        0        0
            sem    12      0K       0K  78643K        55        0        0
        dirhash    12      2K       2K  78643K        12        0        0
           ACPI  1809    196K     290K  78643K     12766        0        0
      file desc     5     13K      25K  78643K       147        0        0
          sigio     0      0K       0K  78643K         4        0        0
           proc    60     63K      95K  78643K       504        0        0
        subproc    32      2K       2K  78643K        51        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        70        0        0
       in_multi    40      2K       2K  78643K        51        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    42    185K     185K  78643K        42        0        0
           exec     0      0K       1K  78643K       231        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   115     22K      23K  78643K      1436        0        0
       UVM aobj    10      2K       2K  78643K        10        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        22        0        0
            NDP     9      0K       0K  78643K        17        0        0
           temp   102   3549K    3619K  78643K     15433        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        8    0        2     1     0     1     1     0     8    0
plcache    128       20    0        0     1     0     1     1     0     8    0
rtpcb       80       37    0       35     1     0     1     1     0     8    0
rtentry    112       55    0       11     2     0     2     2     0     8    0
unpcb      120       92    0       82     1     0     1     1     0     8    0
syncache   264        4    0        4     1     1     0     1     0     8    0
tcpqe       32      110    0      110     1     1     0     1     0     8    0
tcpcb      544      113    0      109     2     0     2     2     0     8    1
inpcb      280      312    0      305     3     1     2     3     0     8    1
nd6         48        6    0        2     1     0     1     1     0     8    0
ppxss      1128       1    0        1     1     0     1     1     0     8    1
pffrag     232        3    0        3     1     1     0     1     0   482    0
pffrnode    88        3    0        3     1     1     0     1     0     8    0
pffrent     40       92    0       92     1     1     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       19    0        2     1     0     1     1     0     8    0
pfstkey    112       19    0        2     1     0     1     1     0     8    0
pfstate    328       19    0        2     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      256    0       43    14     0    14    14     0     8    0
art_table   32      257    0       43     2     0     2     2     0     8    0
art_node    16       54    0       14     1     0     1     1     0     8    0
sysvmsgpl   40       29    0       22     1     0     1     1     0     8    0
semupl     112        1    0        1     1     1     0     1     0     8    0
semapl     112       53    0       43     1     0     1     1     0     8    0
shmpl      112        8    0        0     1     0     1     1     0     8    0
dirhash    1024      17    0        0     3     0     3     3     0     8    0
dino1pl    128     1586    0      175    46     0    46    46     0     8    0
ffsino     272     1586    0      175    95     0    95    95     0     8    0
nchpl      144     2003    0      401    61     0    61    61     0     8    1
uvmvnodes   72     1709    0        0    32     0    32    32     0     8    0
vnodes     208     1709    0        0    90     0    90    90     0     8    0
namei      1024    5455    0     5452     1     0     1     1     0     8    0
percpumem   16       30    0        0     1     0     1     1     0     8    0
vmpool     552        2    0        2     1     0     1     1     0     8    1
scxspl     192     5448    0     5446     8     2     6     7     0     8    5
plimitpl   152       23    0       15     1     0     1     1     0     8    0
sigapl     432      343    0      328     3     1     2     3     0     8    0
futexpl     56     2593    0     2593     1     0     1     1     0     8    1
knotepl    112       88    0       69     2     0     2     2     0     8    1
kqueuepl   104       39    0       37     1     0     1     1     0     8    0
pipepl     160      276    0      257     2     0     2     2     0     8    1
fdescpl    488      344    0      328     3     0     3     3     0     8    0
filepl     152     2282    0     2181     7     1     6     7     0     8    2
lockfpl    104       27    0       26     1     0     1     1     0     8    0
lockfspl    48       12    0       11     1     0     1     1     0     8    0
sessionpl  112       20    0        9     1     0     1     1     0     8    0
pgrppl      48       20    0        9     1     0     1     1     0     8    0
ucredpl     96      218    0      209     1     0     1     1     0     8    0
zombiepl   144      328    0      328     1     0     1     1     0     8    1
processpl  896      361    0      328     4     0     4     4     0     8    0
procpl     632      608    0      565     5     0     5     5     0     8    1
srpgc       64        2    0        2     1     0     1     1     0     8    1
sosppl     128        3    0        3     1     0     1     1     0     8    1
sockpl     384      441    0      422     5     1     4     5     0     8    2
mcl64k     65536      4    0        0     1     0     1     1     0     8    0
mcl16k     16384      1    0        0     1     0     1     1     0     8    0
mcl12k     12288      2    0        0     1     0     1     1     0     8    0
mcl9k      9216       2    0        0     1     0     1     1     0     8    0
mcl8k      8192       1    0        0     1     0     1     1     0     8    0
mcl4k      4096      11    0        0     2     0     2     2     0     8    0
mcl2k2     2112       1    0        0     1     0     1     1     0     8    0
mcl2k      2048     157    0        0    19     0    19    19     0     8    0
mtagpl      80       11    0        0     1     0     1     1     0     8    0
mbufpl     256      254    0        0    15     0    15    15     0     8    0
bufpl      256     6426    0     1309   320     0   320   320     0     8    0
anonpl      16    59761    0    43521    91     3    88    90     0   124    8
amapchunkpl 152    2382    0     2241    12     0    12    12     0   158    5
amappl16   192     1913    0      844    62     5    57    62     0     8    3
amappl15   184       57    0       55     1     0     1     1     0     8    0
amappl14   176       66    0       60     1     0     1     1     0     8    0
amappl12   160        4    0        2     2     1     1     1     0     8    0
amappl11   152       57    0       42     1     0     1     1     0     8    0
amappl10   144       15    0        8     1     0     1     1     0     8    0
amappl9    136      626    0      621     1     0     1     1     0     8    0
amappl8    128      203    0      169     2     0     2     2     0     8    0
amappl7    120       52    0       46     1     0     1     1     0     8    0
amappl6    112       65    0       58     1     0     1     1     0     8    0
amappl5    104      139    0      124     1     0     1     1     0     8    0
amappl4     96      605    0      572     1     0     1     1     0     8    0
amappl3     88      116    0      110     1     0     1     1     0     8    0
amappl2     80     1826    0     1754     3     1     2     3     0     8    0
amappl1     72    17641    0    17200    26    16    10    20     0     8    0
amappl      80      887    0      840     2     0     2     2     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
dma128     128      253    0      253     1     1     0     1     0     8    0
dma64       64        6    0        6     1     1     0     1     0     8    0
dma32       32        7    0        7     1     1     0     1     0     8    0
dma16       16       18    0       17     1     0     1     1     0     8    0
aobjpl      64        9    0        0     1     0     1     1     0     8    0
uaddrrnd    24      346    0      328     1     0     1     1     0     8    0
uaddrbest   32        2    0        0     1     0     1     1     0     8    0
uaddr       24      346    0      328     1     0     1     1     0     8    0
vmmpekpl   168     7015    0     6981     2     0     2     2     0     8    0
vmmpepl    168    50695    0    48473   153    13   140   140     0   357   41
vmsppl     368      343    0      328     2     0     2     2     0     8    0
pdppl      4096     699    0      660     6     0     6     6     0     8    1
pvpl        32   176930    0   157460   211     2   209   211     0   265   21
pmappl     232      345    0      330     2     0     2     2     0     8    1
extentpl    40       46    0       29     1     0     1     1     0     8    0
phpool     112      487    0        3    14     0    14    14     0     8    0

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/11/23 01:28 openbsd 64e2b1d674c7 598ca6c8 .config console log report ci-openbsd-multicore
* Struck through repros no longer work on HEAD.