]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.18] encoding/gob: add a depth limit for ignored fields
authorRoland Shoemaker <bracewell@google.com>
Tue, 7 Jun 2022 20:00:43 +0000 (13:00 -0700)
committerMichael Knyszek <mknyszek@google.com>
Tue, 12 Jul 2022 15:06:49 +0000 (15:06 +0000)
commitfb979a50823e5a0575cf6166b3f17a13364cbf81
treec9dcb3ed77bdb63b03727183cd41be6bc6d63b78
parent5ebd862b1714dad1544bd10a24c47cdb53ad7f46
[release-branch.go1.18] encoding/gob: add a depth limit for ignored fields

Enforce a nesting limit of 10,000 for ignored fields during decoding
of messages. This prevents the possibility of triggering stack
exhaustion.

Fixes #53710
Updates #53615
Fixes CVE-2022-30635

Change-Id: I05103d06dd5ca3945fcba3c1f5d3b5a645e8fb0f
Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/1484771
Reviewed-by: Damien Neil <dneil@google.com>
Reviewed-by: Tatiana Bradley <tatianabradley@google.com>
(cherry picked from commit 55e8f938d22bfec29cc9dc9671044c5a41d1ea9c)
Reviewed-on: https://go-review.googlesource.com/c/go/+/417060
Reviewed-by: Tatiana Bradley <tatiana@golang.org>
Run-TryBot: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
src/encoding/gob/decode.go
src/encoding/gob/gobencdec_test.go