public inbox for linux-crypto@vger.kernel.org
 help / color / mirror / Atom feed
From: "Theodore Ts'o" <tytso@mit.edu>
To: Eric Biggers <ebiggers@kernel.org>
Cc: Joachim Vandersmissen <joachim@jvdsn.com>,
	linux-crypto@vger.kernel.org, simo@redhat.com
Subject: Re: FIPS requirements in lib/crypto/ APIs
Date: Fri, 19 Sep 2025 11:22:16 -0400	[thread overview]
Message-ID: <20250919152216.GH416742@mit.edu> (raw)
In-Reply-To: <20250918180647.GC1422@quark>

On Thu, Sep 18, 2025 at 01:06:47PM -0500, Eric Biggers wrote:
> > I'm more trying to figure out a general approach to address these kinds of
> > requirements. What I usually see in FIPS modules, is that the FIPS module
> > API is as conservative as possible, rather than relying on the callers to
> > perform the FIPS requirement checks.
> 
> Aren't these distros including the modules within their FIPS module
> boundary too?  It seems they would need to.
> 
> Either way, they've been getting their FIPS certificates despite lib/
> including non-FIPS-approved stuff for many years.  So it can't be that
> much of an issue in practice.

What I would recommend for those people who need FIPS certification
(which is a vanishingly small percentage of Linux kernel users, BTW),
that the FIPS module use their own copy of the crypto algorithms, and
*not* depend on kernel lib/crypto interfaces.

Why?  Because FIPS certification is on the binary artifact, and if
there is a high-severity vulnerability. if you are selling into the US
Government market, FEDRAMP requires that you mitigate that
vulnerability within 30 days and that will likely require that you
deploy a new kernel binary.

So it would be useful if the FIPS module doesn't need to change when
your FEDRAMP certification officer requires that you update the
kernel, and if the FIPS module is "the whole kernel", addressing the
high-severity CVE would break the FIPS certification.  So it really is
much better if you can decouple the FIPS module from the rest of the
kernel, since otherwise the FIPS certification mandate and the FEDRAMP
certification mandate could put you in a very uncomfortable place.

It's also why historically many companies who need to provide FIPS
certification will carefully architect their solution so it is only
dependent on userspace crypto.  A number of years ago, I was involved
in a project at a former employer where we separated the crypto core
of the OpenSSL library from the rest of OpenSSL, so that when there
was a buffer overrun in the ASN.1 DER decoding of a certificate (for
example), we could fix it without breaking the FIPS certification of
the crypto core.  And we didn't even *consider* trying add a kernel
crypto dependency.

One of the important things to remember is that as far as FIPS
certification is concerned, the existence of remote privilege attacks
don't matter, so long as you meet all of the FIPS certification
security theatre.  But in the real world, you really want to fix high
severity CVE's....

Cheers,

					- Ted

  reply	other threads:[~2025-09-19 15:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-18 16:00 FIPS requirements in lib/crypto/ APIs Joachim Vandersmissen
2025-09-18 16:33 ` Eric Biggers
2025-09-18 17:48   ` Joachim Vandersmissen
2025-09-18 18:06     ` Eric Biggers
2025-09-19 15:22       ` Theodore Ts'o [this message]
2025-09-22 13:41         ` Jeff Barnes

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250919152216.GH416742@mit.edu \
    --to=tytso@mit.edu \
    --cc=ebiggers@kernel.org \
    --cc=joachim@jvdsn.com \
    --cc=linux-crypto@vger.kernel.org \
    --cc=simo@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox