Issue unpacking seeds and with auto-promotion on rootless podman
Symptom
When attempting to unpack a Conjur seed file using the `evoke unpack seed` command within a rootless Podman container, the process fails with multiple Operation not permitted errors related to fchmodat. This will also affect a failed leaders ability to be restored as a standby automatically.
Example Error Output:
tar: Removing leading `/' from member namestar: opt/conjur/etc/ssl/conjur.key: Cannot change mode to rwxrwxrwx: Operation not permittedtar: opt/conjur/etc/ssl/conjur.pem: Cannot change mode to rwxrwxrwx: Operation not permittedtar: opt/conjur/etc/ssl/master.pem: Cannot change mode to rwxrwxrwx: Operation not permittedtar: Exiting with failure status due to previous errorscommand tar --exclude /opt/conjur/etc/VERSION --exclude /opt/conjur/etc/PAS_RELEASE --exclude /opt/conjur/etc/role --exclude ui.key* -x --exclude='.conf' -f '<seed file>' -C / failederror: Unable to extract seed file
Note: Despite the error message and non-zero exit status, the seed extraction typically completes successfully unless another error is raised.
Environment
Conjur
-
Platform: RHEL 9.7 (or similar distributions with strict security profiles)
-
Runtime: Rootless Podman
-
Tooling: Conjur Appliance 13.8 & 13.9
-
Security: Conjur seccomp profile enabled
Cause
The issue stems from a change in behavior in tar version 1.35, which increased POSIX compliance by executing the fchmodat syscall on all extracted elements to ensure permissions match the archive or the system umask. It attempts to modify permissions on a symlink causing an error to be raised.
-
Syscall Incompatibility: On certain files (like symbolic links), RHEL returns
EPERM(Operation not permitted) for thefchmodatsyscall for security reasons. -
Tar Error Handling: While
tarexpectsEOPNOTSUPPfor symlinks, it treatsEPERMas a fatal error, triggering the failure message. -
Seccomp Limitations: This cannot be resolved via seccomp profiles on RHEL 9 because the included
libseccomp(version < 2.5.5) does not recognizefchmodat2, preventing the syscall from being intercepted or mapped correctly.
Resolution
Please use the latest updated seccomp.json from Secrets Manager, Self-Hosted documentation located here
Note: The seccomp.json packaged with the appliance will be removed in a future release and should not be used