Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
dvyukov opened this issue Mar 27, 2015 · 1 comment
Closed

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

dvyukov opened this issue Mar 27, 2015 · 1 comment
Assignees
Milestone

Comments

@dvyukov
Copy link
Member

@dvyukov dvyukov commented Mar 27, 2015

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.

@dvyukov dvyukov added this to the Go1.5 milestone Mar 27, 2015
@dvyukov dvyukov added the repo-main label Mar 27, 2015
@robpike robpike closed this in 0c8fe34 Apr 7, 2015
@dvyukov
Copy link
Member Author

@dvyukov dvyukov commented Apr 8, 2015

Rob, you fixed only the first input. Second and third still crash.

@dvyukov dvyukov reopened this Apr 8, 2015
@robpike robpike closed this in d64617f Apr 9, 2015
@golang golang locked and limited conversation to collaborators Jun 25, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.