]> git.baikalelectronics.ru Git - uboot.git/commit
virtio: rng: Check length before copying
authorAndrew Scull <ascull@google.com>
Mon, 16 May 2022 10:41:39 +0000 (10:41 +0000)
committerTom Rini <trini@konsulko.com>
Wed, 8 Jun 2022 13:24:04 +0000 (09:24 -0400)
commit72ac68bfb65965d53de9178a59d266a34665cf33
treeb5cdedd90ad28a3cc937bd335b5a9e93748b83df
parentf42dd63b1bfaa6df8800e43d3950a3a94e11d92f
virtio: rng: Check length before copying

Check the length of data written by the device is consistent with the
size of the buffers to avoid out-of-bounds memory accesses in case
values aren't consistent.

Signed-off-by: Andrew Scull <ascull@google.com>
Cc: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
drivers/virtio/virtio_rng.c