Bug 1357994
Summary: | mokutil fails to write MokAuth, MokPW | |||
---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Gayland G. Gump <gggump> | |
Component: | mokutil | Assignee: | Peter Jones <pjones> | |
Status: | CLOSED EOL | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | |
Severity: | unspecified | Docs Contact: | ||
Priority: | unspecified | |||
Version: | 23 | CC: | amarecek, arvidjaar, extras-qa, gggump, knutjbj, mangirdas, pjones, przedniczek, toddsmb, tomek | |
Target Milestone: | --- | |||
Target Release: | --- | |||
Hardware: | Unspecified | |||
OS: | Unspecified | |||
Whiteboard: | ||||
Fixed In Version: | Doc Type: | If docs needed, set a value | ||
Doc Text: | Story Points: | --- | ||
Clone Of: | 1263992 | |||
: | 1406868 (view as bug list) | Environment: | ||
Last Closed: | 2016-12-20 21:13:58 UTC | Type: | Bug | |
Regression: | --- | Mount Type: | --- | |
Documentation: | --- | CRM: | ||
Verified Versions: | Category: | --- | ||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
Cloudforms Team: | --- | Target Upstream Version: | ||
Embargoed: |
Description
Gayland G. Gump
2016-07-19 19:02:38 UTC
Hi I get the same error with Fedora 24 udo mokutil --import public_key.der input password: input password again: Failed to enroll new keys [knutjbj@uefi_knut nvidia_key] $ I am currently using Fedora 24 on a Lenovo e460. When I try to import a key using mokutil --import pub.der I get the following error: 'Failed to set variable (2) Invalid parameter' And as you could guess, the key is not imported. Kernel: 4.6.4-301.fc24.x86_64 kernel-devel: 4.6.4-301.fc24.x86_64 mokutil: 0.3.0-1.fc24.x86_64 While I was still using fedora 23 I would receive that same error as listed above, but I would also receive other errors, such as: mokutil --password Failed to write MokPW could this bug be duplicate of 1263992 I have similar issue (as already noted above): [root@localhost ~]# /mnt/usr/bin/strace -o zzz mokutil --import /mnt/root/MOK.der input password: input password again: Failed to enroll new keys From the strace log: open("/sys/firmware/efi/efivars/MokNew-605dab50-e046-4300-abb6-3dd810dd8b23", O_RDONLY) = 4 fstat(4, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0 read(4, "", 4) = 0 close(4) = 0 close(3) = 0 fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0 ioctl(0, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B38400 opost isig icanon echo ...}) = 0 ioctl(0, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B38400 opost isig icanon echo ...}) = 0 ioctl(0, SNDCTL_TMR_CONTINUE or SNDRV_TIMER_IOCTL_GPARAMS or TCSETSF, {B38400 opost isig icanon -echo ...}) = 0 fstat(0, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0 write(1, "input password: ", 16) = 16 read(0, "1234\n", 1024) = 5 ioctl(0, SNDCTL_TMR_CONTINUE or SNDRV_TIMER_IOCTL_GPARAMS or TCSETSF, {B38400 opost isig icanon echo ...}) = 0 write(1, "\n", 1) = 1 ioctl(0, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B38400 opost isig icanon echo ...}) = 0 ioctl(0, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B38400 opost isig icanon echo ...}) = 0 ioctl(0, SNDCTL_TMR_CONTINUE or SNDRV_TIMER_IOCTL_GPARAMS or TCSETSF, {B38400 opost isig icanon -echo ...}) = 0 write(1, "input password again: ", 22) = 22 read(0, "1234\n", 1024) = 5 ioctl(0, SNDCTL_TMR_CONTINUE or SNDRV_TIMER_IOCTL_GPARAMS or TCSETSF, {B38400 opost isig icanon echo ...}) = 0 write(1, "\n", 1) = 1 futex(0x7f7bfef1b0a8, FUTEX_WAKE_PRIVATE, 2147483647) = 0 open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3 fstat(3, {st_mode=S_IFREG|0644, st_size=86698, ...}) = 0 mmap(NULL, 86698, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f7c0075b000 close(3) = 0 open("/lib64/libnspr4.so", O_RDONLY|O_CLOEXEC) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0`\314\0\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0755, st_size=253136, ...}) = 0 close(3) = 0 munmap(0x7f7c0075b000, 86698) = 0 open("/proc/sys/crypto/fips_enabled", O_RDONLY) = 3 fstat(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0 read(3, "0\n", 1024) = 2 close(3) = 0 open("/sys/firmware/efi/efivars/MokNew-605dab50-e046-4300-abb6-3dd810dd8b23", O_WRONLY|O_CREAT, 0644) = -1 EACCES (Permission denied) write(2, "Failed to enroll new keys\n", 26) = 26 Note permission error when opening MokNew* for write. I've tried to remove the file: [root@localhost ~]# /mnt/usr/bin/strace -o zzz rm /sys/firmware/efi/efivars/MokNew-605dab50-e046-4300-abb6-3dd810dd8b23 rm: cannot remove '/sys/firmware/efi/efivars/MokNew-605dab50-e046-4300-abb6-3dd810dd8b23': Operation not permitted and relevant strace log: newfstatat(AT_FDCWD, "/sys/firmware/efi/efivars/MokNew-605dab50-e046-4300-abb6-3dd810dd8b23", {st_mode=S_IFREG|0644, st_size=0, ...}, AT_SYMLINK_NOFOLLOW) = 0 geteuid() = 0 unlinkat(AT_FDCWD, "/sys/firmware/efi/efivars/MokNew-605dab50-e046-4300-abb6-3dd810dd8b23", 0) = -1 EPERM (Operation not permitted) The interesting part is that I CAN modify boot order variables. It looks like for whatever reason kernel is somehow restricting access to Mok* efi variables. Could it be somehow related to the issue of bricking UEFI platform with `rm -rf /'? I used Fedora 24 x86_64 Workstation Live CD downloaded yesterday for the above checks. This issue also exists on up to date CentOS 7.2 and very likely - on RHEL 7.2. This message is a reminder that Fedora 23 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 23. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '23'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 23 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. Fedora 23 changed to end-of-life (EOL) status on 2016-12-20. Fedora 23 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed. I have the same problem in Fedora 25. sudo mokutil --password input password: input password again: Failed to write MokPW: Invalid argument sudo mokutil --clear-password Failed to write MokPW: Invalid argument |