Skip to contentSkip to conversation

glibc: Add and modify CVEs

PATCH New saloni 1 participant 1 message Mar 22, 2021

lore
Share & tools
lore

saloni

author
#0 lore raw

PATCH 1/1 glibc: Add and modify CVEs

Below patch is modified:
1. CVE-2019-25013
The previous patch was modified for dunfell
context and causing conflict for CVE-2021-3326.
Hence, the original patch is backported.

Below patch is added:
1. CVE-2021-3326

---
 .../glibc/glibc/CVE-2019-25013.patch          |  52 +--
 .../glibc/glibc/CVE-2021-3326.patch           | 297 ++++++++++++++++++
 meta/recipes-core/glibc/glibc_2.31.bb         |   3 +-
 3 files changed, 328 insertions(+), 24 deletions(-)
 create mode 100644 meta/recipes-core/glibc/glibc/CVE-2021-3326.patch
meta/recipes-core/glibc/glibc/CVE-2019-25013.patch +29 -23
index 73df1da868..3e446f2818 100644
@@ -8,12 +8,14 @@ area and is not allowed.  The from_euc_kr function used to skip two bytes
 when told to skip over the unknown designation, potentially running over
 the buffer end.
 
-Upstream-Status: Backport [https://sourceware.org/git/?p=glibc.git;a=patch;h=ee7a3144c9922808181009b7b3e50e852fb4999b]
 CVE: CVE-2019-25013
-Signed-off-by: Scott Murray <[email protected]>
-[Refreshed for Dundell context; Makefile changes]
-Signed-off-by: Armin Kuster <[email protected]>
+Upstream Status: Backport [https://sourceware.org/git/?p=glibc.git;a=patch;h=ee7a3144c9922808181009b7b3e50e852fb4999b]
+Comment: No change in any hunk
 
+The previous change was modified for dunfell context, causing conflict
+for CVE-2021-3326. Hence, the original patch is backported.
+
+Signed-off-by: Saloni Jain <[email protected]>
 ---
  iconvdata/Makefile      |  3 ++-
  iconvdata/bug-iconv13.c | 53 +++++++++++++++++++++++++++++++++++++++++
@@ -22,23 +24,25 @@ Signed-off-by: Armin Kuster <[email protected]>
  4 files changed, 59 insertions(+), 9 deletions(-)
  create mode 100644 iconvdata/bug-iconv13.c
 
-Index: git/iconvdata/Makefile
-===================================================================
---- git.orig/iconvdata/Makefile
-+++ git/iconvdata/Makefile
-@@ -73,7 +73,7 @@ modules.so := $(addsuffix .so, $(modules
+diff --git a/iconvdata/Makefile b/iconvdata/Makefile
+index 4ec2741cdc..85009f3390 100644
+--- a/iconvdata/Makefile
++++ b/iconvdata/Makefile
+@@ -73,7 +73,8 @@
  ifeq (yes,$(build-shared))
  tests = bug-iconv1 bug-iconv2 tst-loading tst-e2big tst-iconv4 bug-iconv4 \
        tst-iconv6 bug-iconv5 bug-iconv6 tst-iconv7 bug-iconv8 bug-iconv9 \
 -      bug-iconv10 bug-iconv11 bug-iconv12
-+      bug-iconv10 bug-iconv11 bug-iconv12 bug-iconv13
++      bug-iconv10 bug-iconv11 bug-iconv12 tst-iconv-big5-hkscs-to-2ucs4 \
++       bug-iconv13
  ifeq ($(have-thread-library),yes)
  tests += bug-iconv3
  endif
-Index: git/iconvdata/bug-iconv13.c
-===================================================================
+diff --git a/iconvdata/bug-iconv13.c b/iconvdata/bug-iconv13.c
+new file mode 100644
+index 0000000000..87aaff398e
 --- /dev/null
-+++ git/iconvdata/bug-iconv13.c
++++ b/iconvdata/bug-iconv13.c
 @@ -0,0 +1,53 @@
 +/* bug 24973: Test EUC-KR module
 +   Copyright (C) 2020 Free Software Foundation, Inc.
@@ -93,11 +97,11 @@ Index: git/iconvdata/bug-iconv13.c
 +}
 +
 +#include <support/test-driver.c>
-Index: git/iconvdata/euc-kr.c
-===================================================================
---- git.orig/iconvdata/euc-kr.c
-+++ git/iconvdata/euc-kr.c
-@@ -80,11 +80,7 @@ euckr_from_ucs4 (uint32_t ch, unsigned c
+diff --git a/iconvdata/euc-kr.c b/iconvdata/euc-kr.c
+index b0d56cf3ee..1045bae926 100644
+--- a/iconvdata/euc-kr.c
++++ b/iconvdata/euc-kr.c
+@@ -80,11 +80,7 @@ euckr_from_ucs4 (uint32_t ch, unsigned char *cp)
                                                                              \
      if (ch <= 0x9f)                                                         \
        ++inptr;                                                                      \
@@ -110,11 +114,11 @@ Index: git/iconvdata/euc-kr.c
        {                                                                             \
        /* This is illegal.  */                                               \
        STANDARD_FROM_LOOP_ERR_HANDLER (1);                                   \
-Index: git/iconvdata/ksc5601.h
-===================================================================
---- git.orig/iconvdata/ksc5601.h
-+++ git/iconvdata/ksc5601.h
-@@ -50,15 +50,15 @@ ksc5601_to_ucs4 (const unsigned char **s
+diff --git a/iconvdata/ksc5601.h b/iconvdata/ksc5601.h
+index d3eb3a4ff8..f5cdc72797 100644
+--- a/iconvdata/ksc5601.h
++++ b/iconvdata/ksc5601.h
+@@ -50,15 +50,15 @@ ksc5601_to_ucs4 (const unsigned char **s, size_t avail, unsigned char offset)
    unsigned char ch2;
    int idx;
 
@@ -133,3 +137,5 @@ Index: git/iconvdata/ksc5601.h
    ch2 = (*s)[1];
    if (ch2 < offset || (ch2 - offset) <= 0x20 || (ch2 - offset) >= 0x7f)
      return __UNKNOWN_10646_CHAR;
+--
+2.27.0
meta/recipes-core/glibc/glibc/CVE-2021-3326.patch new file +297 -0

297 lines not on this page · raw message

meta/recipes-core/glibc/glibc_2.31.bb +2 -1
index b75bbb4196..77eb5b481b 100644
@@ -41,9 +41,10 @@ SRC_URI =  "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \
            file://0027-intl-Emit-no-lines-in-bison-generated-files.patch \
            file://0028-inject-file-assembly-directives.patch \
            file://0029-locale-prevent-maybe-uninitialized-errors-with-Os-BZ.patch \
+           file://CVE-2019-25013.patch \
            file://CVE-2020-29562.patch \
            file://CVE-2020-29573.patch \
-           file://CVE-2019-25013.patch \
+           file://CVE-2021-3326.patch \
            "
 S = "${WORKDIR}/git"
 B = "${WORKDIR}/build-${TARGET_SYS}"

--
2.17.1

This message contains information that may be privileged or confidential and is the property of the KPIT Technologies Ltd. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. KPIT Technologies Ltd. does not accept any liability for virus infected mails.