HomeFreeBSD

aesni: Avoid modifying session keys in hmac_update()

Description

aesni: Avoid modifying session keys in hmac_update()

Otherwise aesni_process() is not thread-safe for AES+SHA-HMAC
transforms, since hmac_update() updates the caller-supplied key directly
to create the derived key. Use a buffer on the stack to store a copy of
the key used for computing inner and outer digests.

This is a direct commit to stable/12 as the bug is not present in later
branches.

Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D30001

Details

Provenance
markjAuthored on Apr 27 2021, 12:04 AM
Reviewer
kib
Differential Revision
D30001: aesni: Avoid modifying session keys in hmac_update()
Parents
rG2414241b0e56: wlanstats: fix build
Branches
Unknown
Tags
Unknown