Xie Yongji 9e2b8368b2 virtio_console: Assure used length from device is limited
[ Upstream commit d00d8da5869a2608e97cfede094dfc5e11462a46 ]

The buf->len might come from an untrusted device. This
ensures the value would not exceed the size of the buffer
to avoid data corruption or loss.

Signed-off-by: Xie Yongji <xieyongji@bytedance.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Link: https://lore.kernel.org/r/20210525125622.1203-1-xieyongji@bytedance.com
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-07-20 16:21:14 +02:00
..
2016-07-14 16:21:53 +09:00
2016-08-05 09:48:22 -04:00
2019-10-05 12:30:35 +02:00
2019-12-21 10:42:07 +01:00
2021-03-03 17:44:32 +01:00