diff options
author | Chee Yang Lee <chee.yang.lee@intel.com> | 2022-04-01 18:00:12 +0800 |
---|---|---|
committer | Anuj Mittal <anuj.mittal@intel.com> | 2022-04-05 13:53:26 +0800 |
commit | daf5c125a744d45d8fa395b576147edd5a714f5c (patch) | |
tree | 396ba22a0c4aaddb763c65873bd5309a6f1abdd6 /recipes-core/zlib/files/fix-removed-last-lit.patch | |
parent | a9fa3b1c452a867c203a16ef98d15b5b496a4f6f (diff) | |
download | meta-intel-daf5c125a744d45d8fa395b576147edd5a714f5c.tar.gz |
zlib: fix CVE-2018-25032
CVE-2018-25032 fixes at oe-core causing fuzz and build error,
backport the patch with fuzz fixed and another patch to fix build error.
Signed-off-by: Chee Yang Lee <chee.yang.lee@intel.com>
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Diffstat (limited to 'recipes-core/zlib/files/fix-removed-last-lit.patch')
-rw-r--r-- | recipes-core/zlib/files/fix-removed-last-lit.patch | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/recipes-core/zlib/files/fix-removed-last-lit.patch b/recipes-core/zlib/files/fix-removed-last-lit.patch new file mode 100644 index 00000000..238ecfbe --- /dev/null +++ b/recipes-core/zlib/files/fix-removed-last-lit.patch | |||
@@ -0,0 +1,41 @@ | |||
1 | From bf7f8fd281afee27c160cd1e904b2ff52eb9e493 Mon Sep 17 00:00:00 2001 | ||
2 | From: Chee Yang Lee <chee.yang.lee@intel.com> | ||
3 | Date: Thu, 31 Mar 2022 22:00:10 +0800 | ||
4 | Subject: [PATCH] fix removed last_lit | ||
5 | |||
6 | last_lit removed and replaced with sym_next while fix for | ||
7 | CVE-2018-25032. causing build error for deflate_medium.c. | ||
8 | |||
9 | | deflate_medium.c: In function 'deflate_medium': | ||
10 | | deflate_medium.c:308:12: error: 'deflate_state' {aka 'struct | ||
11 | internal_state'} has no member named 'last_lit'; did you mean | ||
12 | 'last_flush'? | ||
13 | | 308 | if (s->last_lit) | ||
14 | | | ^~~~~~~~ | ||
15 | | | last_flush | ||
16 | | make: *** [Makefile:307: deflate_medium.lo] Error 1 | ||
17 | |||
18 | |||
19 | Upstream-Status: Inappropriate | ||
20 | [upstream have not taken the CVE fix patches] | ||
21 | Signed-off-by: Chee Yang Lee <chee.yang.lee@intel.com> | ||
22 | --- | ||
23 | deflate_medium.c | 2 +- | ||
24 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
25 | |||
26 | diff --git a/deflate_medium.c b/deflate_medium.c | ||
27 | index 582e8b2..30f7633 100644 | ||
28 | --- a/deflate_medium.c | ||
29 | +++ b/deflate_medium.c | ||
30 | @@ -305,7 +305,7 @@ block_state deflate_medium(deflate_state *s, int flush) | ||
31 | FLUSH_BLOCK(s, 1); | ||
32 | return finish_done; | ||
33 | } | ||
34 | - if (s->last_lit) | ||
35 | + if (s->sym_next) | ||
36 | FLUSH_BLOCK(s, 0); | ||
37 | return block_done; | ||
38 | } | ||
39 | -- | ||
40 | 2.35.1 | ||
41 | |||