Skip to contentSkip to conversation

Linux Security Summit cross-over?

LSF/MM/BPF TOPIC David Howells 5 participants 6 messages Feb 21, 2023 – Feb 27, 2023

Subsystems (3)
lore
Share & tools
lore
#1 lore raw
Quoted 9 lines · David Howells

Since the first day of the LSS is the same as the final day of LSF and in the same venue, are there any filesystem + security subjects that would merit a common session?

Quoted 5 lines

LSF/MM, May 8–10, Vancouver, BC (Canada)
https://events.linuxfoundation.org/lsfmm

LSS-NA, May 10-12, Vancouver, BC (Canada)
https://events.linuxfoundation.org/linux-security-summit-north-america

Two I know about:

Network filesystems have ongoing interest in the kernel's Kerberos infrastructure.

NVMe and NFS folks are working on a TLS handshake upcall mechanism.

Would be interesting to know if LSF attendees can get a discount for attending LSS, if there is a registration fee for that event.

--
Chuck Lever

#2 lore raw
Quoted 16 lines · Chuck Lever III
Quoted 8 lines · David Howells

Since the first day of the LSS is the same as the final day of LSF and in the same venue, are there any filesystem + security subjects that would merit a common session?

Quoted 5 lines

LSF/MM, May 8–10, Vancouver, BC (Canada)
https://events.linuxfoundation.org/lsfmm

LSS-NA, May 10-12, Vancouver, BC (Canada)
https://events.linuxfoundation.org/linux-security-summit-north-america

Quoted 6 lines

Two I know about:

Network filesystems have ongoing interest in the kernel's Kerberos infrastructure.

NVMe and NFS folks are working on a TLS handshake upcall mechanism.

A related topic is: why do we have to have an upcall for things like transport security layer handshakes? An upcall for this is going to cramp our ability to support TLS-protected root partitions and NFSROOT, for instance.

The main complaint we are aware of is that the kernel's crypto library lags behind user space crypto. What is being done to keep the kernel crypto library modern? Alternately, are there solutions that would enable the kernel to safely invoke user space libraries without requiring an upcall/remote procedure call mechanism?

Note that TLSv1.3 is not the only consumer of such a mechanism. There are other transport layer protocols that require a substantial handshake (eg, mutual authentication and/or cipher negotiation). There has been recent work for example on negotiating with computational storage where some attestation or other security steps are required before the CS device can be trusted.

--
Chuck Lever

#3 lore raw
In reply to David Howells
Quoted 4 lines · David Howells

Since the first day of the LSS is the same as the final day of LSF and in the same venue, are there any filesystem + security subjects that would merit a common session?

I've got one: Cryptographic material handling.

Subtitle could be: making keyrings more usable.

The broad problem is that the use of encryption within the kernel is growing (from the old dm-crypt to the newer fscrypt and beyond) yet pretty much all of our cryptographic key material handling violates the principle of least privilege. The latest one (which I happened to notice being interested in TPMs) is the systemd tpm2 cryptenroll. The specific violation is that key unwrapping should occur as close as possible to use: when the kernel uses a key, it should be the kernel unwrapping it not unwrapping in user space and handing the unwrapped key down to the kernel because that gives a way. We got here because in most of the old uses, the key is derived from a passphrase and the kernel can't prompt the user, so pieces of user space have to gather the precursor cryptographic material anyway. However, we're moving towards using cryptographic devices (like the TPM, key fobs and the like) to store keys we really should be passing the wrapped key into the kernel and letting it do the unwrap to preserve least privilege. dm-crypt has some support for using kernel based TPM keys (the trusted key subsystem), but this isn't propagated into systemd-cryptenroll and pretty much none of the other encryption systems make any attempt to use keyrings for unwrap handling, even if they use keyrings to store cryptographic material.

Part of the reason seems to be that the keyrings subsystem itself is hard to use as a generic "unwrapper" since the consumer of the keys has to know exactly the key type to consume the protected payload. We could possibly fix this by adding a payload accessor function so the keyring consumer could access a payload from any key type and thus benefit from in-kernel unwrapping, but there are likely a host of other issues that need to be solved. So what I'd really like to discuss is:

Given the security need for a generic in-kernel unwrapper, should we make keyrings do this and if so, how?

Regards,

James

#4 lore raw

I did one on network fs security at a security summit before that would still be relevant to both

Quoted 40 lines · On Tue, Feb 21, 2023, 16:16 James Bottomley <…
Quoted 4 lines · David Howells

Since the first day of the LSS is the same as the final day of LSF and in the same venue, are there any filesystem + security subjects that would merit a common session?

I've got one: Cryptographic material handling.

Subtitle could be: making keyrings more usable.

The broad problem is that the use of encryption within the kernel is growing (from the old dm-crypt to the newer fscrypt and beyond) yet pretty much all of our cryptographic key material handling violates the principle of least privilege. The latest one (which I happened to notice being interested in TPMs) is the systemd tpm2 cryptenroll. The specific violation is that key unwrapping should occur as close as possible to use: when the kernel uses a key, it should be the kernel unwrapping it not unwrapping in user space and handing the unwrapped key down to the kernel because that gives a way. We got here because in most of the old uses, the key is derived from a passphrase and the kernel can't prompt the user, so pieces of user space have to gather the precursor cryptographic material anyway. However, we're moving towards using cryptographic devices (like the TPM, key fobs and the like) to store keys we really should be passing the wrapped key into the kernel and letting it do the unwrap to preserve least privilege. dm-crypt has some support for using kernel based TPM keys (the trusted key subsystem), but this isn't propagated into systemd-cryptenroll and pretty much none of the other encryption systems make any attempt to use keyrings for unwrap handling, even if they use keyrings to store cryptographic material.

Part of the reason seems to be that the keyrings subsystem itself is hard to use as a generic "unwrapper" since the consumer of the keys has to know exactly the key type to consume the protected payload. We could possibly fix this by adding a payload accessor function so the keyring consumer could access a payload from any key type and thus benefit from in-kernel unwrapping, but there are likely a host of other issues that need to be solved. So what I'd really like to discuss is:

Quoted 10 lines

Given the security need for a generic in-kernel unwrapper, should we make keyrings do this and if so, how?

Regards,

James

--
dm-devel mailing list
[email protected]
https://listman.redhat.com/mailman/listinfo/dm-devel

#5 lore raw
Quoted 44 lines · Steve French

I did one on network fs security at a security summit before that would still be relevant to both

On Tue, Feb 21, 2023, 16:16 James Bottomley <[email protected] <mailto:[email protected]>> wrote:

On Tue, 2023-02-21 at 16:55 +0000, David Howells wrote:
>
> Since the first day of the LSS is the same as the final day of LSF > and in the same venue, are there any filesystem + security subjects > that would merit a common session?

I've got one:  Cryptographic material handling.

Subtitle could be: making keyrings more usable.

The broad problem is that the use of encryption within the kernel is growing (from the old dm-crypt to the newer fscrypt and beyond) yet pretty much all of our cryptographic key material handling violates the principle of least privilege.  The latest one (which I happened to notice being interested in TPMs) is the systemd tpm2 cryptenroll.  The specific violation is that key unwrapping should occur as close as possible to use: when the kernel uses a key, it should be the kernel unwrapping it not unwrapping in user space and handing the unwrapped key down to the kernel because that gives a way.  We got here because in most of the old uses, the key is derived from a passphrase and the kernel can't prompt the user, so pieces of user space have to gather the precursor cryptographic material anyway.  However, we're moving towards using cryptographic devices (like the TPM, key fobs and the like) to store keys we really should be passing the wrapped key into the kernel and letting it do the unwrap to preserve least privilege. dm-crypt has some support for using kernel based TPM keys (the trusted key subsystem), but this isn't propagated into systemd-cryptenroll and pretty much none of the other encryption systems make any attempt to use keyrings for unwrap handling, even if they use keyrings to store cryptographic material.

Part of the reason seems to be that the keyrings subsystem itself is hard to use as a generic "unwrapper" since the consumer of the keys has to know exactly the key type to consume the protected payload.  We could possibly fix this by adding a payload accessor function so the keyring consumer could access a payload from any key type and thus benefit from in-kernel unwrapping, but there are likely a host of other issues that need to be solved.  So what I'd really like to discuss is:

Quoted 3 lines

Given the security need for a generic in-kernel unwrapper, should we make keyrings do this and if so, how?
That's one where I'd be interested in, too; for NVMe-over-TLS we'll be

using keyrings, too, and have the same issue as to how and where keys should be decoded (eg for X.509 handling).

Cheers,

Hannes

Signature · 5 lines
Dr. Hannes Reinecke                Kernel Storage Architect
[email protected]                              +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Ivo Totev, Andrew
Myers, Andrew McDonald, Martje Boudien Moerman