summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/perl/libconvert-asn1-perl/CVE-2013-7488.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-extended/perl/libconvert-asn1-perl/CVE-2013-7488.patch')
-rw-r--r--meta/recipes-extended/perl/libconvert-asn1-perl/CVE-2013-7488.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/meta/recipes-extended/perl/libconvert-asn1-perl/CVE-2013-7488.patch b/meta/recipes-extended/perl/libconvert-asn1-perl/CVE-2013-7488.patch
new file mode 100644
index 0000000000..d0aca65393
--- /dev/null
+++ b/meta/recipes-extended/perl/libconvert-asn1-perl/CVE-2013-7488.patch
@@ -0,0 +1,35 @@
1From 8070c6a4931801b6550c79c5766dfd3a99976036 Mon Sep 17 00:00:00 2001
2From: Changqing Li <changqing.li@windriver.com>
3Date: Thu, 8 Jul 2021 14:48:36 +0800
4Subject: [PATCH] Merge pull request #15 from danaj/danaj/unsafe-decoding
5
6Upstream-Status: Backport[https://github.com/gbarr/perl-Convert-ASN1/commit/108e784417db7893f348c381c837537c3bd39373]
7CVE: CVE-2013-7488
8
9Signed-off-by: Changqing Li <changqing.li@windriver.com>
10---
11 lib/Convert/ASN1/_decode.pm | 2 ++
12 1 file changed, 2 insertions(+)
13
14diff --git a/lib/Convert/ASN1/_decode.pm b/lib/Convert/ASN1/_decode.pm
15index cd173f9..495e1bf 100644
16--- a/lib/Convert/ASN1/_decode.pm
17+++ b/lib/Convert/ASN1/_decode.pm
18@@ -683,12 +683,14 @@ sub _scan_indef {
19 $pos += 2;
20 next;
21 }
22+ return if $pos >= $end;
23
24 my $tag = substr($_[0], $pos++, 1);
25
26 if((unpack("C",$tag) & 0x1f) == 0x1f) {
27 my $b;
28 do {
29+ return if $pos >= $end;
30 $tag .= substr($_[0],$pos++,1);
31 $b = ord substr($tag,-1);
32 } while($b & 0x80);
33--
342.17.1
35