summaryrefslogtreecommitdiff
path: root/user/libid3tag/CVE-2017-11550.patch
diff options
context:
space:
mode:
authorMax Rees <maxcrees@me.com>2019-08-04 02:28:57 -0500
committerMax Rees <maxcrees@me.com>2019-08-04 02:28:57 -0500
commitf66041941e3b1ab8ec01bad5b41717f75c65c8db (patch)
tree3bebce46e89218789ac81321d6334c383d579886 /user/libid3tag/CVE-2017-11550.patch
parentaa1a18ae17509f67feccf03066c61f3266a44ece (diff)
downloadpackages-f66041941e3b1ab8ec01bad5b41717f75c65c8db.tar.gz
packages-f66041941e3b1ab8ec01bad5b41717f75c65c8db.tar.bz2
packages-f66041941e3b1ab8ec01bad5b41717f75c65c8db.tar.xz
packages-f66041941e3b1ab8ec01bad5b41717f75c65c8db.zip
user/libid3tag: CVE-2017-11550, change fix for CVE-2008-2109 (#126)
Diffstat (limited to 'user/libid3tag/CVE-2017-11550.patch')
-rw-r--r--user/libid3tag/CVE-2017-11550.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/user/libid3tag/CVE-2017-11550.patch b/user/libid3tag/CVE-2017-11550.patch
new file mode 100644
index 000000000..abf6cbd43
--- /dev/null
+++ b/user/libid3tag/CVE-2017-11550.patch
@@ -0,0 +1,33 @@
+Lifted from Debian:
+https://sources.debian.org/patches/libid3tag/0.15.1b-14/11_unknown_encoding.dpatch/
+
+In case of an unknown/invalid encoding, id3_parse_string() will
+return NULL, but the return value wasn't checked resulting
+in segfault in id3_ucs4_length(). This is the only place
+the return value wasn't checked.
+
+--- libid3tag-0.15.1b/compat.gperf 2004-01-23 09:41:32.000000000 +0000
++++ libid3tag-0.15.1b/compat.gperf 2007-01-14 14:36:53.000000000 +0000
+@@ -236,6 +236,10 @@
+
+ encoding = id3_parse_uint(&data, 1);
+ string = id3_parse_string(&data, end - data, encoding, 0);
++ if (!string)
++ {
++ continue;
++ }
+
+ if (id3_ucs4_length(string) < 4) {
+ free(string);
+--- libid3tag-0.15.1b/parse.c 2004-01-23 09:41:32.000000000 +0000
++++ libid3tag-0.15.1b/parse.c 2007-01-14 14:37:34.000000000 +0000
+@@ -165,6 +165,9 @@
+ case ID3_FIELD_TEXTENCODING_UTF_8:
+ ucs4 = id3_utf8_deserialize(ptr, length);
+ break;
++ default:
++ /* FIXME: Unknown encoding! Print warning? */
++ return NULL;
+ }
+
+ if (ucs4 && !full) {