Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(4107)

Issue 11094044: code review 11094044: goprotobuf: fix integer overflows.

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 9 months ago by agl1
Modified:
10 years, 9 months ago
Reviewers:
dsymonds
CC:
dsymonds, golang-dev
Visibility:
Public.

Description

goprotobuf: fix integer overflows. 1) It's possible to panic the decoder by overflowing a length check. 2) (minor) the decoder was silently truncating varints that were larger than 64 bits. This isn't strictly a problem, but it could lead to a situation where a different decoder could decode a given message differently. Thus, if the message was vetted by one decoder and processed by another, an attacker could exploit this difference.

Patch Set 1 #

Patch Set 2 : diff -r c31cbc77cd48 https://code.google.com/p/goprotobuf #

Patch Set 3 : diff -r c31cbc77cd48 https://code.google.com/p/goprotobuf #

Patch Set 4 : diff -r c31cbc77cd48 https://code.google.com/p/goprotobuf #

Unified diffs Side-by-side diffs Delta from patch set Stats (+39 lines, -11 lines) Patch
M proto/all_test.go View 1 1 chunk +14 lines, -0 lines 0 comments Download
M proto/decode.go View 1 2 11 chunks +25 lines, -11 lines 0 comments Download

Messages

Total messages: 4
agl1
Hello golang-dev@googlegroups.com (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://code.google.com/p/goprotobuf
10 years, 9 months ago (2013-07-10 13:17:46 UTC) #1
nigeltao
10 years, 9 months ago (2013-07-11 02:38:02 UTC) #2
dsymonds
LGTM
10 years, 9 months ago (2013-07-13 04:53:48 UTC) #3
dsymonds
10 years, 9 months ago (2013-07-13 04:55:35 UTC) #4
*** Submitted as
https://code.google.com/p/goprotobuf/source/detail?r=efc3fe235756 ***

goprotobuf: fix integer overflows.

1) It's possible to panic the decoder by overflowing a length check.

2) (minor) the decoder was silently truncating varints that were larger than 64
bits. This isn't strictly a problem, but it could lead to a situation where a
different decoder could decode a given message differently. Thus, if the message
was vetted by one decoder and processed by another, an attacker could exploit
this difference.

R=dsymonds
CC=golang-dev
https://codereview.appspot.com/11094044

Committer: David Symonds <dsymonds@golang.org>
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b