From: Anand Suveer Jain <asj@kernel.org>
To: David Woodhouse <dwmw2@infradead.org>,
Thiago Macieira <thiago.macieira@intel.com>,
Dave Hansen <dave.hansen@intel.com>
Cc: sashal@kernel.org, linux-btrfs@vger.kernel.org,
David Sterba <dsterba@suse.com>
Subject: Re: [PATCH 1/3] btrfs: derive f_fsid from on-disk fsuuid and dev_t
Date: Sat, 12 Sep 2026 18:10:40 +0800 [thread overview]
Message-ID: <573e174a-0834-4d6c-8e12-2cbc15493ca1@kernel.org> (raw)
In-Reply-To: <68DEEB96-40BA-45B1-8C9F-BD45E19F72F8@infradead.org>
On 12/9/26 02:12, David Woodhouse wrote:
> On 11 September 2026 17:07:29 BST, Thiago Macieira <thiago.macieira@intel.com> wrote:
>> On Friday, 11 September 2026 07:51:16 Pacific Daylight Time Anand Suveer Jain
>> wrote:
>>> I wish I had more clarity on how OpenConnect uses the FSID before I
>>> comment. Do you know? Can you shed some light on this?
>>
>> It's openconnect's option --key-password-from-fsid. It uses the FSID encoded
>> in hex format as the key's passphrase.
>>
>> To reproduce, take any key without a password and do:
>> openssl rsa -in unencrypted-key.pem -out encrypted-key.pem
>> And paste your FSID as the password.
>>
>> This is not real security, we all agree. David W can probably remember better
>> why this option exists, but I would suspect it was an IT mandate that a) the
>> key not be left unencrypted on disk and b) be specific to a given machine,
>> avoiding reuse by being copied to another. Ideally, we'd use TPM these days,
>> but there are still a lot of systems without it where Linux runs, and
>> especially a lot of legacy set ups.
>>
>> But very simply, it's the fact that the FSID has been used as a stable
>> identifier and no longer is if the device in question is not itself stable.
>
> Right. This was never "security" per se.
>
> In the early days of OpenConnect we were required by Intel IT to match the level of security of the Windows key store. Which basically meant that it would not prevent an *attacker* but would prevent a genuine user who hasn't read (or chooses not to obey) the security policy and wants to copy certificates from one machine to another... for at least five minutes (downloading Jailbreak, in the Windows case, and re-encrying the key, in the Linux case).
>
> It's not high security but it *does* mean that a key file can't *trivially* be copied from machine to machine. Or recovered in useable form from a backup.
>
Got it.
> Encrypting it with the FSID of the file system it's stored on did a reasonable job of what it was intended to achieve. And the FSID is supposed to be *stable* and not break on a kernel upgrade. (Isn't it part of the NHS FH too, or is that derived entirely differently?)
>
Are you referring to NFS file handles? That already works fine
for non-cloned Btrfs. The whole point of this patch was to keep
fsid consistent across mounts for cloned filesystems too, but
it turned out to break backward compatibility for the original
filesystem.
Besides, I don't think your approach works with XFS or F2FS
either or at least it hasn't been tested with dynamic disk
discovery? Both of those derive fsid from dev_t MAJ:MIN,
which isn't guaranteed to stay stable across reboots.
> Of course, you *should* have moved on to using a TPM by now; I don't buy the excuse that it isn't available. But still, the kernel shouldn't break userspace *even* if you deserve it for still using this hack in 2026.
Fair point the patch definitely isn't ready for Stable
kernel as-is. I'll get a backport-friendly fix out asap.
Thanks
Anand
next prev parent reply other threads:[~2026-09-12 10:10 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-26 14:23 [PATCH 0/3] fix s_uuid and f_fsid consistency for cloned filesystems Anand Jain
2026-02-26 14:27 ` [PATCH 1/3] btrfs: derive f_fsid from on-disk fsuuid and dev_t Anand Jain
2026-09-11 12:32 ` Dave Hansen
2026-09-11 14:51 ` Anand Suveer Jain
2026-09-11 16:07 ` Thiago Macieira
2026-09-11 18:12 ` David Woodhouse
2026-09-12 10:10 ` Anand Suveer Jain [this message]
2026-09-11 17:23 ` David Sterba
2026-09-12 10:19 ` Anand Suveer Jain
2026-09-14 13:14 ` David Sterba
2026-09-15 16:11 ` Anand Suveer Jain
2026-09-17 17:26 ` David Sterba
2026-09-20 14:13 ` Anand Suveer Jain
2026-02-26 14:27 ` [PATCH 2/3] btrfs: use on-disk uuid for s_uuid in temp_fsid mounts Anand Jain
2026-02-26 14:28 ` [RFC PATCH 3/3] ext4: derive f_fsid from block device to avoid collisions Anand Jain
2026-03-04 13:28 ` [PATCH 0/3] fix s_uuid and f_fsid consistency for cloned filesystems Christoph Hellwig
2026-03-05 9:32 ` Anand Jain
2026-03-05 14:21 ` Christoph Hellwig
2026-03-22 20:31 ` Theodore Tso
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=573e174a-0834-4d6c-8e12-2cbc15493ca1@kernel.org \
--to=asj@kernel.org \
--cc=dave.hansen@intel.com \
--cc=dsterba@suse.com \
--cc=dwmw2@infradead.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=sashal@kernel.org \
--cc=thiago.macieira@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.