-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fdo-aio service failed to re-encrypt disk on fedora 39 #605
Comments
@7flying Could you please take a look of this bug? |
@yih-redhat can you give me the versions of the FDO packages? I'm going to try to reproduce it out of composer first. |
[root@yih-f39-43243 ~]# rpm -qa|grep fdo |
@yih-redhat do you have the logs from the rendezvous-server? and owner-onboarding server. Thanks |
What I'm consistently getting are errors like this one:
|
@7flying I have reproduced this bug, and I will send you the env information in slack. |
If we get the full log we see that is a selinux denial:
|
Added BZ in Fedora's selinux-policies: https://bugzilla.redhat.com/show_bug.cgi?id=2263852 |
@yih-redhat in your simplified-installer the fdo-client version is not fdo-client-0.4.12-6 the issue is not present in 0.4.12-6 |
Are we sure? The difference between -4 and -6 builds was updated crate dependencies for CVEs. If the problem goes away it might mean a bug was fixed in a crate somewhere by luck but I would be surprised if that was the case. |
Yes, I can confirm that the problem is not present in 0.4.12-6. BUT, the root problem is that this bug report does not have the latest RPMS:
and I've built everything with latest:
where the error is not present:
So, the error is just present with this combo:
|
@nullr0ute , so since we are OK in the latest RPMs I think that I should close the Fedora BZ. |
So I believe the fix is in selinux-policy not FDO which would make more sense if it's selinux. |
but, do we need a fix for an older revision when there is already a fix for the latest version? |
No, the fix is to upgrade the selinux-policy |
My point is that there also an upgraded selinux-policy that works. |
closing this issue as the issue cannot be reproduced with the latest packages. |
Problem description:
On a fedora 39, install fdo-admin-cli and start fdo-aio.service, then create iot-simplified-installer image and provision edge vm with it, login edge vm and check fdo client log, it shows failed to perform disk re-encryption
Note: If do not use fdo-aio service, but use standalone fdo-rendezvous-server/fdo-owner-onboarding-server/fdo-manufacturing-server, it works as expected. For example, this test case works well on fedora 39, https://github.com/virt-s1/rhel-edge/blob/main/ostree-simplified-installer.sh#L27-L57
Reproduce steps:
[root@yih-f39-43243 ~]# cat /etc/fdo/aio/configs/serviceinfo_api_server.yml
service_info:
initial_user:
username: fdouser
sshkeys:
files:
source_path: /var/lib/fdo/fdouser
commands: null
diskencryption_clevis:
reencrypt: true
binding:
pin: tpm2
config: '{}'
additional_serviceinfo: null
after_onboarding_reboot: false
bind: 0.0.0.0:8083
service_info_auth_token: L9222oOWoE/CqdC86H7Rkixer6HFtfyX9m/djUFloSY=
admin_auth_token: oCKtbbwfiwTJ4kZfPgXBnj2Hxl3pECFxknx4pgbCkWI=
device_specific_store_driver:
Directory:
path: /etc/fdo/aio/stores/serviceinfo_api_devices
name = "installer"
description = "A rhel-edge simplified-installer image"
version = "0.0.1"
modules = []
groups = []
[customizations]
installation_device = "/dev/vda"
[[customizations.user]]
name = "simple"
description = "Administrator account"
password = "${EDGE_USER_PASSWORD_SHA512}"
key = "${SSH_KEY_PUB}"
home = "/home/simple/"
groups = ["wheel"]
[customizations.fdo]
manufacturing_server_url="http://${FDO_SERVER_ADDRESS}:8080"
diun_pub_key_insecure="true"
Jan 22 06:44:37 localhost.localdomain systemd[1]: Starting fdo-client-linuxapp.service - FDO client...
Jan 22 06:44:37 localhost.localdomain fdo-client-linuxapp[1192]: 2024-01-22T06:44:37.662Z INFO fdo_client_linuxapp > Found device credential at FileSystemPath { path: "/boot/device-credentials", deactivation_method: None }
Jan 22 06:44:37 localhost.localdomain fdo-client-linuxapp[1192]: 2024-01-22T06:44:37.719Z INFO fdo_client_linuxapp > Got TO2 addresses: ["http://10.0.188.165:8081", "http://2620:52:0:bc:60ad:5344:9114:7612:8081", "http://fe80::7d5f:fcee:1fbe:95d0:8081"]
Jan 22 06:44:37 localhost.localdomain fdo-client-linuxapp[1192]: 2024-01-22T06:44:37.719Z INFO fdo_client_linuxapp > Performing TO2 protocol, URL: "http://10.0.188.165:8081"
Jan 22 06:44:37 localhost.localdomain fdo-client-linuxapp[1192]: 2024-01-22T06:44:37.757Z INFO fdo_client_linuxapp::serviceinfo > Username is: fdouser
Jan 22 06:44:37 localhost.localdomain fdo-client-linuxapp[1192]: 2024-01-22T06:44:37.757Z INFO fdo_client_linuxapp::serviceinfo > Keys are present
Jan 22 06:44:37 localhost.localdomain fdo-client-linuxapp[1192]: 2024-01-22T06:44:37.757Z INFO fdo_client_linuxapp::serviceinfo > Creating file "/etc/sudoers.d/fdouser" with 32 bytes (mode 384)
Jan 22 06:44:37 localhost.localdomain fdo-client-linuxapp[1192]: 2024-01-22T06:44:37.766Z INFO fdo_client_linuxapp::serviceinfo > Initiating disk re-encryption, disk-label: /dev/vda3, pin: tpm2, config: {}, reencrypt: true
Jan 22 06:44:37 localhost.localdomain fdo-client-linuxapp[1192]: 2024-01-22T06:44:37.975Z ERROR fdo_client_linuxapp > ServiceInfo failed, error: Error processing returned serviceinfo
Jan 22 06:44:37 localhost.localdomain fdo-client-linuxapp[1192]: Caused by:
Jan 22 06:44:37 localhost.localdomain fdo-client-linuxapp[1192]: 0: Error executing clevis
Jan 22 06:44:37 localhost.localdomain fdo-client-linuxapp[1192]: 1: Error executing disk encryption for disk label /dev/vda3
Jan 22 06:44:37 localhost.localdomain fdo-client-linuxapp[1192]: 2: Error rebinding clevis
Jan 22 06:44:37 localhost.localdomain fdo-client-linuxapp[1192]: 3: Error binding clevis
Jan 22 06:44:37 localhost.localdomain fdo-client-linuxapp[1192]: 4: Failed to bind clevis: ExitStatus(unix_wait_status(256)), stdout: , stderr:
Jan 22 06:44:37 localhost.localdomain fdo-client-linuxapp[1192]: /usr/share/cracklib/pw_dict.pwd.gz: Permission denied
Jan 22 06:44:37 localhost.localdomain fdo-client-linuxapp[1192]: /usr/share/cracklib/pw_dict.pwd.gz: Permission denied
Jan 22 06:44:37 localhost.localdomain fdo-client-linuxapp[1192]: /usr/share/cracklib/pw_dict.pwd.gz: Permission denied
Jan 22 06:44:37 localhost.localdomain fdo-client-linuxapp[1192]: Error: Password generation failed - required entropy too low for settings
Jan 22 06:44:37 localhost.localdomain fdo-client-linuxapp[1192]: Unable to generate a new key
Jan 22 06:44:37 localhost.localdomain fdo-client-linuxapp[1192]: Error adding new binding to /dev/vda3
Jan 22 06:44:37 localhost.localdomain fdo-client-linuxapp[1192]:
Jan 22 06:44:37 localhost.localdomain fdo-client-linuxapp[1192]: 2024-01-22T06:44:37.977Z ERROR fdo_client_linuxapp > Error performing TO2 ownership protocol
Jan 22 06:44:37 localhost.localdomain fdo-client-linuxapp[1192]: Caused by:
Jan 22 06:44:37 localhost.localdomain fdo-client-linuxapp[1192]: Error performing the ServiceInfo roundtrips with TO2 address http://10.0.188.165:8081
Jan 22 06:44:37 localhost.localdomain fdo-client-linuxapp[1192]: 2024-01-22T06:44:37.977Z INFO fdo_client_linuxapp > Performing TO2 protocol, URL: "http://2620:52:0:bc:60ad:5344:9114:7612:8081"
Jan 22 06:44:37 localhost.localdomain fdo-client-linuxapp[1192]: 2024-01-22T06:44:37.992Z ERROR fdo_client_linuxapp > Error performing TO2 ownership protocol
Jan 22 06:44:37 localhost.localdomain fdo-client-linuxapp[1192]: Caused by:
Jan 22 06:44:37 localhost.localdomain fdo-client-linuxapp[1192]: 0: Error sending HelloDevice
Jan 22 06:44:37 localhost.localdomain fdo-client-linuxapp[1192]: 1: Error performing request
Jan 22 06:44:37 localhost.localdomain fdo-client-linuxapp[1192]: 2: builder error: invalid port number
Jan 22 06:44:37 localhost.localdomain fdo-client-linuxapp[1192]: 3: invalid port number with TO2 address http://2620:52:0:bc:60ad:5344:9114:7612:8081
Jan 22 06:44:37 localhost.localdomain fdo-client-linuxapp[1192]: 2024-01-22T06:44:37.993Z INFO fdo_client_linuxapp > Performing TO2 protocol, URL: "http://fe80::7d5f:fcee:1fbe:95d0:8081"
Jan 22 06:44:38 localhost.localdomain fdo-client-linuxapp[1192]: 2024-01-22T06:44:38.006Z ERROR fdo_client_linuxapp > Error performing TO2 ownership protocol
Jan 22 06:44:38 localhost.localdomain fdo-client-linuxapp[1192]: Caused by:
Jan 22 06:44:38 localhost.localdomain fdo-client-linuxapp[1192]: 0: Error sending HelloDevice
Jan 22 06:44:38 localhost.localdomain fdo-client-linuxapp[1192]: 1: Error performing request
Jan 22 06:44:38 localhost.localdomain fdo-client-linuxapp[1192]: 2: builder error: invalid port number
Jan 22 06:44:38 localhost.localdomain fdo-client-linuxapp[1192]: 3: invalid port number with TO2 address http://fe80::7d5f:fcee:1fbe:95d0:8081
Jan 22 06:44:38 localhost.localdomain fdo-client-linuxapp[1192]: 2024-01-22T06:44:38.020Z ERROR fdo_client_linuxapp > Error performing TO1 with ServiceClient { protocol_version: Version1_1, base_url: "http://2620:52:0:bc:60ad:5344:9114:7612:8082", client: Client { accepts: Accepts, proxies: [Proxy(System({}), None)], referer: true, default_headers: {"accept": "/"} }, authorization_token: None, encryption_keys: EncryptionKeys { cipher_suite: None, keys: None }, last_message_type: Some(Error), non_interoperable_kdf_required: None }
Jan 22 06:44:38 localhost.localdomain fdo-client-linuxapp[1192]: 2024-01-22T06:44:38.021Z ERROR fdo_client_linuxapp > Error Couldn't get TO1 from any Rendezvous server! getting usable To1d from rv_entry RendezvousInterpretedDirective { ip_addresses: Some([IPAddress(2620:52:0:bc:60ad:5344:9114:7612)]), dns_name: None, port: 8082, server_certificate_hash: None, ca_certificate_hash: None, user_input: false, wifi_ssid: None, wifi_password: None, medium: None, protocol: Http, delay: 0, bypass: false }
Jan 22 06:44:38 localhost.localdomain fdo-client-linuxapp[1192]: 2024-01-22T06:44:38.035Z ERROR fdo_client_linuxapp > Error performing TO1 with ServiceClient { protocol_version: Version1_1, base_url: "http://fe80::7d5f:fcee:1fbe:95d0:8082", client: Client { accepts: Accepts, proxies: [Proxy(System({}), None)], referer: true, default_headers: {"accept": "/"} }, authorization_token: None, encryption_keys: EncryptionKeys { cipher_suite: None, keys: None }, last_message_type: Some(Error), non_interoperable_kdf_required: None }
Jan 22 06:44:38 localhost.localdomain fdo-client-linuxapp[1192]: 2024-01-22T06:44:38.035Z ERROR fdo_client_linuxapp > Error Couldn't get TO1 from any Rendezvous server! getting usable To1d from rv_entry RendezvousInterpretedDirective { ip_addresses: Some([IPAddress(fe80::7d5f:fcee:1fbe:95d0)]), dns_name: None, port: 8082, server_certificate_hash: None, ca_certificate_hash: None, user_input: false, wifi_ssid: None, wifi_password: None, medium: None, protocol: Http, delay: 0, bypass: false }
[simple@localhost ~]$ sudo cryptsetup luksDump /dev/vda3
LUKS header information
Version: 2
Epoch: 6
Metadata area: 16384 [bytes]
Keyslots area: 16744448 [bytes]
UUID: bdde839c-f948-46ab-a0c5-f42875b9e80e
Label: crypt_root
Subsystem: (no subsystem)
Flags: (no flags)
Data segments:
0: crypt
offset: 16777216 [bytes]
length: (whole device)
cipher: cipher_null-ecb
sector: 512 [bytes]
Keyslots:
1: luks2
Key: 256 bits
Priority: normal
Cipher: aes-xts-plain64
Cipher key: 512 bits
PBKDF: pbkdf2
Hash: sha256
Iterations: 1000
Salt: a3 08 1f e7 96 cc 97 f0 d1 a5 7d 71 6b bd 3d 55
75 f7 ea e2 b4 a4 65 78 31 1c e5 18 37 7a ae 36
AF stripes: 4000
AF hash: sha256
Area offset:163840 [bytes]
Area length:131072 [bytes]
Digest ID: 0
Tokens:
0: clevis
Keyslot: 1
Digests:
0: pbkdf2
Hash: sha256
Iterations: 1000
Salt: cc f7 6e b1 2b ee bb 8c 80 bd d9 72 cf a8 1a b1
88 e0 e9 32 3b f4 4d 43 7a a7 60 39 02 cb 71 da
Digest: f4 8f 33 c4 d0 33 6f 6e 62 df 58 25 2a 84 14 3c
d1 0a 69 45 7a 11 f7 96 27 6b 06 d6 28 b8 c3 eb
The text was updated successfully, but these errors were encountered: