]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.17] encoding/xml: limit depth of nesting in unmarshal
authorRoland Shoemaker <roland@golang.org>
Tue, 29 Mar 2022 22:52:09 +0000 (15:52 -0700)
committerMichael Knyszek <mknyszek@google.com>
Tue, 12 Jul 2022 15:20:25 +0000 (15:20 +0000)
commit2678d0c957193dceef336c969a9da74dd716a827
tree6db6a3c0e877a290cd403c60d6ddb1936141f02f
parent58facfbe7db2fbb9afed794b281a70bdb12a60ae
[release-branch.go1.17] encoding/xml: limit depth of nesting in unmarshal

Prevent exhausting the stack limit when unmarshalling extremely deeply
nested structures into nested types.

Fixes #53715
Updates #53611
Fixes CVE-2022-30633

Change-Id: Ic6c5d41674c93cfc9a316135a408db9156d39c59
Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/1421319
Reviewed-by: Damien Neil <dneil@google.com>
Reviewed-by: Julie Qiu <julieqiu@google.com>
(cherry picked from commit ebee00a55e28931b2cad0e76207a73712b000432)
Reviewed-on: https://go-review.googlesource.com/c/go/+/417069
Reviewed-by: Heschi Kreinick <heschi@google.com>
Run-TryBot: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
src/encoding/xml/read.go
src/encoding/xml/read_test.go