Skip to content
Commit 8bde1033 authored by Jo Van Bulck's avatar Jo Van Bulck Committed by Mikulas Patocka
Browse files

dm-integrity: fix non-constant-time tag verification



When using dm-integrity in standalone mode with a keyed hmac algorithm,
integrity tags are calculated and verified internally.

Using plain memcmp to compare the stored and computed tags may leak the
position of the first byte mismatch through side-channel analysis,
allowing to brute-force expected tags in linear time (e.g., by counting
single-stepping interrupts in confidential virtual machine environments).

Co-developed-by: default avatarLuca Wilke <work@luca-wilke.com>
Signed-off-by: default avatarLuca Wilke <work@luca-wilke.com>
Signed-off-by: default avatarJo Van Bulck <jo.vanbulck@cs.kuleuven.be>
Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
Cc: stable@vger.kernel.org
parent 5c5d0d70
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment