diff options
| -rw-r--r-- | meta-multimedia/recipes-multimedia/sox/sox/CVE-2017-18189.patch | 34 | ||||
| -rw-r--r-- | meta-multimedia/recipes-multimedia/sox/sox_14.4.2.bb | 1 |
2 files changed, 35 insertions, 0 deletions
diff --git a/meta-multimedia/recipes-multimedia/sox/sox/CVE-2017-18189.patch b/meta-multimedia/recipes-multimedia/sox/sox/CVE-2017-18189.patch new file mode 100644 index 0000000000..3ca829b230 --- /dev/null +++ b/meta-multimedia/recipes-multimedia/sox/sox/CVE-2017-18189.patch | |||
| @@ -0,0 +1,34 @@ | |||
| 1 | From c9e266bc77952c873a28ae320dac2eae5cbc9934 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Mans Rullgard <mans@mansr.com> | ||
| 3 | Date: Thu, 9 Nov 2017 11:45:10 +0000 | ||
| 4 | Subject: [PATCH] xa: validate channel count | ||
| 5 | |||
| 6 | A corrupt header specifying zero channels would send read_channels() | ||
| 7 | into an infinite loop. Prevent this by sanity checking the channel | ||
| 8 | count in open_read(). Also add an upper bound to prevent overflow | ||
| 9 | in multiplication. | ||
| 10 | |||
| 11 | CVE: CVE-2017-18189 | ||
| 12 | Upstream-Status: Backport [https://github.com/mansr/sox/commit/7a8ceb86212b28243bbb6d0de636f0dfbe833e53] | ||
| 13 | Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com> | ||
| 14 | --- | ||
| 15 | src/xa.c | 6 ++++++ | ||
| 16 | 1 file changed, 6 insertions(+) | ||
| 17 | |||
| 18 | diff --git a/src/xa.c b/src/xa.c | ||
| 19 | index 81a7677..9fc086e 100644 | ||
| 20 | --- a/src/xa.c | ||
| 21 | +++ b/src/xa.c | ||
| 22 | @@ -143,6 +143,12 @@ static int startread(sox_format_t * ft) | ||
| 23 | lsx_report("User options overriding rate read in .xa header"); | ||
| 24 | } | ||
| 25 | |||
| 26 | + if (ft->signal.channels == 0 || ft->signal.channels > UINT16_MAX) { | ||
| 27 | + lsx_fail_errno(ft, SOX_EFMT, "invalid channel count %d", | ||
| 28 | + ft->signal.channels); | ||
| 29 | + return SOX_EOF; | ||
| 30 | + } | ||
| 31 | + | ||
| 32 | /* Check for supported formats */ | ||
| 33 | if (ft->encoding.bits_per_sample != 16) { | ||
| 34 | lsx_fail_errno(ft, SOX_EFMT, "%d-bit sample resolution not supported.", | ||
diff --git a/meta-multimedia/recipes-multimedia/sox/sox_14.4.2.bb b/meta-multimedia/recipes-multimedia/sox/sox_14.4.2.bb index 68441b2534..917d1db1f7 100644 --- a/meta-multimedia/recipes-multimedia/sox/sox_14.4.2.bb +++ b/meta-multimedia/recipes-multimedia/sox/sox_14.4.2.bb | |||
| @@ -37,6 +37,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/sox/sox-${PV}.tar.gz \ | |||
| 37 | file://CVE-2017-15371.patch \ | 37 | file://CVE-2017-15371.patch \ |
| 38 | file://CVE-2017-15372.patch \ | 38 | file://CVE-2017-15372.patch \ |
| 39 | file://CVE-2017-15642.patch \ | 39 | file://CVE-2017-15642.patch \ |
| 40 | file://CVE-2017-18189.patch \ | ||
| 40 | " | 41 | " |
| 41 | SRC_URI[md5sum] = "d04fba2d9245e661f245de0577f48a33" | 42 | SRC_URI[md5sum] = "d04fba2d9245e661f245de0577f48a33" |
| 42 | SRC_URI[sha256sum] = "b45f598643ffbd8e363ff24d61166ccec4836fea6d3888881b8df53e3bb55f6c" | 43 | SRC_URI[sha256sum] = "b45f598643ffbd8e363ff24d61166ccec4836fea6d3888881b8df53e3bb55f6c" |
