From: Steffan Karger Date: Tue, 29 Apr 2014 20:13:03 +0000 (+0200) Subject: Use constant time memcmp() when comparing packet HMACs. X-Git-Tag: release-1.0.24~12 X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=commitdiff_plain;h=c9084dfa2654349efcaffd51f120399f903f756a;hp=c9084dfa2654349efcaffd51f120399f903f756a;ds=sidebyside Use constant time memcmp() when comparing packet HMACs. This eliminates a timing side channel vulnerability, which could potentially allow an attacker to compute a valid HMAC, and insert arbitrary ciphertext data into the connection. If an attacker also identifies packets with a plaintext it can guess (e.g. small packets every 1s are probably pings), the attacker can xor the ciphertext to mangle the packet to arbitrary plaintext. Although this type of attack is rarely seen in the wild, it is generally considered technically viable. Signed-off-by: Steffan Karger ---