summaryrefslogtreecommitdiff
path: root/tools/testing/vma/include/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorErni Sri Satya Vennela <ernis@linux.microsoft.com>2026-03-26 10:30:56 -0700
committerJakub Kicinski <kuba@kernel.org>2026-03-31 19:42:06 -0700
commitd7709812e13d06132ddae3d21540472ea5cb11c5 (patch)
treedf74ce4a38159a3460f18e289f0bef0f2fb2d6b0 /tools/testing/vma/include/git@git.tavy.me:linux.git
parente5a3f10ed7c97decd61b3274982f048b58ce69bc (diff)
net: mana: hardening: Validate adapter_mtu from MANA_QUERY_DEV_CONFIG
As a part of MANA hardening for CVM, validate the adapter_mtu value returned from the MANA_QUERY_DEV_CONFIG HWC command. The adapter_mtu value is used to compute ndev->max_mtu via: gc->adapter_mtu - ETH_HLEN. If hardware returns a bogus adapter_mtu smaller than ETH_HLEN (e.g. 0), the unsigned subtraction wraps to a huge value, silently allowing oversized MTU settings. Add a validation check to reject adapter_mtu values below ETH_MIN_MTU + ETH_HLEN, returning -EPROTO to fail the device configuration early with a clear error message. Signed-off-by: Erni Sri Satya Vennela <ernis@linux.microsoft.com> Link: https://patch.msgid.link/20260326173101.2010514-1-ernis@linux.microsoft.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/testing/vma/include/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions