]> git.ipfire.org Git - thirdparty/qemu.git/commit
net: tulip: check frame size and r/w data length
authorPrasad J Pandit <pjp@fedoraproject.org>
Tue, 24 Mar 2020 17:27:22 +0000 (22:57 +0530)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Mon, 22 Jun 2020 17:52:33 +0000 (12:52 -0500)
commitfb6a24fb1ddee56433bd8452375c2790cf087883
tree61ee6a5118299b48cbb8f64a588b6375aec51c55
parent60c21aa0171f316ab9351951b9dbdd889ab70712
net: tulip: check frame size and r/w data length

Tulip network driver while copying tx/rx buffers does not check
frame size against r/w data length. This may lead to OOB buffer
access. Add check to avoid it.

Limit iterations over descriptors to avoid potential infinite
loop issue in tulip_xmit_list_update.

Reported-by: Li Qiang <pangpei.lq@antfin.com>
Reported-by: Ziming Zhang <ezrakiez@gmail.com>
Reported-by: Jason Wang <jasowang@redhat.com>
Tested-by: Li Qiang <liq3ea@gmail.com>
Reviewed-by: Li Qiang <liq3ea@gmail.com>
Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
Signed-off-by: Jason Wang <jasowang@redhat.com>
(cherry picked from commit 8ffb7265af64ec81748335ec8f20e7ab542c3850)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
hw/net/tulip.c