Red Hat Bugzilla – Bug 985428
p11-kit: potential interpretation conflict in PEM/DER decoding
Last modified: 2017-08-01 12:52:09 EDT
It seems that the code first tries to parse a certificate as PEM, discarding everything before the "-----BEGIN" marker. If it's possible to create a DER-encoded certificate that doesn't have a NUL character before the marker, then p11-kit might interpret that certificate differently from the rest of the world. DER parsing seems more restrictive, so it might make sense to try it first.
Makes sense, although may lower the loading performance. Still, this requires the administrator manually add contrived certificates. So moving this to future work, rather than making changes in the stable branch. Hope that's okay.
This needs work in Fedora before updating it in RHEL, bumping to RHEL 7.2
A patch and test case are attached to the upstream bug.
Reviewed upstream.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHEA-2017:1981