go/src/encoding
Roland Shoemaker fa8ff1a46d [release-branch.go1.23] encoding/gob: cover missed cases when checking ignore depth
This change makes sure that we are properly checking the ignored field
recursion depth in decIgnoreOpFor consistently. This prevents stack
exhaustion when attempting to decode a message that contains an
extremely deeply nested struct which is ignored.

Thanks to Md Sakib Anwar of The Ohio State University (anwar.40@osu.edu)
for reporting this issue.

Updates #69139
Fixes #69145
Fixes CVE-2024-34156

Change-Id: Iacce06be95a5892b3064f1c40fcba2e2567862d6
Reviewed-on: https://go-internal-review.googlesource.com/c/go/+/1440
Reviewed-by: Russ Cox <rsc@google.com>
Reviewed-by: Damien Neil <dneil@google.com>
(cherry picked from commit 9f2ea73c5f2a7056b7da5d579a485a7216f4b20a)
Reviewed-on: https://go-internal-review.googlesource.com/c/go/+/1581
Commit-Queue: Roland Shoemaker <bracewell@google.com>
Reviewed-by: Tatiana Bradley <tatianabradley@google.com>
Reviewed-on: https://go-review.googlesource.com/c/go/+/611176
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
TryBot-Bypass: Dmitri Shuralyov <dmitshur@google.com>
2024-09-05 14:55:14 +00:00
..
ascii85 encoding: modernize Go documentation 2023-09-08 19:04:28 +00:00
asn1 all: change from sort functions to slices functions where feasible 2024-05-23 01:00:11 +00:00
base32 encoding/base32: use correct length for unpadded buffer in Read 2024-05-14 16:25:54 +00:00
base64 encoding: modernize Go documentation 2023-09-08 19:04:28 +00:00
binary encoding/binary: use list format in docstrings 2024-07-16 18:17:30 +00:00
csv encoding/csv: clarify that Writer uses different line break than RFC 4180 by default 2024-05-13 21:32:28 +00:00
gob [release-branch.go1.23] encoding/gob: cover missed cases when checking ignore depth 2024-09-05 14:55:14 +00:00
hex encoding/hex: don't overallocate memory in DecodeString 2024-05-08 19:30:23 +00:00
json encoding/json: document compact json output in Encoder.Encode 2024-07-16 18:06:21 +00:00
pem all: change from sort functions to slices functions where feasible 2024-05-23 01:00:11 +00:00
xml all: fix a large number of comments 2024-03-26 19:58:28 +00:00
encoding.go encoding: document when marshaling methods can be added 2023-05-23 19:43:37 +00:00