wireguard: disable in FIPS mode
Subsystems (3)
PATCH 1/1 wireguard: disable in FIPS mode
As the cryptos(BLAKE2S, Curve25519, CHACHA20POLY1305) in WireGuard are not FIPS certified, the WireGuard module should be disabled in FIPS mode.
Signed-off-by Hangbin Liu <[email protected]>
--- drivers/net/wireguard/main.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/net/wireguard/main.c +4 -0
@@ -12,6 +12,7 @@#include <uapi/linux/wireguard.h> +#include <linux/fips.h> #include <linux/init.h> #include <linux/module.h> #include <linux/genetlink.h>
@@ -21,6 +22,9 @@ static int __init mod_init(void) {int ret; +if (fips_enabled) +return -EOPNOTSUPP ; +#ifdef DEBUG if (!wg_allowedips_selftest () || !wg_packet_counter_selftest () || !wg_ratelimiter_selftest ())
Signature · 1 line
2.26.3
Quoted 4 lines · Hangbin Liu
As the
cryptos(BLAKE2S, Curve25519, CHACHA20POLY1305)in WireGuard are not FIPS certified, the WireGuard module should be disabled in FIPS mode.Signed-off-by Hangbin Liu <[email protected]>
Ondrej remind that I need to cc linux-crypto. I will resend the patch.
Thanks
Hangbin