[Debconf-devel] Bug#745504: debconf: skip paging on terminals with 2 rows or less
Apollon Oikonomopoulos
apoikos at debian.org
Tue Apr 22 12:29:20 UTC 2014
Package: debconf
Version: 1.5.52
Severity: normal
Dear Maintainer,
The code in Debconf::FrontEnd::Teletype's display_nowrap silently
assumes that the display has more than 2 rows. On a terminal with 2 rows
or less, display_nowrap enters an endless loop, since no actual text
line is ever displayed, only the prompt itself.
I admit this is an extreme corner-case, but the following scenario can bring a
whole system down:
1. Launch a debconf-using application in a two-row terminal
2. Kill the parent process while debconf is paging
On the next input or signal, the debconf process will spin
uncontrollably; reading from STDIN will return immediately due to the
broken pipe and as prompt() does not check for errors while reading the
response, it will try to display_nowrap("\n") unconditionally, which in
turn will call prompt() recursively ad infinitum (or until the system's
memory is exhausted).
The attached patch fixes the issue.
Regards,
Apollon
-- System Information:
Debian Release: jessie/sid
APT prefers testing
APT policy: (500, 'testing'), (500, 'stable'), (90, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 3.13-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=el_GR.UTF-8, LC_CTYPE=el_GR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages debconf depends on:
ii perl-base 5.18.2-2+b1
Versions of packages debconf recommends:
ii apt-utils 1.0.1
ii debconf-i18n 1.5.52
Versions of packages debconf suggests:
ii debconf-doc 1.5.52
ii debconf-utils 1.5.52
ii libgtk2-perl 2:1.249-2
ii libnet-ldap-perl 1:0.6200+dfsg-1
pn libqtcore4-perl <none>
pn libqtgui4-perl <none>
ii libterm-readline-gnu-perl 1.24-1
ii perl 5.18.2-2+b1
ii whiptail 0.52.15-3+b1
-- debconf-show failed
--
Apollon Oikonomopoulos apollon at skroutz.gr
Skroutz S.A. http://skroutz.gr
-------------- next part --------------
A non-text attachment was scrubbed...
Name: debconf.patch
Type: text/x-diff
Size: 1460 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/debconf-devel/attachments/20140422/02b5093e/attachment.patch>
More information about the Debconf-devel
mailing list