Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 736156 (CVE-2020-16845) - <dev-lang/go-{1.13.15, 1.14.7}: ReadUvarint and ReadVarint can read an unlimited number of bytes from invalid inputs (CVE-2020-16845)
Summary: <dev-lang/go-{1.13.15, 1.14.7}: ReadUvarint and ReadVarint can read an unlimi...
Status: RESOLVED FIXED
Alias: CVE-2020-16845
Product: Gentoo Security
Classification: Unclassified
Component: Vulnerabilities (show other bugs)
Hardware: All Linux
: Normal minor (vote)
Assignee: Gentoo Security
URL: https://github.com/golang/go/issues/4...
Whiteboard: B3 [noglsa cve]
Keywords:
Depends on:
Blocks:
 
Reported: 2020-08-06 17:13 UTC by Sam James
Modified: 2020-08-07 17:23 UTC (History)
1 user (show)

See Also:
Package list:
dev-lang/go-1.13.15 dev-lang/go-1.14.7
Runtime testing required: ---
nattka: sanity-check+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-08-06 17:13:25 UTC
"We have just released Go 1.14.7 and Go 1.13.15 to address a recently reported security issue. We recommend that all users update to one of these releases (if you’re not sure which, choose Go 1.14.7).
encoding/binary: ReadUvarint and ReadVarint can read an unlimited number of bytes from invalid inputs
Certain invalid inputs to ReadUvarint or ReadVarint could cause those functions to read an unlimited number of bytes from the ByteReader argument before returning an error. This could lead to processing more input than expected when the caller is reading directly from a network and depends on ReadUvarint and ReadVarint only consuming a small, bounded number of bytes, even from invalid inputs.

With the update, ReadUvarint and ReadVarint now always return after consuming a bounded number of bytes (specifically, MaxVarintLen64, which is 10). The result being returned has not changed; the functions merely detect and return some errors without reading as much input.

Thanks to Diederik Loerakker, Jonny Rhea, Raúl Kripalani, and Preston Van Loon for reporting this issue.

This issue is CVE-2020-16845 and Go issue golang.org/issue/40618."
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-08-06 17:14:58 UTC
Please bump to 1.13.15, 1.14.7.
Comment 2 Larry the Git Cow gentoo-dev 2020-08-06 18:52:25 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e5e8abfb9b2973e4b4f99b61b6b999184c0df9a5

commit e5e8abfb9b2973e4b4f99b61b6b999184c0df9a5
Author:     William Hubbs <williamh@gentoo.org>
AuthorDate: 2020-08-06 18:50:41 +0000
Commit:     William Hubbs <williamh@gentoo.org>
CommitDate: 2020-08-06 18:52:19 +0000

    dev-lang/go: mark 1.13.15 and 1.14.7 stable on amd64 for security
    
    Bug: https://bugs.gentoo.org/736156
    Signed-off-by: William Hubbs <williamh@gentoo.org>

 dev-lang/go/go-1.13.15.ebuild | 2 +-
 dev-lang/go/go-1.14.7.ebuild  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7047696d1eb4be0e320b3482e74a9473fae62f46

commit 7047696d1eb4be0e320b3482e74a9473fae62f46
Author:     William Hubbs <williamh@gentoo.org>
AuthorDate: 2020-08-06 18:47:47 +0000
Commit:     William Hubbs <williamh@gentoo.org>
CommitDate: 2020-08-06 18:52:19 +0000

    dev-lang/go: 1.14.7 security bump
    
    Bug: https://bugs.gentoo.org/736156
    Signed-off-by: William Hubbs <williamh@gentoo.org>

 dev-lang/go/Manifest         |   1 +
 dev-lang/go/go-1.14.7.ebuild | 188 +++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 189 insertions(+)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c3937ad23fc8918c53bd0266017838adb2d35e06

commit c3937ad23fc8918c53bd0266017838adb2d35e06
Author:     William Hubbs <williamh@gentoo.org>
AuthorDate: 2020-08-06 18:39:14 +0000
Commit:     William Hubbs <williamh@gentoo.org>
CommitDate: 2020-08-06 18:52:18 +0000

    dev-lang/go: 1.13.15 security bump
    
    Bug: https://bugs.gentoo.org/736156
    Signed-off-by: William Hubbs <williamh@gentoo.org>

 dev-lang/go/Manifest          |   1 +
 dev-lang/go/go-1.13.15.ebuild | 197 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 198 insertions(+)
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-08-06 20:58:10 UTC
arm done
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-08-06 21:09:27 UTC
arm64 done
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-08-07 02:00:14 UTC
x86 done
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-08-07 02:47:15 UTC
ppc64 done

all arches done
Comment 7 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-08-07 02:48:26 UTC
Please cleanup.
Comment 8 Larry the Git Cow gentoo-dev 2020-08-07 17:15:15 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a021d8bf00b7cf1a4a4cab5855ecc8c3689bae5a

commit a021d8bf00b7cf1a4a4cab5855ecc8c3689bae5a
Author:     William Hubbs <williamh@gentoo.org>
AuthorDate: 2020-08-07 17:12:13 +0000
Commit:     William Hubbs <williamh@gentoo.org>
CommitDate: 2020-08-07 17:15:10 +0000

    dev-lang/go: remove vulnerable versions
    
    Bug: https://bugs.gentoo.org/736156
    Signed-off-by: William Hubbs <williamh@gentoo.org>

 dev-lang/go/Manifest          |   4 -
 dev-lang/go/go-1.13.13.ebuild | 197 ------------------------------------------
 dev-lang/go/go-1.13.14.ebuild | 197 ------------------------------------------
 dev-lang/go/go-1.14.5.ebuild  | 188 ----------------------------------------
 dev-lang/go/go-1.14.6.ebuild  | 188 ----------------------------------------
 5 files changed, 774 deletions(-)
Comment 9 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-08-07 17:23:02 UTC
Thanks William.

GLSA vote: no.

Closing.