Skip to content

encoding/gob: makeslice: len out of range #10273

Closed
@dvyukov

Description

@dvyukov

The following modest-size inputs either crash encoding/gob or equally can be used to make a server allocate a huge chunk of memory and die due to swapping:
http://play.golang.org/p/OX1r_k14v4
http://play.golang.org/p/f3h2HfdIDD
http://play.golang.org/p/pPZcalWmMF

The issue happens in various "ignore" functions:
encoding/gob.ignoreUint8Array(0x104351c0, 0x10435200, 0x0, 0x0, 0x0, 0xc00)
encoding/gob.(_Decoder).ignoreInterface(0x1040e320, 0x104351c0)
encoding/gob.(_Decoder).ignoreGobDecoder(0x1040e320, 0x10435920)
There can be others as well.

Happens with both go14 (playground) and tip.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions