From: Anthony Liguori <aliguori@us.ibm.com>
To: Christian Limpach <Christian.Limpach@xensource.com>
Cc: xen-devel@lists.xensource.com
Subject: Re: [Xen-staging] [xen-unstable] hvm: Remove access to QEMU monitor inVNC server
Date: Tue, 27 Mar 2007 16:24:30 -0500 [thread overview]
Message-ID: <46098B8E.8030606@us.ibm.com> (raw)
In-Reply-To: <0326530267625D42A4E36594FDD0D1432EBA8A@exchpamain.ad.xensource.com>
Christian Limpach wrote:
>> hvm: Remove access to QEMU monitor in VNC server
>>
>> This fixes a RHEL5 errata and CVE-2007-0998.
>>
>> The monitor is still accessible in debug builds of ioemu (debug=y).
>>
>> Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
>
> This change is quite weird since it doesn't disable monitor access when
> using SDL.
>
> Also, the additional virtual consoles can be used for giving access to
> things without security implications, like serial ports.
>
> I think a much better fix for the security issue would be to change the
> default monitor output not to be a virtual console.
QEMU 0.9.0 supports redirecting the monitor to a unix socket and
supports reconnecting to the monitor (so that the banner is shown each
time).
When using these options, you can actually execute monitor commands from
the command line by doing something like:
echo help | socat stdin unix:/path/to/socket
With these patches (or by moving qemu-dm up to 0.9.0), someone could add
an xm monitor command that let you execute commands via xm.
That, IMHO, would be the best possible solution.
Regards,
Anthony Liguori
> christian
>
>> ---
>> tools/ioemu/Makefile.target | 4 ++++
>> tools/ioemu/vnc.c | 13 +++++++++++--
>> 2 files changed, 15 insertions(+), 2 deletions(-)
>>
>> diff -r a9a39cc52e74 -r 3375391fb0c9 tools/ioemu/Makefile.target
>> --- a/tools/ioemu/Makefile.target Tue Mar 27 16:19:25 2007 +0100
>> +++ b/tools/ioemu/Makefile.target Tue Mar 27 16:23:52 2007 +0100
>> @@ -193,6 +193,10 @@ LIBS+=-lsocket -lnsl -lresolv
>> LIBS+=-lsocket -lnsl -lresolv
>> endif
>>
>> +ifeq ($(debug),y)
>> +CFLAGS += -DQEMU_VNC_MONITOR_EXPORT
>> +endif
>> +
>> # profiling code
>> ifdef TARGET_GPROF
>> LDFLAGS+=-p
>> diff -r a9a39cc52e74 -r 3375391fb0c9 tools/ioemu/vnc.c
>> --- a/tools/ioemu/vnc.c Tue Mar 27 16:19:25 2007 +0100
>> +++ b/tools/ioemu/vnc.c Tue Mar 27 16:23:52 2007 +0100
>> @@ -113,8 +113,10 @@ struct VncState
>> int visible_w;
>> int visible_h;
>>
>> +#ifdef QEMU_VNC_MONITOR_EXPORT
>> int ctl_keys; /* Ctrl+Alt starts calibration */
>> int shift_keys; /* Shift / CapsLock keys */
>> +#endif
>> int numlock;
>> };
>>
>> @@ -895,6 +897,7 @@ static void do_key_event(VncState *vs, i
>> kbd_put_keycode(keycode & 0x7f);
>> else
>> kbd_put_keycode(keycode | 0x80);
>> +#ifdef QEMU_VNC_MONITOR_EXPORT
>> } else if (down) {
>> int qemu_keysym = 0;
>>
>> @@ -922,8 +925,10 @@ static void do_key_event(VncState *vs, i
>> }
>> if (qemu_keysym != 0)
>> kbd_put_keysym(qemu_keysym);
>> - }
>> -
>> +#endif
>> + }
>> +
>> +#ifdef QEMU_VNC_MONITOR_EXPORT
>> if (down) {
>> switch (sym) {
>> case XK_Control_L:
>> @@ -976,6 +981,10 @@ static void do_key_event(VncState *vs, i
>> break;
>> }
>> }
>> +#else
>> + if (!down && sym == XK_Num_Lock)
>> + vs->numlock = !vs->numlock;
>> +#endif
>> }
>>
>> static void key_event(VncState *vs, int down, uint32_t sym)
>>
>> _______________________________________________
>> Xen-staging mailing list
>> Xen-staging@lists.xensource.com
>> http://lists.xensource.com/xen-staging
>>
next prev parent reply other threads:[~2007-03-27 21:24 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200703271524.l2RFOMNg003926@latara.uk.xensource.com>
2007-03-27 21:06 ` [Xen-staging] [xen-unstable] hvm: Remove access to QEMU monitor inVNC server Christian Limpach
2007-03-27 21:18 ` Daniel P. Berrange
2007-03-27 21:32 ` Christian Limpach
2007-03-27 22:28 ` Daniel P. Berrange
2007-03-27 22:40 ` Christian Limpach
2007-03-27 22:47 ` Daniel P. Berrange
2007-03-27 21:24 ` Anthony Liguori [this message]
2007-03-27 21:41 ` Christian Limpach
2007-03-27 21:56 ` Anthony Liguori
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=46098B8E.8030606@us.ibm.com \
--to=aliguori@us.ibm.com \
--cc=Christian.Limpach@xensource.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.