Bug 1825496 - Invalid serialization of rfc7512 URI
Summary: Invalid serialization of rfc7512 URI
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: pkcs11-helper
Version: 31
Hardware: All
OS: All
unspecified
unspecified
Target Milestone: ---
Assignee: Kalev Lember
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-04-18 14:50 UTC by Marc Becker
Modified: 2020-05-03 04:54 UTC (History)
4 users (show)

Fixed In Version: pkcs11-helper-1.22-10.fc32 pkcs11-helper-1.22-10.fc30 pkcs11-helper-1.22-10.fc31
Doc Type: ---
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-05-01 04:06:15 UTC
Type: Bug


Attachments (Terms of Use)
Code to verify rfc7512 URI serialization result (733 bytes, text/x-csrc)
2020-04-18 14:50 UTC, Marc Becker
no flags Details
trigger null-byte encoding for __token_attr_escape (597 bytes, patch)
2020-04-18 23:10 UTC, Marc Becker
no flags Details | Diff

Description Marc Becker 2020-04-18 14:50:07 UTC
Created attachment 1679840 [details]
Code to verify rfc7512 URI serialization result

Description of problem:
null-bytes are not serialized correctly

Version-Release number of selected component (if applicable):
1.22-8

How reproducible:
Use libpkc11-helper-1 to serialize PKCS11 IDs containing null bytes

Steps to Reproduce:
1. Deserialize old token format "manufacturer/model/serial/token/0A00"
2. Serialize with Fedora version of pkcs11-helper library

Actual results:
Certificate serialized as "%0A"

Expected results:
Certificate serialized as "%0A%00"

Additional info:
pkcs11h-serialization.c:__token_attr_escape needs additional null-byte check.
strchr(..., 0) accepts string terminator as valid match.

Comment 1 Marc Becker 2020-04-18 23:10:36 UTC
Created attachment 1679913 [details]
trigger null-byte encoding for __token_attr_escape

Comment 2 Fedora Update System 2020-04-24 13:57:27 UTC
FEDORA-2020-6ec6f8ed90 has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-6ec6f8ed90

Comment 3 Fedora Update System 2020-04-24 14:11:06 UTC
FEDORA-2020-9b11b5520f has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2020-9b11b5520f

Comment 4 Fedora Update System 2020-04-24 14:11:13 UTC
FEDORA-2020-bd3a78919a has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2020-bd3a78919a

Comment 5 Fedora Update System 2020-04-25 04:19:06 UTC
FEDORA-2020-9b11b5520f has been pushed to the Fedora 31 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-9b11b5520f`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-9b11b5520f

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 6 Fedora Update System 2020-04-25 04:55:34 UTC
FEDORA-2020-bd3a78919a has been pushed to the Fedora 30 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-bd3a78919a`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-bd3a78919a

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 7 Fedora Update System 2020-04-25 12:21:07 UTC
FEDORA-2020-6ec6f8ed90 has been pushed to the Fedora 32 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-6ec6f8ed90`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-6ec6f8ed90

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 8 Fedora Update System 2020-05-01 04:06:15 UTC
FEDORA-2020-6ec6f8ed90 has been pushed to the Fedora 32 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 9 Fedora Update System 2020-05-03 04:40:50 UTC
FEDORA-2020-bd3a78919a has been pushed to the Fedora 30 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 10 Fedora Update System 2020-05-03 04:54:00 UTC
FEDORA-2020-9b11b5520f has been pushed to the Fedora 31 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.