syzbot


assert "dupe == NULL" failed in uvm_page.c

Status: auto-closed as invalid on 2020/05/10 22:18
Reported-by: syzbot+90a28fb739296ecc0fd4@syzkaller.appspotmail.com
First crash: 1736d, last: 1623d
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
openbsd assert "dupe == NULL" failed in uvm_page.c (2) 1 1459d 1459d 0/3 auto-closed as invalid on 2020/10/22 03:53
openbsd assert "dupe == NULL" failed in uvm_page.c (4) 132 25m 255d 0/3 upstream: reported on 2023/11/10 00:44
openbsd assert "dupe == NULL" failed in uvm_page.c (3) 25 580d 949d 0/3 auto-obsoleted due to no activity on 2023/03/20 05:40

Sample crash report:
panic: kernel diagnostic assertion "dupe == NULL" failed: file "/syzkaller/managers/setuid/kernel/sys/uvm/uvm_page.c", line 140
Stopped at      db_enter+0x18:  addq    $0x8,%rsp
    TID    PID    UID     PRFLAGS     PFLAGS  CPU  COMMAND
*217635  12656  32767        0x10          0    1K syz-executor.1
   5022  37142  32767        0x10          0    0  syz-executor.0
db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398
panic(ffffffff821ce21b) at panic+0x15c sys/kern/subr_prf.c:207
__assert(ffffffff82227bd9,ffffffff821e8c1f,8c,ffffffff821b5112) at __assert+0x2b sys/kern/subr_prf.c:154
uvm_pagealloc(fffffd807effedc8,100000,0,3) at uvm_pagealloc+0x476 sys/uvm/uvm_page.c:140
pmap_get_ptp(fffffd807effed98,20000000) at pmap_get_ptp+0xe8 sys/arch/amd64/amd64/pmap.c:1175
pmap_enter(fffffd807effed98,20000000,661eb000,2,22) at pmap_enter+0x2a8
uvm_fault(fffffd807efffb80,20000000,0,2) at uvm_fault+0x1373 sys/uvm/uvm_fault.c:939
pageflttrap(ffff800024dab960,1) at pageflttrap+0x1b8 sys/arch/amd64/amd64/trap.c:221
usertrap(ffff800024dab960) at usertrap+0x21a sys/arch/amd64/amd64/trap.c:384
recall_trap() at recall_trap+0x8
end of kernel
end trace frame: 0x7f7ffffcc030, count: 5
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 "dupe == NULL" failed: file "/syzkaller/managers/setuid/kernel/sys/uvm/uvm_page.c", line 140
ddb{1}> trace
db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398
panic(ffffffff821ce21b) at panic+0x15c sys/kern/subr_prf.c:207
__assert(ffffffff82227bd9,ffffffff821e8c1f,8c,ffffffff821b5112) at __assert+0x2b sys/kern/subr_prf.c:154
uvm_pagealloc(fffffd807effedc8,100000,0,3) at uvm_pagealloc+0x476 sys/uvm/uvm_page.c:140
pmap_get_ptp(fffffd807effed98,20000000) at pmap_get_ptp+0xe8 sys/arch/amd64/amd64/pmap.c:1175
pmap_enter(fffffd807effed98,20000000,661eb000,2,22) at pmap_enter+0x2a8
uvm_fault(fffffd807efffb80,20000000,0,2) at uvm_fault+0x1373 sys/uvm/uvm_fault.c:939
pageflttrap(ffff800024dab960,1) at pageflttrap+0x1b8 sys/arch/amd64/amd64/trap.c:221
usertrap(ffff800024dab960) at usertrap+0x21a sys/arch/amd64/amd64/trap.c:384
recall_trap() at recall_trap+0x8
end of kernel
end trace frame: 0x7f7ffffcc030, count: -10
ddb{1}> show registers
rdi                                0
rsi                              0x1
rbp               0xffff800024dab350
rbx               0xffff800024dab400
rdx               0xffff800020a7dd48
rcx                                0
rax                                0
r8                0xffffffff81180f8f    kprintf+0x16f
r9                               0x1
r10                             0x25
r11               0xfbedb0cb87a37b81
r12                     0x3000000008
r13               0xffff800024dab360
r14                            0x100
r15                              0x1
rip               0xffffffff81d39998    db_enter+0x18
cs                               0x8
rflags                         0x246
rsp               0xffff800024dab340
ss                                 0
db_enter+0x18:  addq    $0x8,%rsp
ddb{1}> show proc
PROC (syz-executor.1) pid=217635 stat=onproc
    flags process=10<SUGID> proc=0
    pri=86, usrpri=86, nice=20
    forw=0xffffffffffffffff, list=0xffff800020a7c758,0xffff800020a9c028
    process=0xffff800020ae63e0 user=0xffff800024da6000, vmspace=0xfffffd807efffb80
    estcpu=36, cpticks=4, pctcpu=0.0
    user=0, sys=1, intr=0
ddb{1}> ps
   PID     TID   PPID    UID  S       FLAGS  WAIT          COMMAND
*12656  217635  13968  32767  7        0x10                syz-executor.1
 12656  250781  13968  32767  3   0x4000090  fsleep        syz-executor.1
 12656  488514  13968  32767  3   0x4000090  fsleep        syz-executor.1
 37142    5022  80635  32767  7        0x10                syz-executor.0
 37142  217271  80635  32767  3   0x4000090  kqread        syz-executor.0
 13968  282165  21724  32767  3        0x90  nanosleep     syz-executor.1
 21724  505596  17392      0  3        0x82  wait          syz-executor.1
 80635  271405  91294  32767  3        0x90  nanosleep     syz-executor.0
 91294  449328  17392      0  3        0x82  wait          syz-executor.0
 79685  394861      0      0  3     0x14200  bored         sosplice
 17392  326457  95049      0  3        0x82  thrsleep      syz-fuzzer
 17392  519948  95049      0  3   0x4000082  thrsleep      syz-fuzzer
 17392  424106  95049      0  3   0x4000082  thrsleep      syz-fuzzer
 17392  517421  95049      0  3   0x4000082  thrsleep      syz-fuzzer
 17392  279358  95049      0  3   0x4000082  thrsleep      syz-fuzzer
 17392  445875  95049      0  3   0x4000082  thrsleep      syz-fuzzer
 17392  329409  95049      0  3   0x4000082  thrsleep      syz-fuzzer
 17392  511683  95049      0  3   0x4000082  thrsleep      syz-fuzzer
 17392  472559  95049      0  3   0x4000082  kqread        syz-fuzzer
 17392  173342  95049      0  3   0x4000082  thrsleep      syz-fuzzer
 95049  467603  14388      0  3    0x10008a  pause         ksh
 14388   68330  80720      0  3        0x92  select        sshd
 25929   84603      1      0  3    0x100083  ttyin         getty
 80720  351275      1      0  3        0x80  select        sshd
 24129  401472  80713     73  3    0x100090  kqread        syslogd
 80713  326452      1      0  3    0x100082  netio         syslogd
 52855  355036      1     77  3    0x100090  poll          dhclient
 42375  397877      1      0  3        0x80  poll          dhclient
 86685  141887      0      0  2     0x14200                zerothread
 75061   53078      0      0  3     0x14200  aiodoned      aiodoned
 31021  481076      0      0  3     0x14200  syncer        update
 63043   83423      0      0  3     0x14200  cleaner       cleaner
 54225  367304      0      0  3     0x14200  reaper        reaper
 88010  100024      0      0  3     0x14200  pgdaemon      pagedaemon
 60422  361305      0      0  3     0x14200  bored         crynlk
 76713  251383      0      0  3     0x14200  bored         crypto
  9360   58022      0      0  3  0x40014200  acpi0         acpi0
 26263  495395      0      0  3  0x40014200                idle1
 93273  392072      0      0  3     0x14200  bored         softnet
 30261  106020      0      0  3     0x14200  bored         systqmp
 88719  252701      0      0  3     0x14200  bored         systq
 74677  510556      0      0  3  0x40014200  bored         softclock
 58671  110176      0      0  3  0x40014200                idle0
 87517  303748      0      0  3     0x14200  bored         smr
     1  512336      0      0  3        0x82  wait          init
     0       0     -1      0  3     0x10200  scheduler     swapper
ddb{1}> show all locks
CPU 1:
exclusive mutex &pmap->pm_mtx r = 0 (0xfffffd807effeda8)
#0  witness_lock+0x52e sys/kern/subr_witness.c:1164
#1  mtx_enter_try+0x102
#2  mtx_enter+0x4b sys/kern/kern_lock.c:266
#3  pmap_enter+0x1bc rcr3 machine/cpufunc.h:141 [inline]
#3  pmap_enter+0x1bc pmap_map_ptes sys/arch/amd64/amd64/pmap.c:414 [inline]
#3  pmap_enter+0x1bc sys/arch/amd64/amd64/pmap.c:2678
#4  uvm_fault+0x1373 sys/uvm/uvm_fault.c:939
#5  pageflttrap+0x1b8 sys/arch/amd64/amd64/trap.c:221
#6  usertrap+0x21a sys/arch/amd64/amd64/trap.c:384
#7  recall_trap+0x8
Process 12656 (syz-executor.1) thread 0xffff800020a7dd48 (217635)
shared rwlock vmmaplk r = 0 (0xfffffd807efffb98)
#0  witness_lock+0x52e sys/kern/subr_witness.c:1164
#1  uvmfault_lookup+0xd9 sys/uvm/uvm_fault.c:1448
#2  uvm_fault+0x7f sys/uvm/uvm_fault.c:524
#3  pageflttrap+0x1b8 sys/arch/amd64/amd64/trap.c:221
#4  usertrap+0x21a sys/arch/amd64/amd64/trap.c:384
#5  recall_trap+0x8
exclusive kernel_lock &kernel_lock r = 0 (0xffffffff82644060)
#0  witness_lock+0x52e sys/kern/subr_witness.c:1164
#1  pageflttrap+0x7f sys/arch/amd64/amd64/trap.c:180
#2  usertrap+0x21a sys/arch/amd64/amd64/trap.c:384
#3  recall_trap+0x8
exclusive mutex &pmap->pm_mtx r = 0 (0xfffffd807effeda8)
#0  witness_lock+0x52e sys/kern/subr_witness.c:1164
#1  mtx_enter_try+0x102
#2  mtx_enter+0x4b sys/kern/kern_lock.c:266
#3  pmap_enter+0x1bc rcr3 machine/cpufunc.h:141 [inline]
#3  pmap_enter+0x1bc pmap_map_ptes sys/arch/amd64/amd64/pmap.c:414 [inline]
#3  pmap_enter+0x1bc sys/arch/amd64/amd64/pmap.c:2678
#4  uvm_fault+0x1373 sys/uvm/uvm_fault.c:939
#5  pageflttrap+0x1b8 sys/arch/amd64/amd64/trap.c:221
#6  usertrap+0x21a sys/arch/amd64/amd64/trap.c:384
#7  recall_trap+0x8
ddb{1}> show malloc
           Type InUse  MemUse  HighUse   Limit  Requests Type Lim
         devbuf  9482   6334K    6334K  78643K     10870        0
            pcb    13     10K      12K  78643K        15        0
         rtable   107      3K       4K  78643K      3132        0
         ifaddr    39     11K      11K  78643K       579        0
       counters    43     33K      33K  78643K       191        0
       ioctlops     0      0K       2K  78643K       164        0
            iov     0      0K      28K  78643K       776        0
          mount     1      1K       1K  78643K         1        0
         vnodes  1215     76K      76K  78643K      3147        0
      UFS quota     1     32K      32K  78643K         1        0
      UFS mount     5     36K      36K  78643K         5        0
            shm     2      1K       5K  78643K        53        0
         VM map     2      1K       1K  78643K         2        0
            sem    12      0K       0K  78643K      1955        0
        dirhash    12      2K       2K  78643K        12        0
           ACPI  1809    196K     290K  78643K     12766        0
      file desc     8     25K      33K  78643K      3676        0
          sigio     0      0K       0K  78643K        97        0
           proc    48     50K      83K  78643K      3900        0
        subproc    34      2K       2K  78643K      1292        0
    NFS srvsock     1      0K       0K  78643K         1        0
     NFS daemon     1     16K      16K  78643K         1        0
    ip_moptions     0      0K       1K  78643K      1005        0
       in_multi    33      2K       2K  78643K       972        0
    ether_multi     1      0K       0K  78643K        23        0
    ISOFS mount     1     32K      32K  78643K         1        0
  MSDOSFS mount     1     16K      16K  78643K         1        0
           ttys   133    599K     599K  78643K       133        0
           exec     0      0K       1K  78643K      1557        0
        pagedep     1      8K       8K  78643K         1        0
       inodedep     1     32K      32K  78643K         1        0
         newblk     1      0K       0K  78643K         1        0
        VM swap     7     26K      26K  78643K         7        0
       UVM amap   178     26K      42K  78643K     14496        0
       UVM aobj   130      4K       4K  78643K       135        0
        memdesc     1      4K       4K  78643K         1        0
    crypto data     1      1K       1K  78643K         1        0
    ip6_options     0      0K       0K  78643K       331        0
            NDP     7      0K       0K  78643K       231        0
           temp   102   3021K    3087K  78643K     17526        0
         kqueue     3      4K      23K  78643K       491        0
      SYN cache     2     16K      16K  78643K         2        0
ddb{1}> show all pools
Name      Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle
arp         64      161    0      154     1     0     1     1     0     8    0
plcache    128       20    0        0     1     0     1     1     0     8    0
rtpcb       80      618    0      616     1     0     1     1     0     8    0
rtentry    112      816    0      771     2     0     2     2     0     8    0
unpcb      120     4172    0     4160    13    12     1     3     0     8    0
syncache   264       61    0       61    15    14     1     1     0     8    1
tcpqe       32       59    0       59     8     7     1     1     0     8    1
tcpcb      544     3068    0     3064    39    38     1    13     0     8    0
ipq         40       34    0       34    14    13     1     1     0     8    1
ipqe        40     1205    0     1205    14    13     1     1     0     8    1
inpcb      280     6888    0     6879    40    38     2     9     0     8    1
ip6q        72        3    0        3     3     3     0     1     0     8    0
ip6af       40        4    0        4     2     2     0     1     0     8    0
nd6         48      176    0      172     1     0     1     1     0     8    0
art_heap8  4096       1    0        0     1     0     1     1     0     8    0
art_heap4  256     3621    0     3406    19     5    14    15     0     8    0
art_table   32     3622    0     3406     2     0     2     2     0     8    0
art_node    16      815    0      774     1     0     1     1     0     8    0
sysvmsgpl   40       52    0       33     1     0     1     1     0     8    0
semupl     112        1    0        1     1     1     0     1     0     8    0
semapl     112     1953    0     1943     1     0     1     1     0     8    0
shmpl      112      133    0        5     4     0     4     4     0     8    0
dirhash    1024      17    0        0     3     0     3     3     0     8    0
dino1pl    128     5468    0     4051    46     0    46    46     0     8    0
ffsino     272     5468    0     4051    95     0    95    95     0     8    0
nchpl      144    11028    0     9427    60     0    60    60     0     8    0
uvmvnodes   72     5926    0        0   108     0   108   108     0     8    0
vnodes     208     5926    0        0   312     0   312   312     0     8    0
namei      1024   63507    0    63507     1     0     1     1     0     8    1
percpumem   16      106    0       74     1     0     1     1     0     8    0
scxspl     192    33659    0    33659    27    24     3     7     0     8    3
plimitpl   152      643    0      634     1     0     1     1     0     8    0
sigapl     432     3625    0     3609    10     8     2     3     0     8    0
futexpl     56    89089    0    89087     1     0     1     1     0     8    0
knotepl    112     1607    0     1588     4     3     1     2     0     8    0
kqueuepl   104     1945    0     1942     6     5     1     4     0     8    0
pipelkpl    48     1830    0     1819     1     0     1     1     0     8    0
pipepl     120     3660    0     3639    15    13     2     3     0     8    1
fdescpl    496     3626    0     3609     3     0     3     3     0     8    0
filepl     152    46507    0    46398    42    35     7    13     0     8    2
lockfpl    104     1300    0     1298     1     0     1     1     0     8    0
lockfspl    48      359    0      357     1     0     1     1     0     8    0
sessionpl  112       91    0       81     1     0     1     1     0     8    0
pgrppl      48      190    0      180     1     0     1     1     0     8    0
ucredpl     96     8008    0     7999     1     0     1     1     0     8    0
zombiepl   144     3609    0     3609     1     0     1     1     0     8    1
processpl  960     3642    0     3609     5     0     5     5     0     8    0
procpl     624    10261    0    10216    10     6     4     5     0     8    0
sosppl     128       97    0       97    15    14     1     1     0     8    1
sockpl     400    11808    0    11786    75    69     6    17     0     8    3
mcl64k     65536     26    0        0     3     0     3     3     0     8    0
mcl16k     16384     17    0        0     3     0     3     3     0     8    0
mcl12k     12288     17    0        0     2     0     2     2     0     8    0
mcl9k      9216      16    0        0     2     0     2     2     0     8    0
mcl8k      8192      33    0        0     4     1     3     3     0     8    0
mcl4k      4096      17    0        0     3     0     3     3     0     8    0
mcl2k2     2112       4    0        0     1     0     1     1     0     8    0
mcl2k      2048     227    0        0    28     3    25    28     0     8    0
mtagpl      80        1    0        0     1     0     1     1     0     8    0
mbufpl     256      622    0        0    26     0    26    26     0     8    0
bufpl      280    15001    0     8711   450     0   450   450     0     8    0
anonpl      16   518966    0   506810   141    65    76    76     0   125   14
amapchunkpl 152   41469    0    41331   128   108    20    20     0   158   13
amappl16   192    18602    0    17812   173   125    48    53     0     8    8
amappl15   184     1175    0     1172     1     0     1     1     0     8    0
amappl14   176      720    0      716     1     0     1     1     0     8    0
amappl13   168      394    0      389     9     8     1     1     0     8    0
amappl12   160      318    0      315     2     1     1     1     0     8    0
amappl11   152      406    0      395     1     0     1     1     0     8    0
amappl10   144      533    0      527     1     0     1     1     0     8    0
amappl9    136     1804    0     1793     1     0     1     1     0     8    0
amappl8    128     1070    0      993     3     0     3     3     0     8    0
amappl7    120     1015    0      999     1     0     1     1     0     8    0
amappl6    112      272    0      257     1     0     1     1     0     8    0
amappl5    104     1077    0     1068     1     0     1     1     0     8    0
amappl4     96     4143    0     4110     1     0     1     1     0     8    0
amappl3     88      500    0      493     1     0     1     1     0     8    0
amappl2     80    23346    0    23265     3     1     2     3     0     8    0
amappl1     72   108890    0   108413    24    14    10    20     0     8    0
amappl      80    11855    0    11804     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      134    0        5     3     0     3     3     0     8    0
uaddrrnd    24     3626    0     3609     1     0     1     1     0     8    0
uaddrbest   32        2    0        0     1     0     1     1     0     8    0
uaddr       24     3626    0     3609     1     0     1     1     0     8    0
vmmpekpl   168    38449    0    38419     2     0     2     2     0     8    0
vmmpepl    168   512510    0   510280   196    74   122   126     0   357   23
vmsppl     368     3625    0     3609     2     0     2     2     0     8    0
pdppl      4096    7259    0     7218     6     0     6     6     0     8    0
pvpl        32  1350631    0  1335118   305   124   181   183     0   265   29
pmappl     232     3625    0     3609    13    12     1     2     0     8    0
extentpl    40       46    0       29     1     0     1     1     0     8    0
phpool     112      320    0      124     6     0     6     6     0     8    0

Crashes (4):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/02/10 22:17 openbsd 431e362e062d 18847f55 .config console log report ci-openbsd-setuid
2019/11/13 01:59 openbsd f0c2caef18b3 048f2d49 .config console log report ci-openbsd-multicore
2019/11/12 21:08 openbsd f0c2caef18b3 048f2d49 .config console log report ci-openbsd-multicore
2019/10/20 20:48 openbsd 06f3ae2aae65 8c88c9c1 .config console log report ci-openbsd-multicore
* Struck through repros no longer work on HEAD.