Fix a crash due to out of bounds write

Resolves: #1537053
This commit is contained in:
Siteshwar Vashisht 2018-02-12 14:20:51 +01:00
parent 32a578db30
commit ac41a6262b
2 changed files with 19 additions and 1 deletions

View File

@ -0,0 +1,11 @@
diff --git a/src/cmd/ksh93/sh/xec.c b/src/cmd/ksh93/sh/xec.c
--- a/src/cmd/ksh93/sh/xec.c
+++ b/src/cmd/ksh93/sh/xec.c
@@ -122,6 +122,7 @@ int iousepipe(Shell_t *shp)
return(1);
}
subpipe[2] = sh_fcntl(fd,F_dupfd_cloexec,10);
+ sh_iovalidfd(shp,subpipe[2]);
shp->fdstatus[subpipe[2]] = shp->fdstatus[1];
while(close(fd)<0 && errno==EINTR)
errno = err;

View File

@ -6,7 +6,7 @@ Summary: The Original ATT Korn Shell
URL: http://www.kornshell.com/
License: EPL
Version: %{releasedate}
Release: 44%{?dist}
Release: 45%{?dist}
Source0: http://www.research.att.com/~gsf/download/tgz/ast-ksh.%{release_date}.tgz
Source1: http://www.research.att.com/~gsf/download/tgz/INIT.%{release_date}.tgz
Source2: kshcomp.conf
@ -200,6 +200,9 @@ Patch82: ksh-20120801-posix-exit.patch
# rhbz#1464409
Patch83: ksh-20120801-sh_iovalidfd.patch
# rhbz#1537053
Patch84: ksh-20120801-validate-fd.patch
Conflicts: pdksh
Requires: coreutils, diffutils, chkconfig
BuildRequires: bison
@ -325,6 +328,10 @@ fi
%config(noreplace) %{_sysconfdir}/binfmt.d/kshcomp.conf
%changelog
* Mon Feb 12 2018 Siteshwar Vashisht <svashisht@redhat.com> - 20120801-45
- Fix a crash due to out of bounds write
Resolves: #1537053
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 20120801-44
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild