diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2026-10-27 08:01:30 -1000 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2026-10-27 08:01:30 -1000 |
| commit | 62c457528529cdcfa32bc52b331ceca10f3937b6 (patch) | |
| tree | 996f24181b89b02cbc2afcbe74888590877e9639 /Documentation | |
| parent | c60ebc3208b9ce1d8915318347962f7ce1dbd07d (diff) | |
| parent | 503b65da9a7e5447d91222f62399522f2f62a0fa (diff) | |
Merge tag 'vfs-7.4-rc1.keyring' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs
Pull vfs keyring updates from Christian Brauner:
"The kernel has two keyrings that userspace fills with X.509
certificates at boot: .fs-verity for fs-verity built-in signatures
and .dm-verity for dm-verity root hash signatures.
Neither is linked into any process keyring. Hence, request_key() and
KEYCTL_SEARCH can't find them. The only way for userspace to identify
them is to read their serial number out of /proc/keys. That is not
just a large file often the names can also be reused and appear
multiple times which allows forging these keyrings.
This adds two fixed special key ids, KEY_SPEC_DM_VERITY_KEYRING and
KEY_SPEC_FS_VERITY_KEYRING next to KEY_SPEC_BPF_KEYRING. The latter
went in through bpf-next this merge window.
lookup_user_key() resolves the fixed key ids to the two keyrings. So
userspace can add a dm-verity (fixed keyring id: -10) certificate with
keyctl padd asymmetric "" -10 < cert.der
and seal the keyring with
keyctl restrict_keyring -10
without looking anything up first"
* tag 'vfs-7.4-rc1.keyring' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs:
Documentation: keys: document IDs added since KEY_SPEC_REQKEY_AUTH_KEY
keys: add KEY_SPEC_FS_VERITY_KEYRING
keys: add KEY_SPEC_DM_VERITY_KEYRING
Diffstat (limited to 'Documentation')
| -rw-r--r-- | Documentation/security/keys/core.rst | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Documentation/security/keys/core.rst b/Documentation/security/keys/core.rst index 326b8a973828..37ed42382f16 100644 --- a/Documentation/security/keys/core.rst +++ b/Documentation/security/keys/core.rst @@ -372,6 +372,19 @@ process making the call:: KEY_SPEC_GROUP_KEYRING -6 GID-specific keyring KEY_SPEC_REQKEY_AUTH_KEY -7 assumed request_key() authorisation key + KEY_SPEC_REQUESTOR_KEYRING -8 request_key() destination + keyring + +There are also values that refer to a specific kernel keyring rather than to +anything belonging to the caller. These keyrings are not linked into any +keyring, so a search cannot reach them and the ID is the only way to name +one:: + + CONSTANT VALUE KEY REFERENCED + ============================== ====== =========================== + KEY_SPEC_BPF_KEYRING -9 the ".bpf" keyring + KEY_SPEC_DM_VERITY_KEYRING -10 the ".dm-verity" keyring + KEY_SPEC_FS_VERITY_KEYRING -11 the ".fs-verity" keyring The main syscalls are: |
