gmp: Fix for CVE-2021-43618
PATCH 1/3 gmp: Fix for CVE-2021-43618
From: Ranjitsinh Rathod <[email protected]>
Add patch to fix CVE-2021-43618
--- .../gmp/gmp/CVE-2021-43618.patch | 29 +++++++++++++++++++ meta/recipes-support/gmp/gmp_6.2.0.bb | 1 + 2 files changed, 30 insertions(+) create mode 100644 meta/recipes-support/gmp/gmp/CVE-2021-43618.patch
meta/recipes-support/gmp/gmp/CVE-2021-43618.patch new file +29 -0
@@ -0,0 +1,29 @@ + +# HG changeset patch +# User Marco Bodrato <[email protected]> +# Date 1634836009 -7200 +# Node ID 561a9c25298e17bb01896801ff353546c6923dbd +# Parent e1fd9db13b475209a864577237ea4b9105b3e96e +mpz/inp_raw.c: Avoid bit size overflows + +CVE: CVE-2021-43618 +Upstream-Status: Backport [https://gmplib.org/repo/gmp-6.2/rev/561a9c25298e] +Signed-off-by: Ranjitsinh Rathod <[email protected]> + +diff -r e1fd9db13b47 -r 561a9c25298e mpz/inp_raw.c +--- a/mpz/inp_raw.c Tue Dec 22 23:49:51 2020 +0100 ++++ b/mpz/inp_raw.c Thu Oct 21 19:06:49 2021 +0200 +@@ -88,8 +88,11 @@ + + abs_csize = ABS (csize); + ++ if (UNLIKELY (abs_csize > ~(mp_bitcnt_t) 0 / 8)) ++ return 0; /* Bit size overflows */ ++ + /* round up to a multiple of limbs */ +- abs_xsize = BITS_TO_LIMBS (abs_csize*8); ++ abs_xsize = BITS_TO_LIMBS ((mp_bitcnt_t) abs_csize * 8); + + if (abs_xsize != 0) + { +
meta/recipes-support/gmp/gmp_6.2.0.bb +1 -0
@@ -12,6 +12,7 @@ SRC_URI = "https://gmplib.org/download/${BPN}/${BP}${REVISION}.tar.bz2 \ file://use-includedir.patch \ file://0001-Append-the-user-provided-flags-to-the-auto-detected-.patch \ file://0001-confiure.ac-Believe-the-cflags-from-environment.patch \ + file://CVE-2021-43618.patch \ " SRC_URI[md5sum] = "c24161e0dd44cae78cd5f67193492a21" SRC_URI[sha256sum] = "f51c99cb114deb21a60075ffb494c1a210eb9d7cb729ed042ddb7de9534451ea"
Signature · 1 line
2.17.1
PATCH 2/3 ncurses: Fix for CVE-2021-39537
From: Ranjitsinh Rathod <[email protected]>
Add patch to fix CVE-2021-39537
--- .../ncurses/files/CVE-2021-39537.patch | 30 +++++++++++++++++++ meta/recipes-core/ncurses/ncurses_6.2.bb | 1 + 2 files changed, 31 insertions(+) create mode 100644 meta/recipes-core/ncurses/files/CVE-2021-39537.patch
meta/recipes-core/ncurses/files/CVE-2021-39537.patch new file +30 -0
@@ -0,0 +1,30 @@ +$NetBSD: patch-ncurses_tinfo_captoinfo.c,v 1.1 2021/10/09 07:52:36 wiz Exp $ + +Fix for CVE-2021-39537 from upstream: +https://github.com/ThomasDickey/ncurses-snapshots/commit/63ca9e061f4644795d6f3f559557f3e1ed8c738b#diff-7e95c7bc5f213e9be438e69a9d5d0f261a14952bcbd692f7b9014217b8047340 + +CVE: CVE-2021-39537 +Upstream-Status: Backport [http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/devel/ncurses/patches/Attic/patch-ncurses_tinfo_captoinfo.c?rev=1.1&content-type=text/x-cvsweb-markup] +Signed-off-by: Ranjitsinh Rathod <[email protected]> + +--- a/ncurses/tinfo/captoinfo.c 2020-02-02 23:34:34.000000000 +0000 ++++ b/ncurses/tinfo/captoinfo.c +@@ -216,12 +216,15 @@ cvtchar(register const char *sp) + } + break; + case '^': ++ len = 2; + c = UChar(*++sp); +- if (c == '?') ++ if (c == '?') { + c = 127; +- else ++ } else if (c == '\0') { ++ len = 1; ++ } else { + c &= 0x1f; +- len = 2; ++ } + break; + default: + c = UChar(*sp);
meta/recipes-core/ncurses/ncurses_6.2.bb +1 -0
@@ -3,6 +3,7 @@ require ncurses.inc SRC_URI += "file://0001-tic-hang.patch \ file://0002-configure-reproducible.patch \ file://0003-gen-pkgconfig.in-Do-not-include-LDFLAGS-in-generated.patch \ + file://CVE-2021-39537.patch \ " # commit id corresponds to the revision in package version SRCREV = "a669013cd5e9d6434e5301348ea51baf306c93c4"
Signature · 1 line
2.17.1
PATCH 3/3 libsolv: update tag for missing CVEs
In reply to Ranjitsinh RathodFrom: Ranjitsinh Rathod <[email protected]>
It seems like CVE-2021-33928, CVE-2021-33929, CVE-2021-33930 and CVE-2021-33938 are pointing to same patch as CVE-2021-3200
So add CVE tag inside the patch file which is the remedy for CVE-2021-33928, CVE-2021-33929, CVE-2021-33930 and CVE-2021-33938
Link:
https://ubuntu.com/security/CVE-2021-3200
https://ubuntu.com/security/CVE-2021-33928
https://ubuntu.com/security/CVE-2021-33929
https://ubuntu.com/security/CVE-2021-33930
https://ubuntu.com/security/CVE-2021-33938
--- meta/recipes-extended/libsolv/files/CVE-2021-3200.patch | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
meta/recipes-extended/libsolv/files/CVE-2021-3200.patch +7 -2
@@ -11,9 +11,14 @@ been added. (Jobs may point inside the whatproviedes array, so we must not invalidate this area.) -Upstream-Status: Backport -https://github.com/openSUSE/libsolv/commit/0077ef29eb46d2e1df2f230fc95a1d9748d49dec +Upstream-Status: Backport [https://github.com/openSUSE/libsolv/commit/0077ef29eb46d2e1df2f230fc95a1d9748d49dec] CVE: CVE-2021-3200 +CVE: CVE-2021-33928 +CVE: CVE-2021-33929 +CVE: CVE-2021-33930 +CVE: CVE-2021-33938 +Signed-off-by: Ranjitsinh Rathod <[email protected]> + Signed-off-by: Chee Yang Lee <[email protected]> --- ext/testcase.c | 21 +++++++++++++++++++++
Signature · 1 line
2.17.1