From: Tom Rini Date: Fri, 17 Jul 2020 16:57:43 -0400 Subject: [PATCH] lib: zlib: Remove offset pointer optimization in inftrees.c In-Reply-To: <20200624083108.47733-1-ley.foon.tan@intel.com> References: <20200624083108.47733-1-ley.foon.tan@intel.com> Message-ID: <20200717205743.GU6227@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Wed, Jun 24, 2020 at 04:31:08PM +0800, Ley Foon Tan wrote: > From: Chin Liang See > > This fixes the CVE-2016-9840. Commit imported from [1]. > > inftrees.c was subtracting an offset from a pointer to an array, > in order to provide a pointer that allowed indexing starting at > the offset. This is not compliant with the C standard, for which > the behavior of a pointer decremented before its allocated memory > is undefined. Per the recommendation of a security audit of the > zlib code by Trail of Bits and TrustInSoft, in support of the > Mozilla Foundation, this tiny optimization was removed, in order > to avoid the possibility of undefined behavior. > > [1]: https://github.com/madler/zlib/commit/6a043145ca6e9c55184013841a67b2fef87e44c0 > > Signed-off-by: Mark Adler > Signed-off-by: Chin Liang See > Signed-off-by: Ley Foon Tan Applied to u-boot/master, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: