tor

The Tor anonymity network
git clone https://git.dasho.dev/tor.git
Log | Files | Refs | README | LICENSE

commit 02bd135cb188531e8a6ee95959d7fe1d7f9635a8
parent 1bdccc03a94c6f4af297d2114d3a237d33172f1f
Author: David Goulet <dgoulet@torproject.org>
Date:   Thu, 28 Jan 2021 12:36:35 -0500

Merge branch 'tor-gitlab/mr/243' into maint-0.3.5

Diffstat:
Achanges/bug40210 | 5+++++
Msrc/ext/keccak-tiny/keccak-tiny.h | 2+-
2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/changes/bug40210 b/changes/bug40210 @@ -0,0 +1,5 @@ + o Minor features (crypto): + - Fix undefined behavior on our Keccak library. The bug only appears on + platforms with 32-byte CPU cache lines (e.g. armv5tel) and would result + in wrong digests. Fixes bug 40210; bugfix on 0.2.8.1-alpha. Thanks to + Bernhard Übelacker, Arnd Bergmann and weasel for diagnosing this. diff --git a/src/ext/keccak-tiny/keccak-tiny.h b/src/ext/keccak-tiny/keccak-tiny.h @@ -21,7 +21,7 @@ typedef struct keccak_state { size_t offset; uint8_t finalized : 1; -} keccak_state; +} __attribute__((aligned(8))) keccak_state; /* Initialize a Keccak instance suitable for SHA-3 hash functions. */ int keccak_digest_init(keccak_state *s, size_t bits);