mirror of
https://github.com/python/cpython.git
synced 2026-01-28 05:35:31 +00:00
This is a port of the applicable part of XKCP's fix [1] for
CVE-2022-37454 and avoids the segmentation fault and the infinite
loop in the test cases published in [2].
[1]: fdc6fef075
[2]: https://mouha.be/sha-3-buffer-overflow/
Regression test added by: Gregory P. Smith [Google LLC] <greg@krypto.org>
(cherry picked from commit 0e4e058602d93b88256ff90bbef501ba20be9dd3)
Co-authored-by: Theo Buehler <botovq@users.noreply.github.com>
Keccak Code Package =================== The files in kcp are taken from the Keccak Code Package. They have been slightly to be C89 compatible. The architecture specific header file KeccakP-1600-SnP.h ha been renamed to KeccakP-1600-SnP-opt32.h or KeccakP-1600-SnP-opt64.h. The 64bit files were generated with generic64lc/libkeccak.a.pack target, the 32bit files with generic32lc/libkeccak.a.pack.