Bug 971096 (CVE-2013-2145) - CVE-2013-2145 perl-Module-Signature: arbitrary code execution when verifying SIGNATURE
Summary: CVE-2013-2145 perl-Module-Signature: arbitrary code execution when verifying ...
Keywords:
Status: CLOSED UPSTREAM
Alias: CVE-2013-2145
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 971098 971099 971447
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-06-05 16:32 UTC by Vincent Danen
Modified: 2023-05-11 23:05 UTC (History)
5 users (show)

Fixed In Version: perl-Module-Signature 0.72
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 971447 (view as bug list)
Environment:
Last Closed: 2019-06-10 11:00:43 UTC
Embargoed:


Attachments (Terms of Use)

Description Vincent Danen 2013-06-05 16:32:42 UTC
The perl Module::Signature module adds signing capabilities to CPAN modules.  The 'cpansign verify' command will automatically download keys and use them to check the signature of CPAN packages via the SIGNATURE file.

The format of the SIGNATURE file includes the cipher to use to match the provided hash; for instance:

SHA1 955ba924e9cd1bafccb4d6d7bd3be25c3ce8bf75 README

If an attacker were to replace this (SHA1) with a special unknown cipher (e.g. 'Special') and were to include in the distribution a 'Digest/Special.pm', the code in this perl module would be executed when 'cpansign -verify' is run.  This will execute arbitrary code with the privileges of the user running cpansign.

Because cpansign will download public keys from a public key repository, the GPG key used to sign the SIGNATURE file may also be suspect; an attacker able to modify a CPAN module distribution file and sign the SIGNATURE file with their own key only has to make their key public.  cpansign will download the attacker's key, validate the SIGNATURE file as being correctly signed, but will then execute code as noted above, if the SIGNATURE file is crafted in this way.

Module::Signature version 0.72 corrects [1],[2] this issue by refusing to load Digest::* modules from relative paths in @INC.

[1] https://github.com/audreyt/module-signature/commit/575f7bd6ba4cc7c92f841e8758f88a131674ebf2
[2] https://github.com/audreyt/module-signature/commit/cbd06b392a73c63159dc5c20ff5b3c8fc88c4896


Acknowledgements:

This issue was discovered by Florian Weimer of the Red Hat Product Security Team.

Comment 1 Vincent Danen 2013-06-05 16:39:36 UTC
Created perl-Module-Signature tracking bugs for this issue

Affects: fedora-all [bug 971098]
Affects: epel-all [bug 971099]

Comment 4 Fedora Update System 2013-06-16 06:13:40 UTC
perl-Module-Signature-0.73-1.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 5 Fedora Update System 2013-06-18 01:32:47 UTC
perl-Module-Signature-0.73-1.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 6 Fedora Update System 2013-06-18 01:35:41 UTC
perl-Module-Signature-0.73-1.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 7 Fedora Update System 2013-06-23 21:33:44 UTC
perl-Module-Signature-0.73-1.el6 has been pushed to the Fedora EPEL 6 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 8 Fedora Update System 2013-06-24 21:05:54 UTC
perl-Module-Signature-0.73-1.el5 has been pushed to the Fedora EPEL 5 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 9 Paul Howarth 2015-02-05 09:21:03 UTC
This is fixed in all current Fedora and EPEL releases.

RHEL-7 has perl-Module-Signature-0.73-2.el7.

I think this bug can be closed.

Comment 10 Product Security DevOps Team 2019-06-10 11:00:43 UTC
This CVE Bugzilla entry is for community support informational purposes only as it does not affect a package in a commercially supported Red Hat product. Refer to the dependent bugs for status of those individual community products.


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