]> Cypherpunks repositories - gostls13.git/commit
encoding/xml: prevent infinite loop while decoding
authorKatie Hockman <katie@golang.org>
Mon, 1 Mar 2021 14:54:00 +0000 (09:54 -0500)
committerFilippo Valsorda <filippo@golang.org>
Wed, 10 Mar 2021 18:19:03 +0000 (18:19 +0000)
commitd0b79e3513a29628f3599dc8860666b6eed75372
tree460190eb75902eeef668a9d36fb035e369998844
parentcd3b4ca9f20fd14187ed4cdfdee1a02ea87e5cd8
encoding/xml: prevent infinite loop while decoding

This change properly handles a TokenReader which
returns an EOF in the middle of an open XML
element.

Thanks to Sam Whited for reporting this.

Fixes CVE-2021-27918
Fixes #44913

Change-Id: Id02a3f3def4a1b415fa2d9a8e3b373eb6cb0f433
Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/1004594
Reviewed-by: Russ Cox <rsc@google.com>
Reviewed-by: Roland Shoemaker <bracewell@google.com>
Reviewed-by: Filippo Valsorda <valsorda@google.com>
Reviewed-on: https://go-review.googlesource.com/c/go/+/300391
Trust: Katie Hockman <katie@golang.org>
Run-TryBot: Katie Hockman <katie@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Alexander Rakoczy <alex@golang.org>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
src/encoding/xml/xml.go
src/encoding/xml/xml_test.go