You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some users may run kdumcptl after "sudo su" or use "sudo kdumpctl". And
kdump will fail,
# sudo kdumcptl restart
request_key: Required key not available
keyctl_set_timeout: Invalid argument
kexec_file_load failed: Required key not available
kdump: kexec: failed to load kdump kernel
This happens because the LUKS keys is can only be searched (keyctl request)
by the process but not by the user and sudo process inherits the session
keyring (@s) of the original user (test in the following example),
[test@localhost ~]$ sudo keyctl add user testkey testdata @U
711801750
[test@localhost ~]$ sudo grep testkey /proc/keys
2a6d3b96 I--Q--- 1 perm 3f010000 0 0 user testkey: 8
[test@localhost ~]$ sudo keyctl show 711801750
Keyring
Unable to dump key: Permission denied
The permission "3f010000" means the process has all the permissions but
user only has the view permission i.e. "sudo keyctl show/list @U" will list
all the keys but "sudo keyctl show KEY_ID" won't work.
Automatically use "sudo -i" which will use the session keyring (@s) of
the root to support "sudo kdumpctl". Note "sudo -i kexec" is also
needed in order for the process to read the keys in the kernel space.
Reported-by: Li Tian <[email protected]>
Signed-off-by: Coiby Xu <[email protected]>
0 commit comments