diff options
| author | Ranjitsinh Rathod <ranjitsinh.rathod@kpit.com> | 2021-12-02 15:48:03 +0530 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-12-08 20:28:01 +0000 |
| commit | 80132fb2df0ee7a6a8aa96f37a25b649e07c7c22 (patch) | |
| tree | d4257a098ee2596853e1f0b76a288868326e78a7 | |
| parent | 0e5c82c4c929f36a5a64ff930ee38b16a214c593 (diff) | |
| download | poky-80132fb2df0ee7a6a8aa96f37a25b649e07c7c22.tar.gz | |
ncurses: Fix for CVE-2021-39537
Add patch to fix CVE-2021-39537
Link: 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
(From OE-Core rev: abe9e7aec3b3363927eed014775145c55710fa07)
Signed-off-by: Ranjitsinh Rathod <ranjitsinh.rathod@kpit.com>
Signed-off-by: Ranjitsinh Rathod <ranjitsinhrathod1991@gmail.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/recipes-core/ncurses/files/CVE-2021-39537.patch | 30 | ||||
| -rw-r--r-- | meta/recipes-core/ncurses/ncurses_6.2.bb | 1 |
2 files changed, 31 insertions, 0 deletions
diff --git a/meta/recipes-core/ncurses/files/CVE-2021-39537.patch b/meta/recipes-core/ncurses/files/CVE-2021-39537.patch new file mode 100644 index 0000000000..7655200350 --- /dev/null +++ b/meta/recipes-core/ncurses/files/CVE-2021-39537.patch | |||
| @@ -0,0 +1,30 @@ | |||
| 1 | $NetBSD: patch-ncurses_tinfo_captoinfo.c,v 1.1 2021/10/09 07:52:36 wiz Exp $ | ||
| 2 | |||
| 3 | Fix for CVE-2021-39537 from upstream: | ||
| 4 | https://github.com/ThomasDickey/ncurses-snapshots/commit/63ca9e061f4644795d6f3f559557f3e1ed8c738b#diff-7e95c7bc5f213e9be438e69a9d5d0f261a14952bcbd692f7b9014217b8047340 | ||
| 5 | |||
| 6 | CVE: CVE-2021-39537 | ||
| 7 | 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] | ||
| 8 | Signed-off-by: Ranjitsinh Rathod <ranjitsinh.rathod@kpit.com> | ||
| 9 | |||
| 10 | --- a/ncurses/tinfo/captoinfo.c 2020-02-02 23:34:34.000000000 +0000 | ||
| 11 | +++ b/ncurses/tinfo/captoinfo.c | ||
| 12 | @@ -216,12 +216,15 @@ cvtchar(register const char *sp) | ||
| 13 | } | ||
| 14 | break; | ||
| 15 | case '^': | ||
| 16 | + len = 2; | ||
| 17 | c = UChar(*++sp); | ||
| 18 | - if (c == '?') | ||
| 19 | + if (c == '?') { | ||
| 20 | c = 127; | ||
| 21 | - else | ||
| 22 | + } else if (c == '\0') { | ||
| 23 | + len = 1; | ||
| 24 | + } else { | ||
| 25 | c &= 0x1f; | ||
| 26 | - len = 2; | ||
| 27 | + } | ||
| 28 | break; | ||
| 29 | default: | ||
| 30 | c = UChar(*sp); | ||
diff --git a/meta/recipes-core/ncurses/ncurses_6.2.bb b/meta/recipes-core/ncurses/ncurses_6.2.bb index 76f0cf97f4..700464f70b 100644 --- a/meta/recipes-core/ncurses/ncurses_6.2.bb +++ b/meta/recipes-core/ncurses/ncurses_6.2.bb | |||
| @@ -3,6 +3,7 @@ require ncurses.inc | |||
| 3 | SRC_URI += "file://0001-tic-hang.patch \ | 3 | SRC_URI += "file://0001-tic-hang.patch \ |
| 4 | file://0002-configure-reproducible.patch \ | 4 | file://0002-configure-reproducible.patch \ |
| 5 | file://0003-gen-pkgconfig.in-Do-not-include-LDFLAGS-in-generated.patch \ | 5 | file://0003-gen-pkgconfig.in-Do-not-include-LDFLAGS-in-generated.patch \ |
| 6 | file://CVE-2021-39537.patch \ | ||
| 6 | " | 7 | " |
| 7 | # commit id corresponds to the revision in package version | 8 | # commit id corresponds to the revision in package version |
| 8 | SRCREV = "a669013cd5e9d6434e5301348ea51baf306c93c4" | 9 | SRCREV = "a669013cd5e9d6434e5301348ea51baf306c93c4" |
