Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 653244 - x11-terms/rxvt-unicode: possibility to paste control characters
Summary: x11-terms/rxvt-unicode: possibility to paste control characters
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Jeroen Roovers (RETIRED)
URL: http://software.schmorp.de/pkg/rxvt-u...
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2018-04-15 16:14 UTC by Alexander Sergeyev
Modified: 2018-04-15 19:23 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
urxvt-filter-control-chars.patch (urxvt-filter-control-chars.patch,3.94 KB, patch)
2018-04-15 16:14 UTC, Alexander Sergeyev
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Sergeyev 2018-04-15 16:14:29 UTC
Created attachment 527512 [details, diff]
urxvt-filter-control-chars.patch

URxvt allows pasting arbitrary characters, ie characters which might include ESC (or backspace and so on). So, it's possible to paste specially crafted text from a browser into vim (running inside rxvt) -- and by doing so, switch vim to command mode and run arbitrary shell commands (vim is not the only target). For PoC and further details see the URL.

VTE library had the same problem and it was fixed [1] by filtering out some unwanted characters from paste buffer. I've prepared a similar patch for rxvt-unicode (attached) -- the filtering is disabled by default and can be enabled by using xresource setting: `urxvt.filterPastedControls: 1`.

[1] https://bugzilla.gnome.org/show_bug.cgi?id=753197