All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] wireguard: disable in FIPS mode
@ 2021-04-07 10:43 Hangbin Liu
  2021-04-07 11:38 ` Hangbin Liu
  0 siblings, 1 reply; 2+ messages in thread
From: Hangbin Liu @ 2021-04-07 10:43 UTC (permalink / raw)
  To: netdev
  Cc: Jason A . Donenfeld, Toke Høiland-Jørgensen,
	Jakub Kicinski, 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 <liuhangbin@gmail.com>
---
 drivers/net/wireguard/main.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/wireguard/main.c b/drivers/net/wireguard/main.c
index 7a7d5f1a80fc..8a9aaea7623c 100644
--- a/drivers/net/wireguard/main.c
+++ b/drivers/net/wireguard/main.c
@@ -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())
-- 
2.26.3


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net-next] wireguard: disable in FIPS mode
  2021-04-07 10:43 [PATCH net-next] wireguard: disable in FIPS mode Hangbin Liu
@ 2021-04-07 11:38 ` Hangbin Liu
  0 siblings, 0 replies; 2+ messages in thread
From: Hangbin Liu @ 2021-04-07 11:38 UTC (permalink / raw)
  To: netdev
  Cc: Jason A . Donenfeld, Toke Høiland-Jørgensen, Jakub Kicinski

On Wed, Apr 07, 2021 at 06:43:07PM +0800, Hangbin Liu wrote:
> 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 <liuhangbin@gmail.com>

Ondrej remind that I need to cc linux-crypto. I will resend the patch.

Thanks
Hangbin

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-04-07 11:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-07 10:43 [PATCH net-next] wireguard: disable in FIPS mode Hangbin Liu
2021-04-07 11:38 ` Hangbin Liu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.