<div dir="auto">I did one on network fs security at a security summit before that would still be relevant to both</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Feb 21, 2023, 16:16 James Bottomley <<a href="mailto:James.Bottomley@hansenpartnership.com">James.Bottomley@hansenpartnership.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Tue, 2023-02-21 at 16:55 +0000, David Howells wrote:<br>
> <br>
> Since the first day of the LSS is the same as the final day of LSF<br>
> and in the same venue, are there any filesystem + security subjects<br>
> that would merit a common session?<br>
<br>
<br>
I've got one:  Cryptographic material handling.<br>
<br>
Subtitle could be: making keyrings more usable.<br>
<br>
The broad problem is that the use of encryption within the kernel is<br>
growing (from the old dm-crypt to the newer fscrypt and beyond) yet<br>
pretty much all of our cryptographic key material handling violates the<br>
principle of least privilege.  The latest one (which I happened to<br>
notice being interested in TPMs) is the systemd tpm2 cryptenroll.  The<br>
specific violation is that key unwrapping should occur as close as<br>
possible to use: when the kernel uses a key, it should be the kernel<br>
unwrapping it not unwrapping in user space and handing the unwrapped<br>
key down to the kernel because that gives a way.  We got here because<br>
in most of the old uses, the key is derived from a passphrase and the<br>
kernel can't prompt the user, so pieces of user space have to gather<br>
the precursor cryptographic material anyway.  However, we're moving<br>
towards using cryptographic devices (like the TPM, key fobs and the<br>
like) to store keys we really should be passing the wrapped key into<br>
the kernel and letting it do the unwrap to preserve least privilege. <br>
dm-crypt has some support for using kernel based TPM keys (the trusted<br>
key subsystem), but this isn't propagated into systemd-cryptenroll and<br>
pretty much none of the other encryption systems make any attempt to<br>
use keyrings for unwrap handling, even if they use keyrings to store<br>
cryptographic material.<br>
<br>
Part of the reason seems to be that the keyrings subsystem itself is<br>
hard to use as a generic "unwrapper" since the consumer of the keys has<br>
to know exactly the key type to consume the protected payload.  We<br>
could possibly fix this by adding a payload accessor function so the<br>
keyring consumer could access a payload from any key type and thus<br>
benefit from in-kernel unwrapping, but there are likely a host of other<br>
issues that need to be solved.  So what I'd really like to discuss is:<br>
<br>
Given the security need for a generic in-kernel unwrapper, should we<br>
make keyrings do this and if so, how?<br>
<br>
Regards,<br>
<br>
James<br>
<br>
<br>
<br>
</blockquote></div>