diff --git a/SOURCES/ksh-20120801-stack-robustness-2.patch b/SOURCES/ksh-20120801-stack-robustness-2.patch new file mode 100644 index 0000000..d125f6e --- /dev/null +++ b/SOURCES/ksh-20120801-stack-robustness-2.patch @@ -0,0 +1,12 @@ +diff -up ksh-20120801/src/lib/libast/misc/stk.c.orig ksh-20120801/src/lib/libast/misc/stk.c +--- ksh-20120801/src/lib/libast/misc/stk.c.orig 2022-01-31 16:06:11.923069379 -0300 ++++ ksh-20120801/src/lib/libast/misc/stk.c 2022-01-31 16:06:54.896802455 -0300 +@@ -76,7 +76,7 @@ struct frame + struct stk + { + _stk_overflow_ stkoverflow; /* called when malloc fails */ +- short stkref; /* reference count; */ ++ int stkref; /* reference count; */ + short stkflags; /* stack attributes */ + char *stkbase; /* beginning of current stack frame */ + char *stkend; /* end of current stack frame */ diff --git a/SPECS/ksh.spec b/SPECS/ksh.spec index eacf3c2..27eb728 100644 --- a/SPECS/ksh.spec +++ b/SPECS/ksh.spec @@ -8,7 +8,7 @@ Group: System Environment/Shells #CPL everywhere else (for KSH itself) License: EPL Version: 20120801 -Release: 143%{?dist} +Release: 144%{?dist} Source0: http://www.research.att.com/~gsf/download/tgz/ast-ksh.%{releasedate}.tgz Source1: http://www.research.att.com/~gsf/download/tgz/INIT.%{releasedate}.tgz Source2: kshcomp.conf @@ -199,6 +199,10 @@ Patch80: ksh-20120801-cve-2019-14868.patch # upstream commit: https://github.com/ksh93/ksh/commit/4604df9ada906e0a6537157a63b6ce7c0509f34d Patch81: ksh-20120801-stack-robustness.patch +# rhbz#2053503 +# upstream commit: https://github.com/ksh93/ksh/commit/56805b25af24f454cdd477609bcddc984628bc01 +Patch82: ksh-20120801-stack-robustness-2.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Conflicts: pdksh Requires: coreutils, diffutils, chkconfig @@ -281,6 +285,7 @@ with "sh" (the Bourne Shell). %patch79 -p1 -b .nv_open-memcmp %patch80 -p1 -b .cve-2019-14868 %patch81 -p1 -b .stack-robustness +%patch82 -p1 -b .stack-robustness-2 #/dev/fd test does not work because of mock sed -i 's|ls /dev/fd|ls /proc/self/fd|' src/cmd/ksh93/features/options @@ -406,6 +411,10 @@ fi rm -rf $RPM_BUILD_ROOT %changelog +* Tue Mar 01 2022 Vincent Mihalkovic - 20120801-144 +- Stack robustness additional fixes + Resolves: #2053503 + * Fri Oct 01 2021 Vincent Mihalkovic - 20120801-143 - Stack robustness fixes Related: #2007364