usbnet: ipheth: fix DPE OoB read
authorFoster Snowhill <forst@pen.gy>
Sat, 25 Jan 2025 23:54:08 +0000 (00:54 +0100)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 28 Jan 2025 11:16:32 +0000 (12:16 +0100)
commitee591f2b281721171896117f9946fced31441418
tree9c12433ede55c99a720c3ef6df50acd97ac4e061
parentefcbc678a14be268040ffc1fa33c98faf2d55141
usbnet: ipheth: fix DPE OoB read

Fix an out-of-bounds DPE read, limit the number of processed DPEs to
the amount that fits into the fixed-size NDP16 header.

Fixes: a2d274c62e44 ("usbnet: ipheth: add CDC NCM support")
Cc: stable@vger.kernel.org
Signed-off-by: Foster Snowhill <forst@pen.gy>
Reviewed-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/usb/ipheth.c