hw/net/can: sja1000 fix buff2frame_bas and buff2frame_pel when dlc is out of std...
commit11744862f27b9ba6488a247d2fd6bb83d9bc3c8d
authorPavel Pisa <pisa@cmp.felk.cvut.cz>
Thu, 29 Jul 2021 12:33:27 +0000 (29 14:33 +0200)
committerJason Wang <jasowang@redhat.com>
Mon, 2 Aug 2021 04:19:18 +0000 (2 12:19 +0800)
treec98f7607ae8e62bfc867dbcac9d1b40f13d98b6c
parent9010b0c7a9a097590e183f63716091f6c42a223f
hw/net/can: sja1000 fix buff2frame_bas and buff2frame_pel when dlc is out of std CAN 8 bytes

Problem reported by openEuler fuzz-sig group.

The buff2frame_bas function (hw\net\can\can_sja1000.c)
infoleak(qemu5.x~qemu6.x) or stack-overflow(qemu 4.x).

Reported-by: Qiang Ning <ningqiang1@huawei.com>
Cc: qemu-stable@nongnu.org
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
Signed-off-by: Jason Wang <jasowang@redhat.com>
hw/net/can/can_sja1000.c