diff options
Diffstat (limited to 'meta/recipes-extended/bzip2/bzip2-1.0.6/CVE-2019-12900.patch')
| -rw-r--r-- | meta/recipes-extended/bzip2/bzip2-1.0.6/CVE-2019-12900.patch | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/meta/recipes-extended/bzip2/bzip2-1.0.6/CVE-2019-12900.patch b/meta/recipes-extended/bzip2/bzip2-1.0.6/CVE-2019-12900.patch new file mode 100644 index 0000000000..9841644881 --- /dev/null +++ b/meta/recipes-extended/bzip2/bzip2-1.0.6/CVE-2019-12900.patch | |||
| @@ -0,0 +1,33 @@ | |||
| 1 | From 11e1fac27eb8a3076382200736874c78e09b75d6 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Albert Astals Cid <aacid@kde.org> | ||
| 3 | Date: Tue, 28 May 2019 19:35:18 +0200 | ||
| 4 | Subject: [PATCH] Make sure nSelectors is not out of range | ||
| 5 | |||
| 6 | nSelectors is used in a loop from 0 to nSelectors to access selectorMtf | ||
| 7 | which is | ||
| 8 | UChar selectorMtf[BZ_MAX_SELECTORS]; | ||
| 9 | so if nSelectors is bigger than BZ_MAX_SELECTORS it'll do an invalid memory | ||
| 10 | access | ||
| 11 | |||
| 12 | Fixes out of bounds access discovered while fuzzying karchive | ||
| 13 | CVE: CVE-2019-12900 | ||
| 14 | Upstream-Status: Backport | ||
| 15 | Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> | ||
| 16 | |||
| 17 | --- | ||
| 18 | decompress.c | 2 +- | ||
| 19 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 20 | |||
| 21 | diff --git a/decompress.c b/decompress.c | ||
| 22 | index 311f566..b6e0a29 100644 | ||
| 23 | --- a/decompress.c | ||
| 24 | +++ b/decompress.c | ||
| 25 | @@ -287,7 +287,7 @@ Int32 BZ2_decompress ( DState* s ) | ||
| 26 | GET_BITS(BZ_X_SELECTOR_1, nGroups, 3); | ||
| 27 | if (nGroups < 2 || nGroups > 6) RETURN(BZ_DATA_ERROR); | ||
| 28 | GET_BITS(BZ_X_SELECTOR_2, nSelectors, 15); | ||
| 29 | - if (nSelectors < 1) RETURN(BZ_DATA_ERROR); | ||
| 30 | + if (nSelectors < 1 || nSelectors > BZ_MAX_SELECTORS) RETURN(BZ_DATA_ERROR); | ||
| 31 | for (i = 0; i < nSelectors; i++) { | ||
| 32 | j = 0; | ||
| 33 | while (True) { | ||
