Commit e7bcb67c authored by Jo Van Bulck's avatar Jo Van Bulck Committed by Greg Kroah-Hartman
Browse files

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



commit 8bde1033 upstream.

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
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5a5f6f88
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment