Bug 2235322
| Summary: | perl-Crypt-CBC-3.04 of RHEL9 can not decrypt ciphertext created with 'header' => 'randomiv' | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora EPEL | Reporter: | Paulo Andrade <pandrade> | ||||||
| Component: | perl-Crypt-CBC | Assignee: | Paul Howarth <paul> | ||||||
| Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||
| Severity: | low | Docs Contact: | |||||||
| Priority: | unspecified | ||||||||
| Version: | epel9 | CC: | andreas, paul, perl-devel | ||||||
| Target Milestone: | --- | ||||||||
| Target Release: | --- | ||||||||
| Hardware: | All | ||||||||
| OS: | Linux | ||||||||
| Whiteboard: | |||||||||
| Fixed In Version: | perl-Crypt-CBC-3.04-13.el9 perl-Crypt-CBC-3.04-13.fc37 perl-Crypt-CBC-3.04-13.fc38 perl-Crypt-CBC-3.04-13.fc39 | Doc Type: | If docs needed, set a value | ||||||
| Doc Text: | Story Points: | --- | |||||||
| Clone Of: | Environment: | ||||||||
| Last Closed: | 2023-09-14 00:31:56 UTC | Type: | Bug | ||||||
| Regression: | --- | Mount Type: | --- | ||||||
| Documentation: | --- | CRM: | |||||||
| Verified Versions: | Category: | --- | |||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||
| Embargoed: | |||||||||
| Attachments: |
|
||||||||
Created attachment 1985652 [details]
cbctest1.pl
Sample reproducer of the issue.
With the patch it should print:
original: Testtext
encoded: 52616e646f6d49567f45745b8958233779a2e788e8174e4ab4cdaf2c60ea04bd
decoded: Testtext
without the patch, as is currently, it will print something like:
decoded: �(��([f
FEDORA-2023-861929b0c4 has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2023-861929b0c4 FEDORA-2023-706d9982c4 has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2023-706d9982c4 FEDORA-2023-a987ae65e7 has been submitted as an update to Fedora 39. https://bodhi.fedoraproject.org/updates/FEDORA-2023-a987ae65e7 FEDORA-EPEL-2023-2af18ec68f has been pushed to the Fedora EPEL 9 testing repository. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2023-2af18ec68f See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates. FEDORA-2023-861929b0c4 has been pushed to the Fedora 38 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-861929b0c4` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-861929b0c4 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates. FEDORA-2023-a987ae65e7 has been pushed to the Fedora 39 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-a987ae65e7` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-a987ae65e7 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates. FEDORA-2023-706d9982c4 has been pushed to the Fedora 37 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-706d9982c4` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-706d9982c4 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates. FEDORA-EPEL-2023-2af18ec68f has been pushed to the Fedora EPEL 9 stable repository. If problem still persists, please make note of it in this bug report. FEDORA-2023-706d9982c4 has been pushed to the Fedora 37 stable repository. If problem still persists, please make note of it in this bug report. FEDORA-2023-861929b0c4 has been pushed to the Fedora 38 stable repository. If problem still persists, please make note of it in this bug report. FEDORA-2023-a987ae65e7 has been pushed to the Fedora 39 stable repository. If problem still persists, please make note of it in this bug report. |
Created attachment 1985651 [details] randomiv.patch The function sub key_and_iv () in the module Crypt/CBC/PBKDF.pm (part of the perl-Crypt-CBC-3.04-1.el9.noarch) looks like this: sub key_and_iv { ... my $key = substr($hash,0,$self->{key_len}); my $iv = substr($hash,$self->{key_len},$self->{iv_len}); return ($key,$iv); } This function returns the extracted key as first value and the suggested patch fills this first value into the $self->{key}.