Compare commits
10 Commits
325932a576
...
e1cd8b12ed
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e1cd8b12ed | ||
|
|
acd6d6acf1 | ||
|
|
9981495b7b | ||
|
|
f2eb5a1684 | ||
|
|
948598689a | ||
|
|
26f7b3a5cc | ||
|
|
fbad82b37e | ||
|
|
221e669d4d | ||
|
|
164ce98b2a | ||
|
|
5f3eac4255 |
61
backport-CVE-2021-26937.patch
Normal file
61
backport-CVE-2021-26937.patch
Normal file
@ -0,0 +1,61 @@
|
||||
Description: [CVE-2021-26937] Fix out of bounds array access
|
||||
Author: Michael Schröder <mls@suse.de>
|
||||
Bug-Debian: https://bugs.debian.org/982435
|
||||
Bug: https://savannah.gnu.org/bugs/?60030
|
||||
Bug: https://lists.gnu.org/archive/html/screen-devel/2021-02/msg00000.html
|
||||
Bug-OSS-Security: https://www.openwall.com/lists/oss-security/2021/02/09/3
|
||||
Origin: https://lists.gnu.org/archive/html/screen-devel/2021-02/msg00010.html
|
||||
|
||||
--- a/encoding.c
|
||||
+++ b/encoding.c
|
||||
@@ -43,7 +43,7 @@
|
||||
# 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));
|
||||
@@ -1093,15 +1093,18 @@
|
||||
{ 0xE0100, 0xE01EF }
|
||||
};
|
||||
|
||||
+ if (c >= 0xdf00 && c <= 0xdfff)
|
||||
+ return 1; /* dw combining sequence */
|
||||
return bisearch(c, combining, sizeof(combining) / sizeof(struct interval) - 1);
|
||||
}
|
||||
|
||||
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;
|
||||
@@ -1163,9 +1166,9 @@
|
||||
{
|
||||
/* 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");
|
||||
@@ -1189,7 +1192,7 @@
|
||||
mc->font = (i >> 8) + 0xd8;
|
||||
mc->fontx = 0;
|
||||
debug3("combinig char %x %x -> %x\n", c1, c, i + 0xd800);
|
||||
- comb_tofront(root, i);
|
||||
+ comb_tofront(i);
|
||||
}
|
||||
|
||||
#else /* !UTF8 */
|
||||
43
backport-CVE-2023-24626.patch
Normal file
43
backport-CVE-2023-24626.patch
Normal file
@ -0,0 +1,43 @@
|
||||
From 6df4a48ff6b31bedc2d0216b84dbe66cf9ca5e23 Mon Sep 17 00:00:00 2001
|
||||
From: Alexander Naumov <alexander_naumov@opensuse.org>
|
||||
Date: Wed, 1 Feb 2023 13:47:57 +0200
|
||||
Subject: [PATCH] Missing signal sending permission check on failed query
|
||||
messages
|
||||
|
||||
When run as setuid root, one can send a query message to the
|
||||
privileged screen process via its unix socket in order to force
|
||||
it to send SIGHUP to a PID that can be freely specified in the
|
||||
query packet.
|
||||
Processes that do not explicitly handle SIGHUP will simply terminate
|
||||
|
||||
Signed-off-by: Alexander Naumov <alexander_naumov@opensuse.org>
|
||||
---
|
||||
socket.c | 9 +++++++--
|
||||
1 file changed, 7 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/socket.c b/socket.c
|
||||
index bb68b35..0a575cf 100644
|
||||
--- a/socket.c
|
||||
+++ b/socket.c
|
||||
@@ -1285,11 +1285,16 @@ ReceiveMsg()
|
||||
else
|
||||
queryflag = -1;
|
||||
|
||||
- Kill(m.m.command.apid,
|
||||
+ if (CheckPid(m.m.command.apid)) {
|
||||
+ Msg(0, "Query attempt with bad pid(%d)!", m.m.command.apid);
|
||||
+ }
|
||||
+ else {
|
||||
+ Kill(m.m.command.apid,
|
||||
(queryflag >= 0)
|
||||
? SIGCONT
|
||||
: SIG_BYE); /* Send SIG_BYE if an error happened */
|
||||
- queryflag = -1;
|
||||
+ queryflag = -1;
|
||||
+ }
|
||||
}
|
||||
break;
|
||||
case MSG_COMMAND:
|
||||
--
|
||||
2.27.0
|
||||
|
||||
43
screen.spec
43
screen.spec
@ -1,19 +1,23 @@
|
||||
Name: screen
|
||||
Epoch: 1
|
||||
Version: 4.8.0
|
||||
Release: 1
|
||||
Release: 6
|
||||
Summary: A full-screen window manager
|
||||
License: GPLv3+
|
||||
URL: http://www.gnu.org/software/screen
|
||||
Source0: http://ftp.gnu.org/gnu/screen/screen-%{version}.tar.gz
|
||||
Source1: screen.pam
|
||||
|
||||
Patch0: screen-4.3.1-screenrc.patch
|
||||
Patch1: screen-E3.patch
|
||||
Patch2: screen-4.3.1-suppress_remap.patch
|
||||
Patch3: screen-4.3.1-crypt.patch
|
||||
Patch1: screen-4.3.1-screenrc.patch
|
||||
Patch2: screen-E3.patch
|
||||
Patch3: screen-4.3.1-suppress_remap.patch
|
||||
Patch4: screen-4.3.1-crypt.patch
|
||||
Patch5: backport-CVE-2021-26937.patch
|
||||
|
||||
Patch6001: backport-CVE-2023-24626.patch
|
||||
|
||||
BuildRequires: automake autoconf gcc ncurses-devel texinfo
|
||||
BuildRequires: systemd
|
||||
Requires: shadow-utils
|
||||
Requires(preun): info
|
||||
Requires(post): info
|
||||
@ -41,7 +45,6 @@ autoreconf -fiv
|
||||
--enable-colors256 \
|
||||
--enable-rxvt_osc \
|
||||
--enable-use-locale \
|
||||
--enable-telnet \
|
||||
--with-pty-mode=0620 \
|
||||
--with-sys-screenrc="%{_sysconfdir}/screenrc" \
|
||||
--with-socket-dir="%{_rundir}/screen"
|
||||
@ -97,6 +100,30 @@ fi
|
||||
%{_infodir}/screen.info*
|
||||
|
||||
%changelog
|
||||
* Thu Apr 20 2023 hongjinghao <hongjinghao@huawei.com> - 1:4.8.0-6
|
||||
- fix CVE-2023-24626
|
||||
|
||||
* Fri Jun 4 2021 panxiaohe <panxiaohe@huawei.com> - 1:4.8.0-5
|
||||
- add systemd to BuildRequires to use _tmpfilesdir macro
|
||||
|
||||
* Wed Mar 31 2021 panxiaohe <panxiaohe@huawei.com> - 1:4.8.0-4
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC:fix wrong changelog
|
||||
|
||||
* Fri Feb 26 2021 lirui <lirui130@huawei.com> - 1:4.8.0-3
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC:fix CVE-2021-26937
|
||||
|
||||
* Fri Jan 8 2021 zoulin <zoulin13@huawei.com> - 1:4.8.0-2
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC:remove '-enable-telnet' in configure.
|
||||
|
||||
* Wed Aug 26 2020 linwei <linwei54@huawei.com> - 1:4.8.0-1
|
||||
- Type:enhancement
|
||||
- ID:NA
|
||||
@ -121,10 +148,10 @@ fi
|
||||
- SUG:NA
|
||||
- DESC:add build requires of texinfo to solve the problem of build
|
||||
|
||||
* Tue Sep 26 2019 openEuler Buildteam <buildteam@openeuler.org> - 1:4.6.2-3
|
||||
* Thu Sep 26 2019 openEuler Buildteam <buildteam@openeuler.org> - 1:4.6.2-3
|
||||
- Modify requires
|
||||
|
||||
* Tue Sep 26 2019 openEuler Buildteam <buildteam@openeuler.org> - 1:4.6.2-2
|
||||
* Thu Sep 26 2019 openEuler Buildteam <buildteam@openeuler.org> - 1:4.6.2-2
|
||||
- Adjust requires
|
||||
|
||||
* Sat Sep 7 2019 openEuler Buildteam <buildteam@openeuler.org> - 1:4.6.2-1
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user