Skip to content
Commit 1f7fe512 authored by Antoine Tenart's avatar Antoine Tenart Committed by David S. Miller
Browse files

net: macsec: fix the length used to copy the key for offloading



The key length used when offloading macsec to Ethernet or PHY drivers
was set to MACSEC_KEYID_LEN (16), which is an issue as:
- This was never meant to be the key length.
- The key length can be > 16.

Fix this by using MACSEC_MAX_KEY_LEN to store the key (the max length
accepted in uAPI) and secy->key_len to copy it.

Fixes: 3cf3227a ("net: macsec: hardware offloading infrastructure")
Reported-by: default avatarLior Nahmanson <liorna@nvidia.com>
Signed-off-by: default avatarAntoine Tenart <atenart@kernel.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent abe90454
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment