summaryrefslogtreecommitdiff
path: root/include/linux/firmware/intel/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorLaurent Vivier <lvivier@redhat.com>2026-01-19 08:55:18 +0100
committerJakub Kicinski <kuba@kernel.org>2026-01-20 18:58:54 -0800
commitc7159e960f1472a5493ac99aff0086ab1d683594 (patch)
treee485490b28fd5408c7e58498d0a7054a18ef034d /include/linux/firmware/intel/git@git.tavy.me:linux.git
parent9a063f96d87efc3a6cc667f8de096a3d38d74bb5 (diff)
usbnet: limit max_mtu based on device's hard_mtu
The usbnet driver initializes net->max_mtu to ETH_MAX_MTU before calling the device's bind() callback. When the bind() callback sets dev->hard_mtu based the device's actual capability (from CDC Ethernet's wMaxSegmentSize descriptor), max_mtu is never updated to reflect this hardware limitation). This allows userspace (DHCP or IPv6 RA) to configure MTU larger than the device can handle, leading to silent packet drops when the backend sends packet exceeding the device's buffer size. Fix this by limiting net->max_mtu to the device's hard_mtu after the bind callback returns. See https://gitlab.com/qemu-project/qemu/-/issues/3268 and https://bugs.passt.top/attachment.cgi?bugid=189 Fixes: f77f0aee4da4 ("net: use core MTU range checking in USB NIC drivers") Signed-off-by: Laurent Vivier <lvivier@redhat.com> Link: https://bugs.passt.top/show_bug.cgi?id=189 Reviewed-by: Stefano Brivio <sbrivio@redhat.com> Link: https://patch.msgid.link/20260119075518.2774373-1-lvivier@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/linux/firmware/intel/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions