linzhecheng 9f91022f28 virtio-serial: fix heapover-flow
Check device having the feature of VIRTIO_CONSOLE_F_EMERG_WRITE before
get config->emerg_wr. It is neccessary because sizeof(virtio_console_config)
is 8 byte if VirtIOSerial doesn't have the feature of
VIRTIO_CONSOLE_F_EMERG_WRITE(see virtio_serial_device_realize),
read/write emerg_wr will lead to heap-over-flow.

Signed-off-by: linzhecheng <linzhecheng@huawei.com>
Message-Id: <20180328133435.20112-1-linzhecheng@huawei.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2018-04-09 16:36:39 +02:00
..
2018-02-19 18:27:32 +01:00
2018-04-09 16:36:39 +02:00
2017-10-27 16:03:54 +02:00
2018-03-01 11:05:45 +00:00
2018-03-02 13:45:50 -06:00
2016-01-29 15:07:25 +00:00
2018-03-23 18:38:55 +03:00
2018-03-07 08:30:28 +13:00
2018-03-23 18:26:45 +00:00
2018-03-02 13:45:50 -06:00
2018-03-02 13:45:50 -06:00
2018-02-19 13:03:24 +02:00