From: Trond Myklebust <trondmy@kernel.org>
To: Chuck Lever <cel@kernel.org>, Jeff Layton <jlayton@kernel.org>,
Benjamin Coddington <bcodding@hammerspace.com>,
Eric Biggers <ebiggers@kernel.org>
Cc: Chuck Lever <chuck.lever@oracle.com>, NeilBrown <neil@brown.name>,
Anna Schumaker <anna@kernel.org>,
linux-nfs@vger.kernel.org
Subject: Re: [PATCH v1 0/7] kNFSD Encrypted Filehandles
Date: Wed, 14 Jan 2026 09:53:47 -0500 [thread overview]
Message-ID: <a78cf4e4274f8b4e69a3c7bf3aa778ce7cc25f72.camel@kernel.org> (raw)
In-Reply-To: <c8ad96c5-1da1-4aeb-8999-2a8b63021a23@kernel.org>
On Wed, 2026-01-14 at 09:19 -0500, Chuck Lever wrote:
> On 1/14/26 8:19 AM, Jeff Layton wrote:
> > On Wed, 2026-01-14 at 07:39 -0500, Benjamin Coddington wrote:
> > > On 13 Jan 2026, at 19:42, Eric Biggers wrote:
> > >
> > > > On Tue, Jan 13, 2026 at 05:33:37PM -0500, Benjamin Coddington
> > > > wrote:
> > > > > > - Individual filehandles are small, on the order of 32- or
> > > > > > 64-bytes
> > > > > >
> > > > > > - But there are a lot of filehandles, perhaps billions,
> > > > > > that would
> > > > > > be encrypted or signed by the same key
> > > > > >
> > > > > > - The filehandle plaintext is predictable
> > > > >
> > > > > Mostly, yes. I think a strength of the AES-CBC
> > > > > implementation is that each
> > > > > 16-byte block is hashed with the results of the previous
> > > > > block. So, by
> > > > > starting with the fileid (unique per-file) and then
> > > > > proceeding to the less
> > > > > unique block (fsid + fileid again), the total entropy for
> > > > > each encrypted
> > > > > filehandle is increased.
> > > >
> > > > This sort of comment shows that the choice of AES-CBC still
> > > > isn't well
> > > > motivated. AES-CBC is an unauthenticated encryption algorithm
> > > > that
> > > > protects a message's confidentiality. It isn't a hash
> > > > function, it
> > > > isn't a MAC, and it doesn't protect a message's authenticity.
> > > > AES-CBC
> > > > will successfully decrypt any ciphertext, even one tampered
> > > > with by an
> > > > attacker, into some plaintext. You may be confusing AES-CBC
> > > > with
> > > > AES-CBC-MAC.
> > >
> > > I'm not confusing them, and you're absolutely correct - if an
> > > encrypted
> > > filehandle were tampered with we'd be relying on the decoded
> > > filehandle
> > > being garbage - the routines to decode the fsid and fileid would
> > > return
> > > errors, because a filehandle's data is meaningful and well-
> > > structured.
> > >
> > > That's a big difference from what using a MAC would provide -
> > > immediate
> > > knowledge the filehandle had been modified.
> > >
> >
> > I think a MAC is a better idea here too:
> >
> > One thing that people keep pointing out is that you could
> > potentially
> > sniff traffic and just nab the encrypted filehandles, and match
> > them
> > with inode numbers, etc.
> >
> > If you append a MAC though and check it on the server, you could
> > give
> > out filehandles that are limited-use. For instance, with v4, you
> > could
> > salt the hash with the long-form clientid and ensure that that
> > filehandle is only usable by that client. Anyone else gets back
> > NFS4ERR_STALE.
> >
> > Couple that with TLS and you'd have a pretty decent guard against
> > sniffing and filehandle guessing attacks.
>
> A sniffing attack is easier than guessing a file handle or
> constructing
> one. Neither encrypting a filehandle nor signing it protects against
> sniffing attacks. But using full in-transit encryption does, and we
> have that implemented already.
>
> With full in-transit encryption, the plaintext is much much less
> predictable as well.
>
> Just sayin'
>
Protection against sniffing and protection against spoofing are two
completely orthogonal problems. Please don't muddle the already murky
waters in this thread by confusing the two.
--
Trond Myklebust
Linux NFS client maintainer, Hammerspace
trondmy@kernel.org, trond.myklebust@hammerspace.com
next prev parent reply other threads:[~2026-01-14 14:53 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-27 17:00 [RFC/v1] kNFSD Encrypted Filehandles Benjamin Coddington
2025-12-27 17:03 ` [PATCH v1 0/2] nfs-utils: encrypted filehandle support Benjamin Coddington
2025-12-27 17:03 ` [PATCH v1 1/2] nfsdctl: Add support for passing encrypted filehandle key Benjamin Coddington
2025-12-27 17:03 ` [PATCH v1 2/2] exportfs: Add support for export option encrypt_fh Benjamin Coddington
2025-12-27 17:04 ` [PATCH v1 0/7] kNFSD Encrypted Filehandles Benjamin Coddington
2025-12-27 17:04 ` [PATCH v1 1/7] nfsd: Convert export flags to use BIT() macro Benjamin Coddington
2025-12-27 17:04 ` [PATCH v1 2/7] nfsd: Add a symmetric-key cipher for encrypted filehandles Benjamin Coddington
2025-12-27 17:04 ` [PATCH v1 3/7] nfsd/sunrpc: add per-thread crypto context pointer Benjamin Coddington
2025-12-27 17:04 ` [PATCH v1 4/7] NFSD: Add a per-knfsd reusable encfh_buf Benjamin Coddington
2025-12-28 17:52 ` kernel test robot
2025-12-29 0:33 ` kernel test robot
2025-12-27 17:04 ` [PATCH v1 5/7] NFSD/export: Add encrypt_fh export option Benjamin Coddington
2025-12-27 17:04 ` [PATCH v1 6/7] NFSD: Add filehandle crypto functions and helpers Benjamin Coddington
2025-12-27 17:14 ` Benjamin Coddington
2025-12-28 1:34 ` Chuck Lever
2025-12-28 20:45 ` Eric Biggers
2025-12-29 13:39 ` Benjamin Coddington
2025-12-28 5:17 ` kernel test robot
2025-12-27 17:04 ` [PATCH v1 7/7] NFSD: Enable filehandle encryption Benjamin Coddington
2025-12-27 23:06 ` [PATCH v1 0/7] kNFSD Encrypted Filehandles NeilBrown
2025-12-27 23:26 ` Benjamin Coddington
2025-12-28 5:49 ` NeilBrown
2025-12-28 17:05 ` Rick Macklem
2025-12-29 12:52 ` Benjamin Coddington
2025-12-28 5:33 ` [PATCH v1 1/7] nfsd: Convert export flags to use BIT() macro NeilBrown
2025-12-29 12:11 ` Benjamin Coddington
2025-12-28 17:09 ` [PATCH v1 0/7] kNFSD Encrypted Filehandles Chuck Lever
2025-12-29 13:23 ` Benjamin Coddington
2026-01-13 11:51 ` Benjamin Coddington
2026-01-13 12:14 ` Jeff Layton
2026-01-13 14:08 ` Chuck Lever
2026-01-13 15:07 ` Benjamin Coddington
2026-01-13 15:18 ` Chuck Lever
2026-01-13 16:05 ` Benjamin Coddington
2026-01-13 16:43 ` Chuck Lever
2026-01-13 17:02 ` Benjamin Coddington
2026-01-13 18:53 ` Chuck Lever
2026-01-13 19:54 ` Benjamin Coddington
2026-01-13 21:02 ` Chuck Lever
2026-01-13 22:33 ` Benjamin Coddington
2026-01-14 0:42 ` Eric Biggers
2026-01-14 12:39 ` Benjamin Coddington
2026-01-14 13:19 ` Jeff Layton
2026-01-14 14:19 ` Chuck Lever
2026-01-14 14:53 ` Trond Myklebust [this message]
2026-01-14 15:04 ` Chuck Lever
2026-01-14 15:35 ` Trond Myklebust
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=a78cf4e4274f8b4e69a3c7bf3aa778ce7cc25f72.camel@kernel.org \
--to=trondmy@kernel.org \
--cc=anna@kernel.org \
--cc=bcodding@hammerspace.com \
--cc=cel@kernel.org \
--cc=chuck.lever@oracle.com \
--cc=ebiggers@kernel.org \
--cc=jlayton@kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=neil@brown.name \
/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