Files with a size of exactly 65537 bytes cause a decryption error
Summary
Reproducibility | Platform | OS | OS Version | Product Version |
---|---|---|---|---|
always | AMD64 | RHEL | 9.3 (Plow) | 13.0.2 |
Description
When restoring files from an encrypted backup, for any file with a size of exactly 65537 bytes there is an error in the job log as follows:
Error: restore.c:1707 Decryption error. buf_len=5 decrypt_len=0 on file /mnt/local/usr/share/vim/vim82/syntax/neomuttrc.vim
All other files on the system restore without error.
The file shown in the error just happened to be the right size to cause the error, and in my troubleshooting I found that any file that size triggers it. The very strange part is that the file is actually successfully restored, despite the error in the job log, and the "Failed" bacula job status.
One thing to note, although I'm unsure of its relevance, is that in this case I am running bacula version 13.0.1 on the director, but 13.0.2 on both the file daemon and storage daemon.
Steps to Reproduce
dd if=/dev/zero of=testfile bs=65537 count=1
- Run a backup
- Restore
testfile
created in step 1
Additional Information
config files:
# cat /opt/bacula/etc/bacula-fd.conf
Director {
Name = MyDirector
Password = "xxxxxx"
}
FileDaemon {
Name = client1-fd
FDport = 9200
WorkingDirectory = /opt/bacula/working
Pid Directory = /opt/bacula/working
Maximum Concurrent Jobs = 20
Plugin Directory = /opt/bacula/plugins
PKI Cipher = aes256
PKI Signatures = Yes
PKI Encryption = Yes
PKI Keypair = "/opt/bacula/etc/fd.pem"
PKI Master Key = "/opt/bacula/etc/master.cert"
}
Messages {
Name = Standard
director = MyDirector = all, !skipped, !restored, !verified, !saved
}