I am using sysutils/bareos-server for backup.
Today I tried to restore some files and got an error instead:
I tried different files and got the same error. Even a file that was saved with the same running tool two minutes before could not be restored!
The bareos tools use a PKI key that is loaded by the sysutils/bareos-client for encryption and signing of the individual files, so this is transparent to the server side. I checked that key on file: everything is allright.
Then I restarted the client process.
Now the files were restored, but a different error was reported:
This explains what had happened: the secret part of the key must have been damaged, so backups where encrypted correctly with the public part, but the signature created with the secret part was wrong. And decryption failed because it also needs the secret part.
Then I checked which of the daily backups had that flaw: all from Sep 2 to Sep 10, and from Sep 14 until today.
The damage had happened midflight while the program was running, then disappeared due to reboot, and reappeared three days later again while the program was running.
No other errors of any kind were reported.
How unlikely is this to happen?
Today I tried to restore some files and got an error instead:
Code:
Error: Encryption session provided an invalid symmetric key: ERR=error:0407109F:rsa routines:RSA_padding_check_PKCS1_type_2:pkcs decoding error
Error: Encryption session provided an invalid symmetric key: ERR=error:04065072:rsa routines:RSA_EAY_PRIVATE_DECRYPT:padding check failed
Error: Encryption session provided an invalid symmetric key: ERR=error:0607A082:digital envelope routines:EVP_CIPHER_CTX_set_key_length:invalid key length
I tried different files and got the same error. Even a file that was saved with the same running tool two minutes before could not be restored!
The bareos tools use a PKI key that is loaded by the sysutils/bareos-client for encryption and signing of the individual files, so this is transparent to the server side. I checked that key on file: everything is allright.
Then I restarted the client process.
Now the files were restored, but a different error was reported:
Code:
Error: OpenSSL digest Verify final failed: ERR=error:0407008A:rsa routines:RSA_padding_check_PKCS1_type_1:invalid padding
Error: OpenSSL digest Verify final failed: ERR=error:04067072:rsa routines:RSA_EAY_PUBLIC_DECRYPT:padding check failed
Error: filed/crypto.cc:205 Signature validation failed for file /tmp/bareos-restore/var/mail/admin: ERR=Signature is invalid
This explains what had happened: the secret part of the key must have been damaged, so backups where encrypted correctly with the public part, but the signature created with the secret part was wrong. And decryption failed because it also needs the secret part.
Then I checked which of the daily backups had that flaw: all from Sep 2 to Sep 10, and from Sep 14 until today.
Code:
boot time Wed Sep 11 01:05
shutdown time Tue Sep 10 22:54
boot time Fri Aug 30 18:59
shutdown time Fri Aug 30 18:20
The damage had happened midflight while the program was running, then disappeared due to reboot, and reappeared three days later again while the program was running.
No other errors of any kind were reported.
How unlikely is this to happen?