HomeDefectsLIN9-1024
Not to be fixed

LIN9-1024 : bash-3.2.x: recursive call into rl_redisplay caused X server crash on cold boots

Created: Jul 5, 2016    Updated: Mar 6, 2019
Resolved Date: Feb 20, 2019
Found In Version: unknown
Severity: Standard
Applicable for: Wind River Linux 9
Component/s: Userspace

Description

Bug-Description:

If a SIGWINCH arrives while bash is performing redisplay, multi-line prompts are displayed incorrectly due to the display code being called recursively.

PACKAGE NAME: bash
PACKAGE VERSION: 3.2.x
LICENSE: GPLv2+

It has been fixed for bash-4.x:
http://ftp.gnu.org/gnu/bash/bash-4.0-patches/bash40-020

Description of the issue:

On some cold boots the X server would die almost immediately after boot. Also, a core dump was produced by the bash process running inside the rxvt terminal inside of X. The core dump trace back pointed to a known issue in bash that has since been fixed in bash 4.0. The issue involves the bash process receiving a SIGWINCH signal from its parent at just the right time, causing a recursive call into a function (rl_redisplay). This call can sometimes lead to segmentation faults because the function access static module data in a way which is not safe for reentrancy. The patch adds a simple semaphore around the call to prevent this reentrancy.