cpython/Modules/_sha3
Theo Buehler 0e4e058602
[3.10] gh-98517: Fix buffer overflows in _sha3 module (#98519)
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>
2022-10-21 12:26:01 -07:00
..
clinic bpo-9216: Add usedforsecurity to hashlib constructors (GH-16044) 2019-09-12 19:30:00 -05:00
kcp [3.10] gh-98517: Fix buffer overflows in _sha3 module (#98519) 2022-10-21 12:26:01 -07:00
cleanup.py closes bpo-35643: Fix a SyntaxWarning: invalid escape sequence in Modules/_sha3/cleanup.py (GH-11411) 2019-01-02 11:26:57 -08:00
README.txt Issue #16113: Add SHA-3 and SHAKE support to hashlib module. 2016-09-07 11:58:24 +02:00
sha3module.c bpo-36515: Disable unaligned memory access in _sha3 on ARM (GH-25927) 2021-05-05 15:05:22 -07:00

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.