[Spice-devel] [PATCH spice 4/8 v2] Receive the GraphicsDeviceInfo message from the streaming agent
Jonathon Jongsma
jjongsma at redhat.com
Thu Jan 17 17:04:14 UTC 2019
On Wed, 2019-01-16 at 13:34 +0100, Lukáš Hrázký wrote:
> > > + StreamMsgDeviceDisplayInfo *display_info_msg =
> > > &dev->msg->device_display_info;
> > > +
> > > + size_t device_address_len =
> > > GUINT32_FROM_LE(display_info_msg->device_address_len);
> > > + if (device_address_len > MAX_DEVICE_ADDRESS_LEN) {
> > > + g_error("Received a device address longer than %u (%zu),
> > > "
> > > + "will be truncated!", MAX_DEVICE_ADDRESS_LEN,
> > > device_address_len);
> >
> > DoS, g_error will abort() Qemu.
>
> I'll put a warning there, though I think it should be logged as an
> error...
Well, it's an error to send an address that is too long. I don't think
it can be considered an error to *receive* such a message. So I think
warning is perfectly fine here. We need to handle invalid input, after
all.
Jonathon
More information about the Spice-devel
mailing list