syzbot


pool: free list modified: shmpl (2)

Status: auto-closed as invalid on 2020/03/04 23:09
Reported-by: syzbot+fb5d34b42138e606cdb3@syzkaller.appspotmail.com
First crash: 1603d, last: 1603d
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
openbsd pool: free list modified: shmpl (3) 1 1422d 1422d 0/3 auto-closed as invalid on 2020/09/01 15:24
openbsd pool: free list modified: shmpl C 22 1786d 1881d 3/3 fixed on 2019/10/29 17:45
openbsd pool: free list modified: shmpl (4) 1 164d 164d 0/3 auto-obsoleted due to no activity on 2024/02/11 22:36

Sample crash report:
panic: pool_do_get: shmpl free list modified: page 0xfffffd8062243000; item addr 0xfffffd8062243e00; offset 0x24=0x100ca
Stopped at      db_enter+0x18:  addq    $0x8,%rsp
    TID    PID    UID     PRFLAGS     PFLAGS  CPU  COMMAND
*268839  71398      0           0  0x4000000    0K syz-executor.1
  65752  72476      0           0  0x4000000    1  syz-executor.0
db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398
panic(ffffffff8220d3b4) at panic+0x15c sys/kern/subr_prf.c:207
pool_do_get(ffffffff8263a120,1,ffff800023bb5a58) at pool_do_get+0x472 sys/kern/subr_pool.c:744
pool_get(ffffffff8263a120,1) at pool_get+0xeb sys/kern/subr_pool.c:581
shmget_allocate_segment(ffff800020ac1160,ffff800023bb5be8,169,ffff800023bb5c30) at shmget_allocate_segment+0x15e sys/kern/sysv_shm.c:405
sys_shmget(ffff800020ac1160,ffff800023bb5be8,ffff800023bb5c30) at sys_shmget+0x13f sys/kern/sysv_shm.c:468
syscall(ffff800023bb5cb0) at syscall+0x4a4 mi_syscall sys/sys/syscall_mi.h:92 [inline]
syscall(ffff800023bb5cb0) at syscall+0x4a4 sys/arch/amd64/amd64/trap.c:555
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x2474dc4eb90, count: 7
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{0}> 
ddb{0}> set $lines = 0
ddb{0}> set $maxwidth = 0
ddb{0}> show panic
pool_do_get: shmpl free list modified: page 0xfffffd8062243000; item addr 0xfffffd8062243e00; offset 0x24=0x100ca
ddb{0}> trace
db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398
panic(ffffffff8220d3b4) at panic+0x15c sys/kern/subr_prf.c:207
pool_do_get(ffffffff8263a120,1,ffff800023bb5a58) at pool_do_get+0x472 sys/kern/subr_pool.c:744
pool_get(ffffffff8263a120,1) at pool_get+0xeb sys/kern/subr_pool.c:581
shmget_allocate_segment(ffff800020ac1160,ffff800023bb5be8,169,ffff800023bb5c30) at shmget_allocate_segment+0x15e sys/kern/sysv_shm.c:405
sys_shmget(ffff800020ac1160,ffff800023bb5be8,ffff800023bb5c30) at sys_shmget+0x13f sys/kern/sysv_shm.c:468
syscall(ffff800023bb5cb0) at syscall+0x4a4 mi_syscall sys/sys/syscall_mi.h:92 [inline]
syscall(ffff800023bb5cb0) at syscall+0x4a4 sys/arch/amd64/amd64/trap.c:555
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x2474dc4eb90, count: -8
ddb{0}> show registers
rdi               0xffffffff813ee2e7    db_enter+0x17
rsi                           0x36b9    __ALIGN_SIZE+0x26b9
rbp               0xffff800023bb58a0
rbx               0xffff800023bb5950
rdx                           0x36ba    __ALIGN_SIZE+0x26ba
rcx               0xffff800021b8c000
rax               0xffff800021b8c000
r8                0xffffffff81cd657f    kprintf+0x16f
r9                               0x1
r10                             0x25
r11               0x8c97342d0e3a9c22
r12                     0x3000000008
r13               0xffff800023bb58b0
r14                            0x100
r15                              0x1
rip               0xffffffff813ee2e8    db_enter+0x18
cs                               0x8
rflags                         0x246
rsp               0xffff800023bb5890
ss                              0x10
db_enter+0x18:  addq    $0x8,%rsp
ddb{0}> show proc
PROC (syz-executor.1) pid=268839 stat=onproc
    flags process=0 proc=4000000<THREAD>
    pri=86, usrpri=86, nice=20
    forw=0xffffffffffffffff, list=0xffff800020ac0290,0xffffffff82617120
    process=0xffff800020aec000 user=0xffff800023bb0000, vmspace=0xfffffd807f0085c0
    estcpu=36, cpticks=1, pctcpu=0.0
    user=0, sys=1, intr=0
ddb{0}> ps
   PID     TID   PPID    UID  S       FLAGS  WAIT          COMMAND
 71398  509819  65132      0  2           0                syz-executor.1
*71398  268839  65132      0  7   0x4000000                syz-executor.1
 72476  128119  45782      0  2           0                syz-executor.0
 72476   65752  45782      0  7   0x4000000                syz-executor.0
 89994  172040      0      0  3     0x14200  bored         sosplice
 65132  123358   1881      0  2       0x482                syz-executor.1
 45782  320851   1881      0  2       0x482                syz-executor.0
  1881  498994  73496      0  3        0x82  thrsleep      syz-fuzzer
  1881  372620  73496      0  3   0x4000082  thrsleep      syz-fuzzer
  1881   86811  73496      0  3   0x4000082  thrsleep      syz-fuzzer
  1881  436956  73496      0  3   0x4000082  thrsleep      syz-fuzzer
  1881  195214  73496      0  3   0x4000082  thrsleep      syz-fuzzer
  1881  303069  73496      0  3   0x4000082  kqread        syz-fuzzer
  1881    2535  73496      0  3   0x4000082  thrsleep      syz-fuzzer
  1881   43419  73496      0  3   0x4000082  thrsleep      syz-fuzzer
  1881  358905  73496      0  3   0x4000082  thrsleep      syz-fuzzer
  1881  117441  73496      0  3   0x4000082  thrsleep      syz-fuzzer
 73496   24559  18782      0  3    0x10008a  pause         ksh
 18782  508227  80466      0  3        0x92  select        sshd
 42847  240373      1      0  3    0x100083  ttyin         getty
 80466  152580      1      0  3        0x80  select        sshd
 84252   82997  74163     74  3    0x100092  bpf           pflogd
 74163  402267      1      0  3        0x80  netio         pflogd
 24673  267324  45654     73  3    0x100090  kqread        syslogd
 45654  355047      1      0  3    0x100082  netio         syslogd
 81830   76402      1     77  3    0x100090  poll          dhclient
 80512  165627      1      0  3        0x80  poll          dhclient
  5104   28314      0      0  2     0x14200                zerothread
 31241  107290      0      0  3     0x14200  aiodoned      aiodoned
 77470  225797      0      0  3     0x14200  syncer        update
 58164   26889      0      0  3     0x14200  cleaner       cleaner
 67427  324336      0      0  3     0x14200  reaper        reaper
 60635  441304      0      0  3     0x14200  pgdaemon      pagedaemon
   659  280694      0      0  3     0x14200  bored         crynlk
 45312  382641      0      0  3     0x14200  bored         crypto
 64835  178163      0      0  3  0x40014200  acpi0         acpi0
 28669  316897      0      0  3  0x40014200                idle1
 55458  345732      0      0  2     0x14200                softnet
 32957  217014      0      0  3     0x14200  bored         systqmp
 80665  387496      0      0  3     0x14200  bored         systq
 89299  113776      0      0  3  0x40014200  bored         softclock
 12293  441895      0      0  3  0x40014200                idle0
 85647  325655      0      0  3     0x14200  bored         smr
     1  277478      0      0  3        0x82  wait          init
     0       0     -1      0  3     0x10200  scheduler     swapper
ddb{0}> show all locks
CPU 0:
exclusive mutex shmpl r = 0 (0xffffffff8263a130)
#0  witness_lock+0x52e sys/kern/subr_witness.c:1163
#1  mtx_enter_try+0x102
#2  mtx_enter+0x4b sys/kern/kern_lock.c:266
#3  pool_get+0xbf sys/kern/subr_pool.c:578
#4  shmget_allocate_segment+0x15e sys/kern/sysv_shm.c:405
#5  sys_shmget+0x13f sys/kern/sysv_shm.c:468
#6  syscall+0x4a4 mi_syscall sys/sys/syscall_mi.h:92 [inline]
#6  syscall+0x4a4 sys/arch/amd64/amd64/trap.c:555
#7  Xsyscall+0x128
CPU 1:
exclusive mutex mbufpl r = 0 (0xffffffff8263a8b8)
#0  witness_lock+0x52e sys/kern/subr_witness.c:1163
#1  mtx_enter_try+0x102
#2  pool_cache_get+0xa3 pl_enter_try sys/kern/subr_pool.c:109 [inline]
#2  pool_cache_get+0xa3 pool_list_enter sys/kern/subr_pool.c:1797 [inline]
#2  pool_cache_get+0xa3 pool_cache_list_alloc sys/kern/subr_pool.c:1814 [inline]
#2  pool_cache_get+0xa3 sys/kern/subr_pool.c:1887
#3  pool_get+0x91 sys/kern/subr_pool.c:572
#4  m_gethdr+0x4c sys/kern/uipc_mbuf.c:283
#5  ip_fragment+0x13a sys/netinet/ip_output.c:682
#6  ip_output+0xfc1 sys/netinet/ip_output.c:501
#7  rip_output+0x252 sys/netinet/raw_ip.c:289
#8  rip_usrreq+0x46a sys/netinet/raw_ip.c:538
#9  sosend+0x645 sys/kern/uipc_socket.c:524
#10 sendit+0x52b sys/kern/uipc_syscalls.c:662
#11 sys_sendto+0x80 sys/kern/uipc_syscalls.c:527
#12 syscall+0x4a4 mi_syscall sys/sys/syscall_mi.h:92 [inline]
#12 syscall+0x4a4 sys/arch/amd64/amd64/trap.c:555
#13 Xsyscall+0x128
Process 71398 (syz-executor.1) thread 0xffff800020ac1160 (268839)
exclusive kernel_lock &kernel_lock r = 0 (0xffffffff82651ec8)
#0  witness_lock+0x52e sys/kern/subr_witness.c:1163
#1  syscall+0x400 mi_syscall sys/sys/syscall_mi.h:83 [inline]
#1  syscall+0x400 sys/arch/amd64/amd64/trap.c:555
#2  Xsyscall+0x128
exclusive mutex shmpl r = 0 (0xffffffff8263a130)
#0  witness_lock+0x52e sys/kern/subr_witness.c:1163
#1  mtx_enter_try+0x102
#2  mtx_enter+0x4b sys/kern/kern_lock.c:266
#3  pool_get+0xbf sys/kern/subr_pool.c:578
#4  shmget_allocate_segment+0x15e sys/kern/sysv_shm.c:405
#5  sys_shmget+0x13f sys/kern/sysv_shm.c:468
#6  syscall+0x4a4 mi_syscall sys/sys/syscall_mi.h:92 [inline]
#6  syscall+0x4a4 sys/arch/amd64/amd64/trap.c:555
#7  Xsyscall+0x128
Process 72476 (syz-executor.0) thread 0xffff800020ac0290 (65752)
exclusive rwlock netlock r = 0 (0xffffffff824c24a8)
#0  witness_lock+0x52e sys/kern/subr_witness.c:1163
#1  solock+0x5a sys/kern/uipc_socket2.c:282
#2  sosend+0x51b sys/kern/uipc_socket.c:512
#3  sendit+0x52b sys/kern/uipc_syscalls.c:662
#4  sys_sendto+0x80 sys/kern/uipc_syscalls.c:527
#5  syscall+0x4a4 mi_syscall sys/sys/syscall_mi.h:92 [inline]
#5  syscall+0x4a4 sys/arch/amd64/amd64/trap.c:555
#6  Xsyscall+0x128
ddb{0}> show malloc
           Type InUse  MemUse  HighUse   Limit  Requests Type Lim
         devbuf  9494   6469K    6982K  78643K     10731        0
            pcb    13      8K       8K  78643K        25        0
         rtable   108      3K       4K  78643K       229        0
         ifaddr    54     12K      12K  78643K        60        0
       counters    39     33K      33K  78643K        39        0
       ioctlops     0      0K       4K  78643K      1469        0
            iov     0      0K       2K  78643K         2        0
          mount     1      1K       1K  78643K         1        0
         vnodes  1232     77K      77K  78643K      1272        0
      UFS quota     1     32K      32K  78643K         1        0
      UFS mount     5     36K      36K  78643K         5        0
            shm     2      1K       5K  78643K         4        0
         VM map     2      1K       1K  78643K         2        0
            sem    10      0K       0K  78643K        14        0
        dirhash    12      2K       2K  78643K        12        0
           ACPI  1809    196K     290K  78643K     12766        0
      file desc     6     17K      25K  78643K        70        0
           proc    59     63K      83K  78643K       447        0
        subproc    32      2K       2K  78643K        34        0
    NFS srvsock     1      0K       0K  78643K         1        0
     NFS daemon     1     16K      16K  78643K         1        0
    ip_moptions     0      0K       0K  78643K        12        0
       in_multi    29      1K       2K  78643K        41        0
    ether_multi     1      0K       0K  78643K         1        0
    ISOFS mount     1     32K      32K  78643K         1        0
  MSDOSFS mount     1     16K      16K  78643K         1        0
           ttys    42    185K     185K  78643K        42        0
           exec     0      0K       1K  78643K       211        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   117     22K      26K  78643K      1164        0
       UVM aobj     2      2K       2K  78643K         4        0
        memdesc     1      4K       4K  78643K         1        0
    crypto data     1      1K       1K  78643K         1        0
    ip6_options     0      0K       0K  78643K         2        0
            NDP     8      0K       0K  78643K        13        0
           temp    83   3009K    3073K  78643K      6739        0
      SYN cache     2     16K      16K  78643K         2        0
ddb{0}> show all pools
Name      Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle
arp         64        6    0        0     1     0     1     1     0     8    0
plcache    128       20    0        0     1     0     1     1     0     8    0
rtpcb       80       25    0       23     1     0     1     1     0     8    0
rtentry    112       53    0        9     2     0     2     2     0     8    0
unpcb      120       43    0       32     1     0     1     1     0     8    0
syncache   264        4    0        4     1     1     0     1     0     8    0
tcpqe       32      256    0      256     1     0     1     1     0     8    1
tcpcb      544       40    0       36     1     0     1     1     0     8    0
inpcb      280      112    0      104     2     0     2     2     0     8    1
nd6         48        5    0        2     1     0     1     1     0     8    0
ppxss      1128       1    0        0     1     0     1     1     0     8    0
pffrag     232        3    0        2     1     0     1     1     0   482    0
pffrnode    88        3    0        2     1     0     1     1     0     8    0
pffrent     40      106    0       90     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       20    0        0     1     0     1     1     0     8    0
pfstkey    112       20    0        0     1     0     1     1     0     8    0
pfstate    328       20    0        0     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      249    0       45    14     0    14    14     0     8    0
art_table   32      250    0       45     2     0     2     2     0     8    0
art_node    16       52    0       11     1     0     1     1     0     8    0
sysvmsgpl   40        4    0        3     1     0     1     1     0     8    0
semupl     112        2    0        2     1     0     1     1     0     8    1
semapl     112        8    0        0     1     0     1     1     0     8    0
shmpl      112        2    0        2     1     0     1     1     0     8    1
pool(0xffffffff8263a120:shmpl): page inconsistency: page 0xfffffd8062243000; 34 on list, 0 missing, 35 items per page
dirhash    1024      17    0        0     3     0     3     3     0     8    0
dino1pl    128     1483    0       73    46     0    46    46     0     8    0
ffsino     272     1483    0       73    95     0    95    95     0     8    0
nchpl      144     1771    0      149    61     0    61    61     0     8    0
uvmvnodes   72     1568    0        0    29     0    29    29     0     8    0
vnodes     208     1568    0        0    83     0    83    83     0     8    0
namei      1024    4705    0     4705     1     0     1     1     0     8    1
percpumem   16       30    0        0     1     0     1     1     0     8    0
scxspl     192     5224    0     5224     2     1     1     2     0     8    1
plimitpl   152       17    0        9     1     0     1     1     0     8    0
sigapl     432      269    0      253     3     0     3     3     0     8    1
futexpl     56      907    0      907     1     0     1     1     0     8    1
knotepl    112       57    0       38     1     0     1     1     0     8    0
kqueuepl   104       10    0        8     1     0     1     1     0     8    0
pipepl     160      178    0      157     1     0     1     1     0     8    0
fdescpl    488      270    0      253     3     0     3     3     0     8    0
filepl     152     1563    0     1450     5     0     5     5     0     8    0
lockfpl    104       17    0       16     1     0     1     1     0     8    0
lockfspl    48        6    0        5     1     0     1     1     0     8    0
sessionpl  112       18    0        7     1     0     1     1     0     8    0
pgrppl      48       18    0        7     1     0     1     1     0     8    0
ucredpl     96      111    0      102     1     0     1     1     0     8    0
zombiepl   144      253    0      253     1     0     1     1     0     8    1
processpl  896      286    0      253     4     0     4     4     0     8    0
procpl     632      386    0      342     5     0     5     5     0     8    1
sosppl     128        3    0        3     1     0     1     1     0     8    1
sockpl     384      180    0      159     4     0     4     4     0     8    1
mcl64k     65536      1    0        0     1     0     1     1     0     8    0
mcl12k     12288      2    0        0     1     0     1     1     0     8    0
mcl8k      8192       1    0        0     1     0     1     1     0     8    0
mcl4k      4096       5    0        0     1     0     1     1     0     8    0
mcl2k      2048     171    0        0    21     0    21    21     0     8    0
mtagpl      80        4    0        0     1     0     1     1     0     8    0
mbufpl     256      378    0        0    24     0    24    24     0     8    0
bufpl      280     6330    0     1344   357     0   357   357     0     8    0
anonpl      16    48917    0    29820    90     1    89    89     0   125   12
amapchunkpl 152    1405    0     1245     8     0     8     8     0   158    1
amappl16   192     1502    0      454    62     4    58    62     0     8    5
amappl15   184       77    0       72     1     0     1     1     0     8    0
amappl14   176       31    0       30     1     0     1     1     0     8    0
amappl13   168       20    0       17     1     0     1     1     0     8    0
amappl12   160        2    0        1     2     1     1     1     0     8    0
amappl11   152       59    0       44     1     0     1     1     0     8    0
amappl10   144       16    0       12     1     0     1     1     0     8    0
amappl9    136      605    0      601     1     0     1     1     0     8    0
amappl8    128      125    0      101     1     0     1     1     0     8    0
amappl7    120      111    0       98     1     0     1     1     0     8    0
amappl6    112       57    0       50     1     0     1     1     0     8    0
amappl5    104      129    0      115     1     0     1     1     0     8    0
amappl4     96      521    0      488     2     1     1     2     0     8    0
amappl3     88      118    0      111     1     0     1     1     0     8    0
amappl2     80     1298    0     1212     3     1     2     3     0     8    0
amappl1     72    16281    0    15822    25    11    14    20     0     8    4
amappl      80      638    0      590     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        3    0        2     1     0     1     1     0     8    0
uaddrrnd    24      270    0      253     1     0     1     1     0     8    0
uaddrbest   32        2    0        0     1     0     1     1     0     8    0
uaddr       24      270    0      253     1     0     1     1     0     8    0
vmmpekpl   168     6046    0     6013     2     0     2     2     0     8    0
vmmpepl    168    42468    0    40144   137     5   132   132     0   357   30
vmsppl     368      269    0      253     2     0     2     2     0     8    0
pdppl      4096     547    0      506     6     0     6     6     0     8    0
pvpl        32   159731    0   137376   213     0   213   213     0   265   32
pmappl     232      269    0      253     2     0     2     2     0     8    1
extentpl    40       46    0       29     1     0     1     1     0     8    0
phpool     112      175    0        3     5     0     5     5     0     8    0

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/12/05 23:08 openbsd ce2d25888d00 98b4ef2d .config console log report ci-openbsd-multicore
* Struck through repros no longer work on HEAD.