netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] [RESEND] wireguard: disable in FIPS mode
@ 2021-04-07 11:39 Hangbin Liu
  2021-04-07 21:12 ` Eric Biggers
  2021-04-07 21:15 ` Jason A. Donenfeld
  0 siblings, 2 replies; 26+ messages in thread
From: Hangbin Liu @ 2021-04-07 11:39 UTC (permalink / raw)
  To: netdev
  Cc: Jason A . Donenfeld, Toke Høiland-Jørgensen,
	Jakub Kicinski, Ondrej Mosnacek, linux-crypto, 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] 26+ messages in thread

end of thread, other threads:[~2021-04-12 12:46 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-07 11:39 [PATCH net-next] [RESEND] wireguard: disable in FIPS mode Hangbin Liu
2021-04-07 21:12 ` Eric Biggers
2021-04-08  1:06   ` Hangbin Liu
2021-04-08 11:58     ` Hangbin Liu
2021-04-08 15:11       ` Eric Biggers
2021-04-09  2:11         ` Hangbin Liu
2021-04-09  7:08           ` Stephan Mueller
2021-04-09  8:08             ` Hangbin Liu
2021-04-09 16:26               ` Simo Sorce
2021-04-09 18:29               ` Jason A. Donenfeld
2021-04-12  2:11                 ` Hangbin Liu
2021-04-07 21:15 ` Jason A. Donenfeld
2021-04-08  6:52   ` Hangbin Liu
2021-04-08  7:36     ` Ondrej Mosnacek
2021-04-08 13:55   ` Simo Sorce
2021-04-08 21:55     ` Jason A. Donenfeld
2021-04-08 22:16       ` Simo Sorce
2021-04-09  2:41       ` Hangbin Liu
2021-04-09  2:44         ` Jason A. Donenfeld
2021-04-09  2:49           ` Hangbin Liu
2021-04-09  3:03             ` Jason A. Donenfeld
2021-04-09  6:02               ` Ard Biesheuvel
2021-04-09 12:47                 ` Simo Sorce
2021-04-09 18:36                   ` Jason A. Donenfeld
2021-04-09 18:56                     ` Simo Sorce
2021-04-12 12:46                       ` Simo Sorce

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).