Bug 2235322 - perl-Crypt-CBC-3.04 of RHEL9 can not decrypt ciphertext created with 'header' => 'randomiv'
Summary: perl-Crypt-CBC-3.04 of RHEL9 can not decrypt ciphertext created with 'header'...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: perl-Crypt-CBC
Version: epel9
Hardware: All
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Paul Howarth
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-08-28 12:38 UTC by Paulo Andrade
Modified: 2023-09-15 18:49 UTC (History)
3 users (show)

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:
Clone Of:
Environment:
Last Closed: 2023-09-14 00:31:56 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
randomiv.patch (587 bytes, patch)
2023-08-28 12:38 UTC, Paulo Andrade
no flags Details | Diff
cbctest1.pl (1.66 KB, text/plain)
2023-08-28 12:41 UTC, Paulo Andrade
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github lstein Lib-Crypt-CBC issues 6 0 None open decrypt issue with randomiv header 2023-09-04 14:25:24 UTC

Description Paulo Andrade 2023-08-28 12:38:10 UTC
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}.

Comment 1 Paulo Andrade 2023-08-28 12:41:39 UTC
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

Comment 2 Fedora Update System 2023-09-05 11:23:01 UTC
FEDORA-2023-861929b0c4 has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2023-861929b0c4

Comment 3 Fedora Update System 2023-09-05 11:23:01 UTC
FEDORA-2023-706d9982c4 has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2023-706d9982c4

Comment 4 Fedora Update System 2023-09-05 11:23:02 UTC
FEDORA-2023-a987ae65e7 has been submitted as an update to Fedora 39. https://bodhi.fedoraproject.org/updates/FEDORA-2023-a987ae65e7

Comment 5 Fedora Update System 2023-09-06 00:23:34 UTC
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.

Comment 6 Fedora Update System 2023-09-06 01:23:58 UTC
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.

Comment 7 Fedora Update System 2023-09-06 01:32:40 UTC
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.

Comment 8 Fedora Update System 2023-09-06 02:15:30 UTC
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.

Comment 9 Fedora Update System 2023-09-14 00:31:56 UTC
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.

Comment 10 Fedora Update System 2023-09-14 00:43:03 UTC
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.

Comment 11 Fedora Update System 2023-09-14 01:27:39 UTC
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.

Comment 12 Fedora Update System 2023-09-15 18:49:12 UTC
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.


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