On 05/03/13 06:04, David Schissler wrote:
> This reminded me about the security problem of copying and pasting directly
> from a browser into the terminal. By using hidden div trickery it is very
> easy to insert a whole bunch of text that was never visible from on the
> screen. It would be very useful if Qubes had a way to quickly view the
> clipboard in a way that could fit into normal workflow.
>
>
"To view" using what application? Simple text viewer, sure, but written
on top of Qt, which is tens of thousands of lines of code to create a
simple class to display a text, right? And how do you know it won't
suddenly interpret some control character in some unusual way? Or have a
classic buffer overflow somewhere, e.g. because tried to be too smart
and interpreted a string as some unicode and allocated only the buffer
for half the amount of bytes?
And even if we could have a reasonably safe clipboard viewer, then
what's worth would it be really? What might look innocent in such a
simple plaintext viewer might be lethal to your shell. Or your
LibreOffice. Or something.
General rule in Qubes is: don't allow *paste* operation to a *more
trusted* domain from a less trusted one! One can use Qubes rpc policing
mechanism to actually enforce this policy, e.g. this is the contents of
my /etc/qubes_rpc/policy/qubes.ClipboardPaste file (first is source VM,
second destination, of course):
personal work deny
$anyvm vault deny
$anyvm $anyvm ask
And if you really, really, so madly want to take a look at the content
of the inter-VM clipboard you can always do that by displaying the
content of the /var/run/qubes/qubes_clipboard.bin file in Dom0. Again,
this is probably a *bad* idea, or even a Very Bad Idea, because you
don't know if displaying such potentially malicious content, even using
something as simple as the 'cat' command, won't exploit something, e.g.
in your shell, or in your konsole program, or whatever other you would
like to use to view it. Note that during a normal copy and paste
operation, Dom0 never attempts to parse the content of the
qubes_clipboard.bin file!
joanna.