Skip to content

Commit

Permalink
security: do not crash initramfs ks parsing on failing certificate dump
Browse files Browse the repository at this point in the history
For example when --dir is pointing to read-only filesystem.

Resolves: RHEL-61434
  • Loading branch information
rvykydal committed Jan 17, 2025
1 parent 49b4979 commit 80c2a46
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion dracut/parse-kickstart
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,11 @@ def process_certificates(handler):
log.error("Missing certificate file name, skipping.")
continue

_dump_certificate(cert)
try:
_dump_certificate(cert)
except OSError as e:
log.error("Dump of certificate %s failed: %s", cert.filename, e)
continue
# Dump for transport to switchroot
_dump_certificate(cert, root=CERT_TRANSPORT_DIR+"/path/")

Expand Down

0 comments on commit 80c2a46

Please sign in to comment.