syzbot


panic: mallocarray: overflow ADDR * 8

Status: closed as dup on 2019/01/27 21:51
Reported-by: syzbot+1632ffc147e7585697a8@syzkaller.appspotmail.com
First crash: 1462d, last: 1400d
Duplicate of (1):
Title Repro Cause bisect Fix bisect Count Last Reported
panic: malloc: allocation too large, type = 2, size = ADDR C 914 1400d 1463d

Sample crash report:
login: panic: mallocarray: overflow 18446744071562067968 * 8
Stopped at      db_enter+0x18:  addq    $0x8,%rsp
    TID    PID    UID     PRFLAGS     PFLAGS  CPU  COMMAND
*211443  73897      0         0x2          0    0  syz-executor2444
db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:399
panic() at panic+0x154 sys/kern/subr_prf.c:208
mallocarray(6272ade2300c7486,7fffffff,80000000,82) at mallocarray+0xec
wsmux_getmux(19d433a91bf8ed67) at wsmux_getmux+0x6f sys/dev/wscons/wsmux.c:135
wsmux_do_ioctl(1ea22aad786082f4,80085761,fffffd80355b18a0,82,fffffd803f7c7ba0) a
t wsmux_do_ioctl+0x268
VOP_IOCTL(4100270dde7ab8cb,80085761,fffffd80361ca0f8,ffff80001496c268,fffffd80355b18a0,ffff80001496c268) at VOP_IOCTL+0x80 sys/kern/vfs_vops.c:290
vn_ioctl(b72d78449c0c7fe6,fffffd80361ca0f8,ffff80001496c268,8) at vn_ioctl+0xc5 sys/kern/vfs_vnops.c:512
sys_ioctl(10a1d4d71c3c052c,2,ffff80001496c268) at sys_ioctl+0x639
syscall(3a6a3d0078531698) at syscall+0x528
Xsyscall(6,0,7f7ffffdbbd8,0,1,7f7ffffdbbe8) at Xsyscall+0x128
end of kernel
end trace frame: 0x7f7ffffdbb70, 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> 
ddb> set $lines = 0
ddb> show panic
mallocarray: overflow 18446744071562067968 * 8
ddb> trace
db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:399
panic() at panic+0x154 sys/kern/subr_prf.c:208
mallocarray(6272ade2300c7486,7fffffff,80000000,82) at mallocarray+0xec
wsmux_getmux(19d433a91bf8ed67) at wsmux_getmux+0x6f sys/dev/wscons/wsmux.c:135
wsmux_do_ioctl(1ea22aad786082f4,80085761,fffffd80355b18a0,82,fffffd803f7c7ba0) at wsmux_do_ioctl+0x268 wsmux_add_mux sys/dev/wscons/wsmux.c:563 [inline]
wsmux_do_ioctl(1ea22aad786082f4,80085761,fffffd80355b18a0,82,fffffd803f7c7ba0) at wsmux_do_ioctl+0x268 sys/dev/wscons/wsmux.c:424
VOP_IOCTL(4100270dde7ab8cb,80085761,fffffd80361ca0f8,ffff80001496c268,fffffd80355b18a0,ffff80001496c268) at VOP_IOCTL+0x80 sys/kern/vfs_vops.c:290
vn_ioctl(b72d78449c0c7fe6,fffffd80361ca0f8,ffff80001496c268,8) at vn_ioctl+0xc5 sys/kern/vfs_vnops.c:512sys_ioctl(10a1d4d71c3c052c,2,ffff80001496c268) at sys_ioctl+0x639
syscall(3a6a3d0078531698) at syscall+0x528
Xsyscall(6,0,7f7ffffdbbd8,0,1,7f7ffffdbbe8) at Xsyscall+0x128
end of kernel
end trace frame: 0x7f7ffffdbb70, count: -10
ddb> show registers
rdi                                0
rsi                              0x1
rbp               0xffff8000149a3b40
rbx               0xffff8000149a3be0
rdx                             0x8b
rcx                              0x1
rax                              0x1
r8                0xffffffff813e1344    kprintf+0x184
r9                               0x1
r10               0xf1904ef1063f3204
r11               0xeceda87443a9fab4
r12                     0x3000000008
r13               0xffff8000149a3b50
r14                            0x100
r15                              0x1
rip               0xffffffff8111eb78    db_enter+0x18
cs                               0x8
rflags                         0x246
rsp               0xffff8000149a3b30
ss                              0x10
db_enter+0x18:  addq    $0x8,%rsp
ddb> show proc
PROC (syz-executor2444) pid=211443 stat=onproc
    flags process=2<EXEC> proc=0
    pri=50, usrpri=50, nice=20
    forw=0xffffffffffffffff, list=0xffff80001496c970,0xffffffff82229718
    process=0xffff8000ffff73c0 user=0xffff80001499f000, vmspace=0xfffffd803f015210
    estcpu=0, cpticks=0, pctcpu=0.0
    user=0, sys=0, intr=0
ddb> ps
   PID     TID   PPID    UID  S       FLAGS  WAIT          COMMAND
*73897  211443  32311      0  7         0x2                syz-executor2444
 32311  479400   9047      0  3    0x10008a  pause         ksh
  9047  312248  30285      0  3        0x92  select        sshd
 48289  132453      1      0  3    0x100083  ttyin         getty
 30285  349563      1      0  3        0x80  select        sshd
   108  187453  84761     73  3    0x100090  kqread        syslogd
 84761  396966      1      0  3    0x100082  netio         syslogd
 27777   98359      1     77  3    0x100090  poll          dhclient
 61280  342652      1      0  3        0x80  poll          dhclient
 57114  460914      0      0  3     0x14200  pgzero        zerothread
 86401  182935      0      0  3     0x14200  aiodoned      aiodoned
 57196   21747      0      0  3     0x14200  syncer        update
 17205  347434      0      0  3     0x14200  cleaner       cleaner
 62155  130196      0      0  3     0x14200  reaper        reaper
 81790  389862      0      0  3     0x14200  pgdaemon      pagedaemon
 63064   94284      0      0  3     0x14200  bored         crynlk
 54065  293878      0      0  3     0x14200  bored         crypto
 60252   14071      0      0  3  0x40014200  acpi0         acpi0
 97731  173904      0      0  3     0x14200  bored         softnet
 81814  495473      0      0  3     0x14200  bored         systqmp
 32188  304465      0      0  3     0x14200  bored         systq
 96910  218540      0      0  3  0x40014200  bored         softclock
 98254  208307      0      0  3  0x40014200                idle0
     1  266194      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    23      9K       9K  78643K        55        0        0
         rtable    61      1K       2K  78643K       115        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      1172        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  1777    193K     286K  78643K     12501        0        0
      file desc     1      0K       0K  78643K         1        0        0
           proc    40     30K      38K  78643K       201        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       149        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       649        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   2327K    2391K  78643K      1690        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     2     1     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     1383    0       18    45     0    45    45     0     8    0
ffsino     240     1383    0       18    81     0    81    81     0     8    0
nchpl      144     1554    0       30    57     0    57    57     0     8    0
uvmvnodes   72     1392    0        0    26     0    26    26     0     8    0
vnodes     200     1392    0        0    74     0    74    74     0     8    0
namei      1024    3257    0     3257     3     2     1     1     0     8    1
scxspl     192     2337    0     2337     8     7     1     6     0     8    1
sigapl     432      173    0      163     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      114    0      107     3     2     1     1     0     8    0
fdescpl    424      174    0      163     2     0     2     2     0     8    0
filepl     120      808    0      765     2     0     2     2     0     8    0
lockfpl     96        7    0        6     2     1     1     1     0     8    0
lockfspl    24        4    0        3     2     1     1     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      163    0      163     3     2     1     1     0     8    1
processpl  840      187    0      163     4     1     3     4     0     8    0
procpl     600      187    0      163     3     0     3     3     0     8    0
sockpl     384       64    0       48     2     0     2     2     0     8    0
mcl4k      4096      10    0       10     2     1     1     1     0     8    1
mcl2k      2048    5504    0     5476     6     0     6     6     0     8    2
mtagpl      80        2    0        2     1     1     0     1     0     8    0
mbufpl     256     9452    0     9415     6     2     4     4     0     8    1
bufpl      256     1997    0      261   109     0   109   109     0     8    0
anonpl      16    16659    0    15558     7     2     5     7     0    62    0
amapchunkpl 152     491    0      456     2     0     2     2     0   158    0
amappl16   192       67    0       62     1     0     1     1     0     8    0
amappl15   184        1    0        0     1     0     1     1     0     8    0
amappl14   176        1    0        1     1     1     0     1     0     8    0
amappl13   168       15    0       12     1     0     1     1     0     8    0
amappl12   160        6    0        6     2     1     1     1     0     8    1
amappl11   152      172    0      163     1     0     1     1     0     8    0
amappl10   144       45    0       44     1     0     1     1     0     8    0
amappl9    136      193    0      192     1     0     1     1     0     8    0
amappl8    128      101    0       95     1     0     1     1     0     8    0
amappl7    120       30    0       26     1     0     1     1     0     8    0
amappl6    112       42    0       38     1     0     1     1     0     8    0
amappl5    104      154    0      143     1     0     1     1     0     8    0
amappl4     96      252    0      234     1     0     1     1     0     8    0
amappl3     88      111    0      106     1     0     1     1     0     8    0
amappl2     80      552    0      517     1     0     1     1     0     8    0
amappl1     72    11524    0    11133    16     6    10    16     0     8    0
amappl      72      366    0      347     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      174    0      163     1     0     1     1     0     8    0
uaddrbest   32        2    0        0     1     0     1     1     0     8    0
uaddr       24      174    0      163     1     0     1     1     0     8    0
vmmpekpl   168     5174    0     5160     1     0     1     1     0     8    0
vmmpepl    168    23283    0    22593    53    19    34    47     0   357    2
vmsppl     264      173    0      163     1     0     1     1     0     8    0
pdppl      4096     354    0      326     5     0     5     5     0     8    0
pvpl        32    69777    0    67046    36    10    26    26     0   265    3
pmappl     192      173    0      163     1     0     1     1     0     8    0
extentpl    40       39    0       25     1     0     1     1     0     8    0
phpool     112      225    0        7     7     0     7     7     0     8    0
ddb> 

Crashes (234):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets Title
ci-openbsd-main 2019/01/27 21:11 openbsd 269c2856b78e c73f090a .config console log report syz C
ci-openbsd-main 2019/03/30 13:13 openbsd 67caf7119898 c35ee0ea .config console log report
ci-openbsd-main 2019/03/30 11:35 openbsd 67caf7119898 c35ee0ea .config console log report
ci-openbsd-multicore 2019/03/29 20:26 openbsd 20a5560209a4 c35ee0ea .config console log report
ci-openbsd-multicore 2019/03/28 22:09 openbsd 8423d6adca2c 14c58f8d .config console log report
ci-openbsd-main 2019/03/28 12:50 openbsd 7ac074f6b41e f94f56fe .config console log report
ci-openbsd-multicore 2019/03/28 06:00 openbsd c95a22197bfd f94f56fe .config console log report
ci-openbsd-multicore 2019/03/27 07:45 openbsd ad597a5fc5a3 55684ce1 .config console log report
ci-openbsd-main 2019/03/27 04:00 openbsd 6baecefef8fe 55684ce1 .config console log report
ci-openbsd-multicore 2019/03/26 14:51 openbsd 6a51f920f2c9 55684ce1 .config console log report
ci-openbsd-multicore 2019/03/26 12:41 openbsd 6a51f920f2c9 55684ce1 .config console log report
ci-openbsd-main 2019/03/26 09:48 openbsd 6a51f920f2c9 55684ce1 .config console log report
ci-openbsd-main 2019/03/26 08:18 openbsd 6a51f920f2c9 55684ce1 .config console log report
ci-openbsd-multicore 2019/03/25 08:20 openbsd b3dbd5f2ca08 2c86e0a5 .config console log report
ci-openbsd-main 2019/03/25 04:26 openbsd b3dbd5f2ca08 2c86e0a5 .config console log report
ci-openbsd-main 2019/03/25 03:44 openbsd b3dbd5f2ca08 2c86e0a5 .config console log report
ci-openbsd-main 2019/03/25 00:59 openbsd b3dbd5f2ca08 2c86e0a5 .config console log report
ci-openbsd-multicore 2019/03/24 19:21 openbsd d42c39d7dcd1 acbc5b7d .config console log report
ci-openbsd-main 2019/03/24 09:22 openbsd d42c39d7dcd1 acbc5b7d .config console log report
ci-openbsd-multicore 2019/03/24 00:57 openbsd c610539b3c4a a2cef203 .config console log report
ci-openbsd-multicore 2019/03/23 17:51 openbsd c610539b3c4a a2cef203 .config console log report
ci-openbsd-main 2019/03/23 16:22 openbsd c610539b3c4a a2cef203 .config console log report
ci-openbsd-multicore 2019/03/23 14:27 openbsd 8ed1f8bf5951 3361bde5 .config console log report
ci-openbsd-main 2019/03/23 11:04 openbsd 8ed1f8bf5951 3361bde5 .config console log report
ci-openbsd-multicore 2019/03/23 05:47 openbsd 8ed1f8bf5951 3361bde5 .config console log report
ci-openbsd-multicore 2019/03/22 19:49 openbsd 9c1f1fecff88 028c0951 .config console log report
ci-openbsd-multicore 2019/03/22 18:10 openbsd 9c1f1fecff88 028c0951 .config console log report
ci-openbsd-main 2019/03/22 10:49 openbsd 31520b764003 dce6e62f .config console log report
ci-openbsd-main 2019/03/22 08:13 openbsd 31520b764003 dce6e62f .config console log report
ci-openbsd-main 2019/03/22 04:06 openbsd 31520b764003 dce6e62f .config console log report
ci-openbsd-main 2019/03/22 03:01 openbsd 31520b764003 dce6e62f .config console log report
ci-openbsd-main 2019/03/21 03:28 openbsd db552f66a6b6 427ea487 .config console log report
ci-openbsd-multicore 2019/03/20 20:04 openbsd 180e3f4c9de8 142c38ee .config console log report
ci-openbsd-main 2019/03/20 17:36 openbsd 180e3f4c9de8 142c38ee .config console log report
ci-openbsd-main 2019/03/20 15:51 openbsd 180e3f4c9de8 142c38ee .config console log report
ci-openbsd-multicore 2019/03/20 09:32 openbsd 6a543b343b5b 2458c1c6 .config console log report
ci-openbsd-main 2019/03/20 06:54 openbsd 6a543b343b5b 2458c1c6 .config console log report
ci-openbsd-main 2019/03/19 19:58 openbsd a5f4ee4e3f8f e4549234 .config console log report
ci-openbsd-main 2019/03/19 18:15 openbsd a5f4ee4e3f8f e4549234 .config console log report
ci-openbsd-multicore 2019/03/19 16:46 openbsd a5f4ee4e3f8f e4549234 .config console log report
ci-openbsd-main 2019/03/19 05:41 openbsd e6d0a5bd63d6 46264c32 .config console log report
ci-openbsd-multicore 2019/03/18 18:26 openbsd 5f6e3232931a 4656beca .config console log report
ci-openbsd-main 2019/03/18 15:42 openbsd 5f6e3232931a 4656beca .config console log report
ci-openbsd-multicore 2019/03/18 06:43 openbsd 990bad0aa091 f8757044 .config console log report
ci-openbsd-multicore 2019/03/18 01:24 openbsd 990bad0aa091 f8757044 .config console log report
ci-openbsd-main 2019/03/17 23:48 openbsd 990bad0aa091 f8757044 .config console log report
ci-openbsd-pf 2019/03/05 10:55 openbsd da8fceb276ba 3419571c .config console log report
ci-openbsd-main 2019/01/27 20:53 openbsd 269c2856b78e c73f090a .config console log report
* Struck through repros no longer work on HEAD.