ESC ] 6;12;? ESC \ freezes xterm with 100% CPU usage
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
xterm (Ubuntu) |
Fix Released
|
Low
|
Unassigned |
Bug Description
Running the following command:
printf "\x1b]6;12;?\x1b\\"
while inside an xterm window causes xterm to stop responding to user input, produce no output, and consume 100% CPU usage (i.e. it runs indefinitely on a single core). Most likely this is a consequence of an infinite loop.
The bug is triggered by the character sequence produced by the above printf command being sent to the terminal via any means (e.g. placing it in a text file, and then using cat to display the text file, also causes xterm to enter an infinite loop).
The character sequence that printf outputs when running this command has a similar form to that of many xterm terminal commands, so most likely xterm is attempting to interpret it a command. That said, I don't think it's actually meaningful (it starts an OSC 6 command but then gives it invalid parameters). Nonetheless, xterm probably shouldn't go into an infinite loop as a response to a program printing text on it, no matter how meaningless that text is. (I stumbled across this particular sequence by chance when writing a terminal testsuite.)
I'm not sure whether this is a security-related bug or not, but it's certainly plausible that it could be used as a remote denial of service, or possibly to make it harder to view text files (as attempting to display them in xterm will cause it to crash). People don't normally expect running cat to be able to crash their terminal. As such, I'm classifying it as security-related as a precaution. Feel free to override this setting if you disagree.
ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: xterm 322-1ubuntu1
ProcVersionSign
Uname: Linux 4.4.0-41-generic x86_64
.tmp.unity_
ApportVersion: 2.20.1-0ubuntu2.1
Architecture: amd64
CompizPlugins: [core,composite
CompositorRunning: compiz
CompositorUnred
CompositorUnred
CurrentDesktop: Unity
Date: Sat Oct 1 18:11:36 2016
DistUpgraded: 2016-05-02 01:10:52,869 ERROR got error from PostInstallScript ./xorg_
DistroCodename: xenial
DistroVariant: ubuntu
DpkgLog:
ExecutablePath: /usr/bin/xterm
GraphicsCard:
Intel Corporation 3rd Gen Core processor Graphics Controller [8086:0166] (rev 09) (prog-if 00 [VGA controller])
Subsystem: Hewlett-Packard Company 3rd Gen Core processor Graphics Controller [103c:2186]
InstallationDate: Installed on 2014-06-03 (851 days ago)
InstallationMedia: Ubuntu 14.04 LTS "Trusty Tahr" - Release amd64 (20140417)
MachineType: Hewlett-Packard HP Pavilion 15 Notebook PC
ProcKernelCmdLine: BOOT_IMAGE=
SourcePackage: xterm
UpgradeStatus: Upgraded to xenial on 2016-05-02 (152 days ago)
dmi.bios.date: 09/21/2015
dmi.bios.vendor: Insyde
dmi.bios.version: F.68
dmi.board.
dmi.board.name: 2186
dmi.board.vendor: Hewlett-Packard
dmi.board.version: 35.12
dmi.chassis.type: 10
dmi.chassis.vendor: Hewlett-Packard
dmi.chassis.
dmi.modalias: dmi:bvnInsyde:
dmi.product.name: HP Pavilion 15 Notebook PC
dmi.product.
dmi.sys.vendor: Hewlett-Packard
version.compiz: compiz 1:0.9.12.
version.ia32-libs: ia32-libs N/A
version.libdrm2: libdrm2 2.4.67-
version.
version.
version.
version.
version.
version.
version.
version.
xserver.bootTime: Sat Oct 1 07:28:56 2016
xserver.configfile: default
xserver.errors:
xserver.logfile: /var/log/Xorg.0.log
xserver.outputs:
product id 927
vendor LGD
xserver.version: 2:1.18.4-0ubuntu0.1
Changed in xterm (Ubuntu): | |
importance: | Undecided → Low |
status: | New → Confirmed |
information type: | Private Security → Public Security |
Changed in xterm (Ubuntu): | |
status: | Confirmed → Fix Released |
Thanks for reporting this issue. Could you please report it to the xterm developer, see the following link:
http:// invisible- island. net/xterm/ xterm.faq. html#report_ bugs
Also, can I make this bug public?