From cbf1f4c6a4a59ad7cf67d0e1459abaafa41899cb Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Mar 08 2021 09:17:43 +0000 Subject: import screen-4.1.0-0.27.20120314git3c2946.el7_9 --- diff --git a/SOURCES/screen-4.1.0-CVE-2021-26937.patch b/SOURCES/screen-4.1.0-CVE-2021-26937.patch new file mode 100644 index 0000000..f326371 --- /dev/null +++ b/SOURCES/screen-4.1.0-CVE-2021-26937.patch @@ -0,0 +1,74 @@ +diff -urNp a/src/ansi.c b/src/ansi.c +--- a/src/ansi.c 2021-02-18 08:54:07.204178181 +0100 ++++ b/src/ansi.c 2021-02-18 08:56:24.814479439 +0100 +@@ -691,10 +691,6 @@ register int len; + } + curr->w_rend.font = 0; + } +-# ifdef DW_CHARS +- if (curr->w_encoding == UTF8 && utf8_isdouble(c)) +- curr->w_mbcs = 0xff; +-# endif + if (curr->w_encoding == UTF8 && c >= 0x0300 && utf8_iscomb(c)) + { + int ox, oy; +@@ -729,6 +725,11 @@ register int len; + } + break; + } ++# ifdef DW_CHARS ++ if (curr->w_encoding == UTF8 && utf8_isdouble(c)) ++ curr->w_mbcs = 0xff; ++# endif ++ + font = curr->w_rend.font; + # endif + # ifdef DW_CHARS +diff -urNp a/src/encoding.c b/src/encoding.c +--- a/src/encoding.c 2021-02-18 08:54:07.193178077 +0100 ++++ b/src/encoding.c 2021-02-18 08:58:01.007386136 +0100 +@@ -43,7 +43,7 @@ static int encmatch __P((char *, char * + # ifdef UTF8 + static int recode_char __P((int, int, int)); + static int recode_char_to_encoding __P((int, int)); +-static void comb_tofront __P((int, int)); ++static void comb_tofront __P((int)); + # ifdef DW_CHARS + static int recode_char_dw __P((int, int *, int, int)); + static int recode_char_dw_to_encoding __P((int, int *, int)); +@@ -1012,11 +1012,12 @@ int c; + } + + static void +-comb_tofront(root, i) +-int root, i; ++comb_tofront(i) ++int i; + { + for (;;) + { ++ int root = i >= 0x700 ? 0x801 : 0x800; + debug1("bring to front: %x\n", i); + combchars[combchars[i]->prev]->next = combchars[i]->next; + combchars[combchars[i]->next]->prev = combchars[i]->prev; +@@ -1078,9 +1079,9 @@ struct mchar *mc; + { + /* full, recycle old entry */ + if (c1 >= 0xd800 && c1 < 0xe000) +- comb_tofront(root, c1 - 0xd800); ++ comb_tofront(c1 - 0xd800); + i = combchars[root]->prev; +- if (c1 == i + 0xd800) ++ if (i == 0x800 || i == 0x801 || c1 == i + 0xd800) + { + /* completely full, can't recycle */ + debug("utf8_handle_comp: completely full!\n"); +@@ -1103,7 +1104,7 @@ struct mchar *mc; + mc->image = i & 0xff; + mc->font = (i >> 8) + 0xd8; + debug3("combinig char %x %x -> %x\n", c1, c, i + 0xd800); +- comb_tofront(root, i); ++ comb_tofront(i); + } + + #else /* !UTF8 */ diff --git a/SPECS/screen.spec b/SPECS/screen.spec index f146d77..e0493e8 100644 --- a/SPECS/screen.spec +++ b/SPECS/screen.spec @@ -4,7 +4,7 @@ Summary: A screen manager that supports multiple logins on one terminal Name: screen Version: 4.1.0 -Release: 0.26.20120314git3c2946%{?dist} +Release: 0.27.20120314git3c2946%{?dist} License: GPLv2+ Group: Applications/System URL: http://www.gnu.org/software/screen @@ -38,6 +38,7 @@ Patch13: screen-reattach.patch Patch14: screen-STIG-GEN003660.patch Patch15: screen-4.1.0-caption-padding.patch Patch16: screen-bracketed_paste.patch +Patch17: screen-4.1.0-CVE-2021-26937.patch %description The screen utility allows you to have multiple logins on just one @@ -67,7 +68,7 @@ support multiple logins on one terminal. %patch14 -p2 -b .STIG-GEN003660 %patch15 -p2 -b .caption-padding %patch16 -p2 -b .bracketed-paste - +%patch17 -p2 -b .CVE-2021-26937 %build ./autogen.sh @@ -163,6 +164,9 @@ fi %endif %changelog +* Thu Feb 18 2021 Josef Ridky - 4.1.0-0.27.2012314git3c2946 +- fix CVE-2021-26937 (#1927063) + * Tue Feb 04 2020 Václav Doležal - 4.1.0-0.26.2012314git3c2946 - Resolves: #1791793 - backport Bracketed Past Mode support