Package: libconvert-asn1-perl / 0.27-3

Fix-unsafe-decoding-in-indef-case.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
From: Dana Jacobsen <dana@acm.org>
Date: Tue, 29 Oct 2013 08:37:48 -0700
Subject: [1/2] Fix unsafe decoding in indef case
Origin: https://github.com/danaj/perl-Convert-ASN1/commit/ce148a2e0872b708450005cf0b3a944014aae990
Bug: https://github.com/gbarr/perl-Convert-ASN1/issues/14
Bug-Debian: https://bugs.debian.org/956186
Bug-Debian-Security: https://security-tracker.debian.org/tracker/CVE-2013-7488

---
 lib/Convert/ASN1/_decode.pm | 1 +
 1 file changed, 1 insertion(+)

--- a/lib/Convert/ASN1/_decode.pm
+++ b/lib/Convert/ASN1/_decode.pm
@@ -689,6 +689,7 @@ sub _scan_indef {
     if((unpack("C",$tag) & 0x1f) == 0x1f) {
       my $b;
       do {
+	return if $pos >= $end;
 	$tag .= substr($_[0],$pos++,1);
 	$b = ord substr($tag,-1);
       } while($b & 0x80);