diff options
author | David Goulet <dgoulet@torproject.org> | 2020-12-17 08:25:29 -0500 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2020-12-17 08:25:29 -0500 |
commit | 34ac582f470532f37460f4679f4cc88840b0941d (patch) | |
tree | b474e6918db8d03fb760b6b008dc2ec06bbfb97f | |
parent | 649ca08dd9f36b6d71034203a1fe8b57629a1665 (diff) | |
parent | d45354d5eabe064cd3a195dc439d1ae90b6732aa (diff) | |
download | tor-34ac582f470532f37460f4679f4cc88840b0941d.tar.gz tor-34ac582f470532f37460f4679f4cc88840b0941d.zip |
Merge branch 'maint-0.4.5' into release-0.4.5
-rw-r--r-- | changes/bug40210 | 5 | ||||
-rw-r--r-- | src/ext/keccak-tiny/keccak-tiny.h | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/changes/bug40210 b/changes/bug40210 new file mode 100644 index 0000000000..f492262a11 --- /dev/null +++ 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 index a9c8ed6420..dd26386a9a 100644 --- 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); |