Re: [PATCH spice 4/8 v2] Receive the GraphicsDeviceInfo message from the streaming agent

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux Virtualization]     [Linux Virtualization]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]