linux-cifs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mount.cifs.rst: add FIPS information
@ 2022-03-31 23:52 Enzo Matsumiya
  2022-04-01 14:56 ` Tom Talpey
  0 siblings, 1 reply; 8+ messages in thread
From: Enzo Matsumiya @ 2022-03-31 23:52 UTC (permalink / raw)
  To: linux-cifs; +Cc: pshilovsky, smfrench, pc, Enzo Matsumiya

Add FIPS 140-2 compliance information regarding mounting SMB shares.

Signed-off-by: Enzo Matsumiya <ematsumiya@suse.de>
---
 mount.cifs.rst | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/mount.cifs.rst b/mount.cifs.rst
index 9d4446f035b6..4ca46976fee6 100644
--- a/mount.cifs.rst
+++ b/mount.cifs.rst
@@ -376,6 +376,10 @@ sec=arg
   may be enabled automatically. Packet signing may also be enabled
   automatically if it's enabled in */proc/fs/cifs/SecurityFlags*.
 
+  For environments that requires FIPS 140-2 compliance, only ``sec=krb5`` and
+  ``sec=krb5i`` are valid. See also ``vers``. See section `SECURITY`_
+  for more information.
+
 seal
   Request encryption at the SMB layer. The encryption algorithm used
   is AES-128-CCM. Requires SMB3 or above (see ``vers``).
@@ -624,6 +628,9 @@ vers=arg
   kernels prior to v4.13, the default was ``1.0``. For kernels
   between v4.13 and v4.13.5 the default is ``3.0``.
 
+  For environments that requires FIPS 140-2 compliance, only version ``2.0`` or
+  or newer is allowed. See section `SECURITY`_ for more information.
+
 --verbose
   Print additional debugging information for the mount. Note that this
   parameter must be specified before the ``-o`` . For example::
@@ -923,6 +930,29 @@ by default at mount time. Old dialects such as CIFS (SMB1, ie vers=1.0)
 have much weaker security. Use of CIFS (SMB1) can be disabled by
 modprobe cifs disable_legacy_dialects=y.
 
+For environments that requires FIPS 140-2 compliance, the following applies:
+
+- SMB1 (``vers=1.0``) is not allowed
+- SMB2 and newer are only allowed with ``sec=krb5`` or ``sec=krb5i`` security
+  modes
+
+This is because FIPS 140-2 does not approve MD4/MD5 hashing algorithms, which
+are used either by SMB1 or the other security modes.
+
+When running a kernel in FIPS mode (i.e. with ``fips=1`` in boot command line),
+the above will be enforced, and running ``mount.cifs`` might fail.
+In the failing cases, the following error message (or similar, depending on the
+security mode) will appear in the ring buffer:
+
+  "CIFS VFS: could not allocate crypto hmacmd5"
+
+When not running a kernel in FIPS mode, the above serves only as informational
+purpose as ``mount.cifs`` does not enforce any of that.
+
+References:
+FIPS 140-2 Implementation Guide, G.6
+`https://csrc.nist.gov/csrc/media/projects/cryptographic-module-validation-program/documents/fips140-2/fips1402ig.pdf<https://csrc.nist.gov/csrc/media/projects/cryptographic-module-validation-program/documents/fips140-2/fips1402ig.pdf>`_
+
 ****
 BUGS
 ****
-- 
2.34.1


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

end of thread, other threads:[~2022-04-29 22:17 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-31 23:52 [PATCH] mount.cifs.rst: add FIPS information Enzo Matsumiya
2022-04-01 14:56 ` Tom Talpey
2022-04-01 15:25   ` Enzo Matsumiya
2022-04-01 15:42     ` Tom Talpey
2022-04-01 17:41       ` Enzo Matsumiya
2022-04-04  1:47         ` Steve French
2022-04-04 16:23           ` Enzo Matsumiya
2022-04-29 22:17             ` Pavel Shilovsky

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).