RHBA-2015:0300

Type: Bug fix
Severity: None
Published: 2015-03-05
Red Hat Enterprise Linux 7

KornShell (KSH) is a Unix shell developed by AT&T Bell Laboratories, which is backward-compatible with the Bourne shell (Bash) and includes many features of the C shell. The most recent version is KSH-93. KornShell complies with the POSIX.2 standard (IEEE Std 1003.2-1992). This update fixes the following bugs: * Prior to this update, the compiler optimization dropped parts from the ksh job locking mechanism from the binary code. As a consequence, ksh could terminate unexpectedly with a segmentation fault after it received the SIGCHLD signal. This update implements a fix to ensure the compiler does not drop parts of the ksh mechanism, and the crash no longer occurs. (BZ#1116506) * When running a command that output a lot of data, and then setting a variable from that output, ksh could become unresponsive. The combination of I/O redirection and synchronization mechanism has been changed, and, as a result, commands complete successfully, and ksh no longer hangs. (BZ#1077090) * Due to a race condition in the job list code, ksh could terminate unexpectedly with a segmentation fault when the user had run custom scripts on their system. With this update, the race condition has been fixed, and segmentation faults in ksh no longer occur. (BZ#1084406) * Previously, ksh did not check whether it had execution permission for a directory before changing into it. Consequently, ksh erroneously supposed that it was operating inside that directory even though it was in fact still operating in the previous directory. With this update, ksh checks for execute permissions and, if lacking them, reports an error message as expected. (BZ#1109893) * Previously, ksh reused low file descriptor numbers, when any of them were previously closed, but did not handle them correctly when they were not used for standard input, output or error output. As a result, when any of standard input (stdin), output (stdout) or error (stderr) was closed and its file descriptor was reused in command substitution, the output from command substitution was empty. The code was updated to not reuse those low file descriptors for command substitution. Command substitution now works correctly even if any of stdin, stdout or stderr is closed. (BZ#1133585) * Previously, ksh could incorrectly initialize a variable holding the path of the working directory. If a program changed the working directory between forking and ksh execution, then ksh could contain a incorrect value in the working directory variable. With this update, initialization of the working directory variable has been corrected, and ksh now contains the correct value in the aforementioned situation. (BZ#1135573) * Previously, the ksh syntax analyser did not parse command substitutions inside of here-documents correctly, which led to syntax error messages being reported on a syntactically-correct code. A patch has been provided to fix this bug, and ksh now interprets substitutes as intended. (BZ#1111120) * Previously, ksh could skip setting the exit code from the last command of a function. As a consequence, the function could return a incorrect exit code. The ksh code has been updated to use the latest command of a function, and functions thus return correct exit code. (BZ#1146507) * Previously, if a running function was unset by another function in the ksh script, the ksh shell terminated unexpectedly with a segmentation fault. With this update, the ksh code skips resetting the "running" flag if a function is unset, and ksh no longer crashes in the described scenario. (BZ#1105153) * Previously, ksh truncated too many decimals before rounding for numbers smaller than one. As a consequence, numbers from the interval of 0.5 - 0.999 were incorrectly rounded to zero. This update ensures that there are always enough decimals for correct rounding, and the result of rounding is now correct. (BZ#1070871) Users of ksh are advised to upgrade to these updated packages, which fix these bugs.

Evidence and freshness

Data current

Last supporting evidence check: 2026-11-27T23:18:25.555Z UTC

Official vendor advisory

Red Hat Enterprise Linux 7

View source
Observed 2026-11-27T23:18:25.555Z UTC. Last updated 2026-10-07T09:03:35.157Z UTC.

Upstream Advisory

Affected Packages

  • ksh 20120801-22.el7

Interested in being alerted when there are new versions of ksh? Set up an alert.
RHBA-2015:0300: ksh bug fix update | Package Alert