summaryrefslogtreecommitdiff
path: root/lib/geom
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2019-05-23 22:31:55 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2019-05-23 22:31:55 +0000
commit5c420aae3b18027809507dc9142182d4290897bf (patch)
treee9574a615797c094b572773debe2d561e3a77e3d /lib/geom
parentc2fd516f3a41c59330b961f4a4cb62d64f4b1021 (diff)
downloadsrc-test-5c420aae3b18027809507dc9142182d4290897bf.tar.gz
src-test-5c420aae3b18027809507dc9142182d4290897bf.zip
Add deprecation warnings for weaker algorithms to geli(4).
- Triple DES has been formally deprecated in Kerberos (RFC 8429) and is soon to be deprecated in IPsec (RFC 8221). - Blowfish is deprecated. FreeBSD doesn't support its successor (Twofish). - MD5 is generally considered a weak digest that has known attacks. geli refuses to create new volumes using these algorithms via 'geli init'. It also warns when attaching to existing volumes or creating temporary volumes via 'geli onetime' . The plan is to fully remove support for these algorithms in FreeBSD 13. Note that none of these algorithms have ever been the default algorithm used by geli(8). Users would have had to explicitly select these algorithms when creating volumes in the past. Reviewed by: cem, delphij MFC after: 3 days Relnotes: yes Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D20344
Notes
Notes: svn path=/head/; revision=348206
Diffstat (limited to 'lib/geom')
-rw-r--r--lib/geom/eli/geli.816
-rw-r--r--lib/geom/eli/geom_eli.c16
2 files changed, 30 insertions, 2 deletions
diff --git a/lib/geom/eli/geli.8 b/lib/geom/eli/geli.8
index 876f466878685..43ca9a2928c71 100644
--- a/lib/geom/eli/geli.8
+++ b/lib/geom/eli/geli.8
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd April 3, 2019
+.Dd May 23, 2019
.Dt GELI 8
.Os
.Sh NAME
@@ -901,6 +901,18 @@ specified in
.El
.Sh EXIT STATUS
Exit status is 0 on success, and 1 if the command fails.
+.Sh DEPRECATION NOTICE
+Support for the
+.Nm Blowfish-CBC
+and
+.Nm 3DES-CBC
+cryptographic algorithms and
+.Nm HMAC/MD5
+authentication algorithm will be removed in
+.Fx 13.0 .
+New volumes cannot be created using these algorithms.
+Existing volumes should be migrated to a new volume that uses
+non-deprecated algorithms.
.Sh EXAMPLES
Initialize a provider which is going to be encrypted with a
passphrase and random data from a file on the user's pen drive.
@@ -1134,7 +1146,7 @@ utility appeared in
.Fx 6.0 .
Support for the
.Nm Camellia
-block cipher is implemented by Yoshisato Yanagisawa in
+block cipher was implemented by Yoshisato Yanagisawa in
.Fx 7.0 .
.Pp
Highest
diff --git a/lib/geom/eli/geom_eli.c b/lib/geom/eli/geom_eli.c
index 2b08bf14a1853..7fddef29acdbc 100644
--- a/lib/geom/eli/geom_eli.c
+++ b/lib/geom/eli/geom_eli.c
@@ -805,6 +805,22 @@ eli_init(struct gctl_req *req)
return;
}
}
+ if (md.md_flags & G_ELI_FLAG_AUTH) {
+ switch (md.md_aalgo) {
+ case CRYPTO_MD5_HMAC:
+ gctl_error(req,
+ "The %s authentication algorithm is deprecated.",
+ g_eli_algo2str(md.md_aalgo));
+ return;
+ }
+ }
+ switch (md.md_ealgo) {
+ case CRYPTO_3DES_CBC:
+ case CRYPTO_BLF_CBC:
+ gctl_error(req, "The %s encryption algorithm is deprecated.",
+ g_eli_algo2str(md.md_aalgo));
+ return;
+ }
val = gctl_get_intmax(req, "keylen");
md.md_keylen = val;
md.md_keylen = g_eli_keylen(md.md_ealgo, md.md_keylen);