Bug 1075478 - Crash in Digest::SHA if a method is invoked on an uninitialized object
Summary: Crash in Digest::SHA if a method is invoked on an uninitialized object
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: perl-Digest-SHA
Version: 20
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Petr Pisar
QA Contact: Fedora Extras Quality Assurance
URL: http://nntp.perl.org/group/perl.perl5...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-03-12 09:08 UTC by Petr Pisar
Modified: 2014-07-02 13:20 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1075504 1075514 (view as bug list)
Environment:
Last Closed: 2014-07-02 13:20:35 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Fix (1.57 KB, patch)
2014-03-12 09:40 UTC, Petr Pisar
no flags Details | Diff

Description Petr Pisar 2014-03-12 09:08:26 UTC
If Digest::SHA's method is called on an unintialized object (missing Digest::SHA->new()), the Digest::SHA crashes:

$ perl -MData::Dumper -e 'use Digest::SHA; $d=Digest::SHA->add(); print Data::Dumper::Dumper(\$d);'
Segmentation fault

$ perl -e 'use Digest::SHA; print Digest::SHA->add(qq(a))->hexdigest'
Segmentation fault

This has been fixed in Digest-SHA-5.87. F19 and F20 are affected.

Comment 1 Petr Pisar 2014-03-12 09:40:02 UTC
Test:

perl -e 'use Digest::SHA; $d=Digest::SHA->add(qq(a)); for (qw(shaclose shadump shadup shaload shaopen sharewind shawrite hashsize add digest)) { eval {$d->$_}; die "$_: $@" unless $@ =~ /on an undefined value/ }'

Comment 2 Petr Pisar 2014-03-12 09:40:44 UTC
Created attachment 873411 [details]
Fix

Comment 3 Fedora Update System 2014-03-12 09:54:33 UTC
perl-Digest-SHA-5.85-5.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/perl-Digest-SHA-5.85-5.fc20

Comment 4 Fedora Update System 2014-03-12 09:54:52 UTC
perl-Digest-SHA-5.85-2.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/perl-Digest-SHA-5.85-2.fc19

Comment 5 Fedora Update System 2014-03-21 09:28:30 UTC
perl-Digest-SHA-5.85-5.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 6 Fedora Update System 2014-03-21 09:38:10 UTC
perl-Digest-SHA-5.85-2.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, 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.