diff --git a/backport-CVE-2021-39537-add-check-for-end-of-string-in-cvtchar-to-handle-a-malformed.patch b/backport-CVE-2021-39537-add-check-for-end-of-string-in-cvtchar-to-handle-a-malformed.patch deleted file mode 100644 index 279c0071f9b136a70ee3362920ca5da1d2c3db8b..0000000000000000000000000000000000000000 --- a/backport-CVE-2021-39537-add-check-for-end-of-string-in-cvtchar-to-handle-a-malformed.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 790a85dbd4a81d5f5d8dd02a44d84f01512ef443 Mon Sep 17 00:00:00 2001 -From: "Thomas E. Dickey" -Date: Mon, 1 Jun 2020 00:02:30 +0000 -Subject: [PATCH] ncurses 6.2 - patch 20200531 - -+ correct configure version-check/warnng for g++ to allow for 10.x -+ re-enable "bel" in konsole-base (report by Nia Huang) -+ add linux-s entry (patch by Alexandre Montaron). -+ drop long-obsolete convert_configure.pl -+ add test/test_parm.c, for checking tparm changes. -+ improve parameter-checking for tparm, adding function _nc_tiparm() to - handle the most-used case, which accepts only numeric parameters - (report/testcase by "puppet-meteor"). -+ use a more conservative estimate of the buffer-size in lib_tparm.c's - save_text() and save_number(), in case the sprintf() function - passes-through unexpected characters from a format specifier - (report/testcase by "puppet-meteor"). -+ add a check for end-of-string in cvtchar to handle a malformed - string in infotocap (report/testcase by "puppet-meteor"). ---- - ncurses/tinfo/captoinfo.c | 9 ++++++--- - 1 file changed, 6 insertions(+), 3 deletions(-) - -diff --git a/ncurses/tinfo/captoinfo.c b/ncurses/tinfo/captoinfo.c -index 8b3b83d..f0b8c31 100644 ---- a/ncurses/tinfo/captoinfo.c -+++ 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); diff --git a/ncurses-6.2.tar.gz b/ncurses-6.3.tar.gz similarity index 32% rename from ncurses-6.2.tar.gz rename to ncurses-6.3.tar.gz index c56d13ea81e7d05c6e156d30faa11a56bf0253c7..f3482d93a1382aa86577befb787343845950e3c7 100644 Binary files a/ncurses-6.2.tar.gz and b/ncurses-6.3.tar.gz differ diff --git a/ncurses-config.patch b/ncurses-config.patch index 18d672c45a9c3c8835ec37d77dcca85eeeef7300..7ca0ccb82e9b44330842d42177c1b5cad5af825d 100644 --- a/ncurses-config.patch +++ b/ncurses-config.patch @@ -1,18 +1,18 @@ diff --git a/misc/gen-pkgconfig.in b/misc/gen-pkgconfig.in -index 8f00b82..009d215 100644 +index a45dd54..8527305 100644 --- a/misc/gen-pkgconfig.in +++ b/misc/gen-pkgconfig.in -@@ -80,7 +80,7 @@ if [ "$includedir" != "/usr/include" ]; then +@@ -83,7 +83,7 @@ if [ "$includedir" != "/usr/include" ]; then fi lib_flags= --for opt in -L$libdir @LDFLAGS@ @EXTRA_LDFLAGS@ @LIBS@ +-for opt in -L$libdir @EXTRA_PKG_LDFLAGS@ @LIBS@ +for opt in -L$libdir @LIBS@ do case $opt in -l*) # LIBS is handled specially below diff --git a/misc/ncurses-config.in b/misc/ncurses-config.in -index 7f8ba69..e483af5 100644 +index 7b02ac2..b64379f 100644 --- a/misc/ncurses-config.in +++ b/misc/ncurses-config.in @@ -41,7 +41,6 @@ exec_prefix="@exec_prefix@" @@ -24,25 +24,31 @@ index 7f8ba69..e483af5 100644 datadir="@datadir@" mandir="@mandir@" @@ -101,7 +100,7 @@ fi - # There is no portable way to find the list of standard library directories. + # There is no portable way to find the list of standard library directories. # Require a POSIX shell anyway, to keep this simple. lib_flags= --for opt in -L$libdir @LDFLAGS@ @EXTRA_LDFLAGS@ $LIBS +-for opt in -L$libdir @EXTRA_PKG_LDFLAGS@ $LIBS +for opt in $LIBS do case $opt in -specs*) # ignore linker specs-files which were used to build library -@@ -113,9 +112,6 @@ do - -L*) - [ -d ${opt##-L} ] || continue - case ${opt##-L} in +@@ -117,13 +116,13 @@ do + lib_check=`echo "x$opt" | sed -e 's/^.-L//'` + [ -d "$lib_check" ] || continue + case "$lib_check" in - @LD_SEARCHPATH@) # skip standard libdir -- continue -- ;; - *) - found=no - for check in $lib_flags -@@ -235,7 +231,6 @@ ENDECHO ++ ////) # skip standard libdir (disabled for multilib) + if [ "$lib_check" = "$libdir" ] + then + lib_first=yes + IFS_save="$IFS" + IFS='|' +- LIBDIRS="@LD_SEARCHPATH@" ++ LIBDIRS="" + for lib_check in $LIBDIRS + do + if [ -d "$lib_check" ] +@@ -271,7 +270,6 @@ ENDECHO echo $INCS ;; --libdir) @@ -50,3 +56,5 @@ index 7f8ba69..e483af5 100644 ;; --mandir) echo "${mandir}" +-- +2.33.0 \ No newline at end of file diff --git a/ncurses-kbs.patch b/ncurses-kbs.patch index 009d907a1d62b46f601cde3f968a7366e25329d3..f3069d7d2953fa3e4790d85f821d70f751879095 100644 --- a/ncurses-kbs.patch +++ b/ncurses-kbs.patch @@ -1,8 +1,8 @@ diff --git a/misc/terminfo.src b/misc/terminfo.src -index c4569b9..24d1de5 100644 +index 650428a..855e644 100644 --- a/misc/terminfo.src +++ b/misc/terminfo.src -@@ -5953,7 +5953,7 @@ rxvt-basic|rxvt terminal base (X Window System), +@@ -6425,7 +6425,7 @@ rxvt-basic|rxvt terminal base (X Window System), enacs=\E(B\E)0, flash=\E[?5h$<100/>\E[?5l, home=\E[H, ht=^I, hts=\EH, ich=\E[%p1%d@, il=\E[%p1%dL, il1=\E[L, ind=\n, is1=\E[?47l\E=\E[?1l, @@ -11,37 +11,39 @@ index c4569b9..24d1de5 100644 kcbt=\E[Z, kmous=\E[M, rc=\E8, rev=\E[7m, ri=\EM, rmacs=^O, rmcup=\E[2J\E[?47l\E8, rmir=\E[4l, rmkx=\E>, rmso=\E[27m, rmul=\E[24m, -@@ -5965,7 +5965,7 @@ rxvt-basic|rxvt terminal base (X Window System), +@@ -6437,7 +6437,7 @@ rxvt-basic|rxvt terminal base (X Window System), %p9%t\016%e\017%;, sgr0=\E[0m\017, smacs=^N, smcup=\E7\E[?47h, smir=\E[4h, smkx=\E=, smso=\E[7m, smul=\E[4m, tbc=\E[3g, use=vt100+enq, -- use=rxvt+pcfkeys, use=vt220+keypad, -+ use=rxvt+pcfkeys, use=vt220+keypad,use=xterm+kbs, +- use=rxvt+pcfkeys, use=vt220+cvis, use=vt220+keypad, ++ use=rxvt+pcfkeys, use=vt220+cvis, use=vt220+keypad, use=xterm+kbs, # Key Codes from rxvt reference: # # Note: Shift + F1-F10 generates F11-F20 -@@ -7468,7 +7468,7 @@ screen|VT 100/ANSI X3.64 virtual terminal, +@@ -8074,7 +8074,7 @@ screen|VT 100/ANSI X3.64 virtual terminal, dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, el=\E[K, el1=\E[1K, enacs=\E(B\E)0, flash=\Eg, home=\E[H, hpa=\E[%i%p1%dG, ht=^I, hts=\EH, ich=\E[%p1%d@, il=\E[%p1%dL, il1=\E[L, - ind=\n, indn=\E[%p1%dS, is2=\E)0, kbs=^H, kcbt=\E[Z, + ind=\n, indn=\E[%p1%dS, is2=\E)0, kcbt=\E[Z, - kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, - kdch1=\E[3~, kend=\E[4~, kf1=\EOP, kf10=\E[21~, - kf11=\E[23~, kf12=\E[24~, kf2=\EOQ, kf3=\EOR, kf4=\EOS, -@@ -7482,6 +7482,7 @@ screen|VT 100/ANSI X3.64 virtual terminal, - sgr0=\E[m\017, smacs=^N, smir=\E[4h, smkx=\E[?1h\E=, + kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, kf1=\EOP, + kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf2=\EOQ, kf3=\EOR, + kf4=\EOS, kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, +@@ -8087,6 +8087,7 @@ screen|VT 100/ANSI X3.64 virtual terminal, smso=\E[3m, smul=\E[4m, tbc=\E[3g, vpa=\E[%i%p1%dd, - E0=\E(B, S0=\E(%p1%c, use=xterm+alt1049, use=ecma+color, -+ use=xterm+kbs, + E0=\E(B, S0=\E(%p1%c, use=vt220+pcedit, + use=xterm+alt1049, use=ecma+color, use=vt100+enq, ++ use=xterm+kbs, # The bce and status-line entries are from screen 3.9.13 (and require some # changes to .screenrc). screen-bce|VT 100/ANSI X3.64 virtual terminal with bce, -@@ -7597,6 +7598,7 @@ screen.xterm-r6|screen customized for X11R6 xterm, +@@ -8202,6 +8203,7 @@ screen.xterm-r6|screen customized for X11R6 xterm, # on Solaris because Sun's curses implementation gets confused. screen.teraterm|disable ncv in teraterm, ncv#127, -+ kbs=^H, ++ kbs=^H, acsc=+\020\,\021-\030.^Y0\333`\004a\261f\370g\361h\260i \316j\331k\277l\332m\300n\305o~p\304q\304r\304s_t\303u \264v\301w\302x\263y\363z\362{\343|\330}\234~\376, +-- +2.33.0 \ No newline at end of file diff --git a/ncurses-libs.patch b/ncurses-libs.patch index ccc613dfeae90db2264dc0c89d22e3e1481a69f7..a2fb2b7a95c9b99413beb784b66ff701f384e898 100644 --- a/ncurses-libs.patch +++ b/ncurses-libs.patch @@ -1,17 +1,17 @@ diff --git a/c++/Makefile.in b/c++/Makefile.in -index 9b22b6a..878098f 100644 +index 99f21da..e25b273 100644 --- a/c++/Makefile.in +++ b/c++/Makefile.in -@@ -114,7 +114,7 @@ LOCAL_LIBDIR = @top_builddir@/lib - - LINK = @LINK_PROGS@ $(LIBTOOL_LINK) @CXXLDFLAGS@ - SHLIB_DIRS = -L../lib --SHLIB_LIST = $(SHLIB_DIRS) -lform@USE_LIB_SUFFIX@ -lmenu@USE_LIB_SUFFIX@ -lpanel@USE_LIB_SUFFIX@ -lncurses@USE_LIB_SUFFIX@ @SHLIB_LIST@ -+SHLIB_LIST = $(SHLIB_DIRS) -lform@USE_LIB_SUFFIX@ -lmenu@USE_LIB_SUFFIX@ -lpanel@USE_LIB_SUFFIX@ -lncurses@USE_LIB_SUFFIX@ #@SHLIB_LIST@ +@@ -118,7 +118,7 @@ SHLIB_LIST = $(SHLIB_DIRS) \ + -l@FORM_NAME@@USE_LIB_SUFFIX@ \ + -l@MENU_NAME@@USE_LIB_SUFFIX@ \ + -l@PANEL_NAME@@USE_LIB_SUFFIX@ \ +- -lncurses@USE_LIB_SUFFIX@ @SHLIB_LIST@ ++ -lncurses@USE_LIB_SUFFIX@ #@SHLIB_LIST@ LIBROOT = ncurses++ -@@ -149,8 +149,7 @@ LDFLAGS_SHARED = $(TEST_LDFLAGS) $(CFLAGS_SHARED) @LD_SHARED_OPTS@ +@@ -157,8 +157,7 @@ LDFLAGS_SHARED = $(TEST_LDFLAGS) $(CFLAGS_SHARED) @LD_SHARED_OPTS@ LDFLAGS_DEFAULT = $(LINK_@DFT_UPR_MODEL@) $(LDFLAGS_@DFT_UPR_MODEL@) # flags for library built by this makefile @@ -22,10 +22,10 @@ index 9b22b6a..878098f 100644 AUTO_SRC = \ etip.h diff --git a/form/Makefile.in b/form/Makefile.in -index 3e5be8d..e3688b6 100644 +index a950a3e..6feb95e 100644 --- a/form/Makefile.in +++ b/form/Makefile.in -@@ -108,7 +108,7 @@ LINK = $(LIBTOOL_LINK) +@@ -110,7 +110,7 @@ LINK = $(LIBTOOL_LINK) LDFLAGS = @LDFLAGS@ @LD_MODEL@ @LIBS@ SHLIB_DIRS = -L../lib @@ -35,10 +35,10 @@ index 3e5be8d..e3688b6 100644 RPATH_LIST = @RPATH_LIST@ RESULTING_SYMS = @RESULTING_SYMS@ diff --git a/menu/Makefile.in b/menu/Makefile.in -index 495651c..7d97437 100644 +index b623bf0..8c0d199 100644 --- a/menu/Makefile.in +++ b/menu/Makefile.in -@@ -108,7 +108,7 @@ LINK = $(LIBTOOL_LINK) +@@ -110,7 +110,7 @@ LINK = $(LIBTOOL_LINK) LDFLAGS = @LDFLAGS@ @LD_MODEL@ @LIBS@ SHLIB_DIRS = -L../lib @@ -48,10 +48,10 @@ index 495651c..7d97437 100644 RPATH_LIST = @RPATH_LIST@ RESULTING_SYMS = @RESULTING_SYMS@ diff --git a/panel/Makefile.in b/panel/Makefile.in -index 5f7b5b9..5958364 100644 +index 380f80c..dfe116e 100644 --- a/panel/Makefile.in +++ b/panel/Makefile.in -@@ -110,7 +110,7 @@ LINK = $(LIBTOOL_LINK) +@@ -112,7 +112,7 @@ LINK = $(LIBTOOL_LINK) LDFLAGS = @LDFLAGS@ @LD_MODEL@ @LIBS@ SHLIB_DIRS = -L../lib @@ -60,3 +60,5 @@ index 5f7b5b9..5958364 100644 RPATH_LIST = @RPATH_LIST@ RESULTING_SYMS = @RESULTING_SYMS@ +-- +2.33.0 \ No newline at end of file diff --git a/ncurses.spec b/ncurses.spec index 19435338b5ca162601ddf6764edf8dbac7467b3d..9a3916fb7ecdd69a3178230f2fd6e6b76abe5a18 100644 --- a/ncurses.spec +++ b/ncurses.spec @@ -1,18 +1,16 @@ Name: ncurses -Version: 6.2 -Release: 3 +Version: 6.3 +Release: 1 Summary: Terminal control library License: MIT URL: https://invisible-island.net/ncurses/ncurses.html -Source0: https://invisible-mirror.net/archives/ncurses/ncurses-6.2.tar.gz +Source0: https://invisible-mirror.net/archives/ncurses/ncurses-%{version}.tar.gz Patch8: ncurses-config.patch Patch9: ncurses-libs.patch Patch11: ncurses-urxvt.patch Patch12: ncurses-kbs.patch -Patch6000: backport-CVE-2021-39537-add-check-for-end-of-string-in-cvtchar-to-handle-a-malformed.patch - BuildRequires: gcc gcc-c++ gpm-devel pkgconfig Requires: %{name}-base = %{version}-%{release} @@ -222,6 +220,12 @@ xz NEWS %{_mandir}/man7/* %changelog +* Sat Feb 19 2022 xinghe - 6.3-1 +- Type:bugfix +- CVE:NA +- SUG:NA +- DESC:update to 6.3 + * Tue Oct 12 2021 xihaochen - 6.2-3 - Type:CVE - CVE:CVE-2021-39537