diff options
author | Mian Yousaf Kaukab <[email protected]> | 2021-07-21 10:39:05 +0200 |
---|---|---|
committer | Herbert Xu <[email protected]> | 2021-07-30 10:58:36 +0800 |
commit | 0469dede0eeeefe12a9a2fd76078f4a266513457 (patch) | |
tree | 714132bd974449610e2ed5d847a6d08db3e45d7d /tools/perf/scripts/python/intel-pt-events.py | |
parent | d5ee8e750c9449e9849a09ce6fb6b8adeaa66adc (diff) |
crypto: ecc - handle unaligned input buffer in ecc_swap_digits
ecdsa_set_pub_key() makes an u64 pointer at 1 byte offset of the key.
This results in an unaligned u64 pointer. This pointer is passed to
ecc_swap_digits() which assumes natural alignment.
This causes a kernel crash on an armv7 platform:
[ 0.409022] Unhandled fault: alignment exception (0x001) at 0xc2a0a6a9
...
[ 0.416982] PC is at ecdsa_set_pub_key+0xdc/0x120
...
[ 0.491492] Backtrace:
[ 0.492059] [<c07c266c>] (ecdsa_set_pub_key) from [<c07c75d4>] (test_akcipher_one+0xf4/0x6c0)
Handle unaligned input buffer in ecc_swap_digits() by replacing
be64_to_cpu() to get_unaligned_be64(). Change type of in pointer to
void to reflect it doesn’t necessarily need to be aligned.
Fixes: 4e6602916bc6 ("crypto: ecdsa - Add support for ECDSA signature verification")
Reported-by: Guillaume Gardet <[email protected]>
Suggested-by: Takashi Iwai <[email protected]>
Signed-off-by: Mian Yousaf Kaukab <[email protected]>
Tested-by: Stefan Berger <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/intel-pt-events.py')
0 files changed, 0 insertions, 0 deletions