diff options
author | Uwe Geuder <uwe.geuder+yocto@neuroeventlabs.com> | 2023-04-23 22:43:09 +0300 |
---|---|---|
committer | Anuj Mittal <anuj.mittal@intel.com> | 2023-04-27 11:26:50 +0800 |
commit | 488af577a3f21f038c551612bb0af077fa2b743d (patch) | |
tree | b6d0c4b9aea577732bb40282596ecb0a669eed76 /recipes-core/zlib | |
parent | 472ea60857a56c6b08c64af3f6ed8b23d7cb0d21 (diff) | |
download | meta-intel-488af577a3f21f038c551612bb0af077fa2b743d.tar.gz |
zlib: Clarify fix of CVE-2022-37434
The previous fix added a patch that
* was incomplete
* was not even used in probably most builds because the zlib recipe
in openembedded / poky contains a file with the same name.
Remove the incomplete patch in order to make it clear that the complete
patch from openembedded / poky is used.
Fixes: e64954db ("zlib: fix CVE-2022-37434")
Signed-off-by: Uwe Geuder <uwe.geuder+yocto@neuroeventlabs.com>
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Diffstat (limited to 'recipes-core/zlib')
-rw-r--r-- | recipes-core/zlib/files/CVE-2022-37434.patch | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/recipes-core/zlib/files/CVE-2022-37434.patch b/recipes-core/zlib/files/CVE-2022-37434.patch deleted file mode 100644 index 052cdf60..00000000 --- a/recipes-core/zlib/files/CVE-2022-37434.patch +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | From eff308af425b67093bab25f80f1ae950166bece1 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mark Adler <fork@madler.net> | ||
3 | Date: Sat, 30 Jul 2022 15:51:11 -0700 | ||
4 | Subject: [PATCH] Fix a bug when getting a gzip header extra field with | ||
5 | inflate(). | ||
6 | |||
7 | If the extra field was larger than the space the user provided with | ||
8 | inflateGetHeader(), and if multiple calls of inflate() delivered | ||
9 | the extra header data, then there could be a buffer overflow of the | ||
10 | provided space. This commit assures that provided space is not | ||
11 | exceeded. | ||
12 | |||
13 | Upstream-Status: Backport | ||
14 | [ https://github.com/madler/zlib/commit/eff308af425b67093bab25f80f1ae950166bece1 ] | ||
15 | CVE: CVE-2022-37434 | ||
16 | Signed-off-by: Chee Yang Lee <chee.yang.lee@intel.com> | ||
17 | --- | ||
18 | inflate.c | 5 +++-- | ||
19 | 1 file changed, 3 insertions(+), 2 deletions(-) | ||
20 | |||
21 | diff --git a/inflate.c b/inflate.c | ||
22 | index 7be8c6366..7a7289749 100644 | ||
23 | --- a/inflate.c | ||
24 | +++ b/inflate.c | ||
25 | @@ -763,9 +763,10 @@ int flush; | ||
26 | copy = state->length; | ||
27 | if (copy > have) copy = have; | ||
28 | if (copy) { | ||
29 | + len = state->head->extra_len - state->length; | ||
30 | if (state->head != Z_NULL && | ||
31 | - state->head->extra != Z_NULL) { | ||
32 | - len = state->head->extra_len - state->length; | ||
33 | + state->head->extra != Z_NULL && | ||
34 | + len < state->head->extra_max) { | ||
35 | zmemcpy(state->head->extra + len, next, | ||
36 | len + copy > state->head->extra_max ? | ||
37 | state->head->extra_max - len : copy); | ||