History

macsec: restore uAPI after addition of GCM-AES-256

Commit ccfdec908922 ("macsec: Add support for GCM-AES-256 cipher suite") changed a few values in the uapi headers for MACsec. Because of existing userspace implementations, we need to preserve the value of MACSEC_DEFAULT_CIPHER_ID. Not doing that resulted in wpa_supplicant segfaults when a secure channel was created using the default cipher. Thus, swap MACSEC_DEFAULT_CIPHER_{ID,ALT} back to their original values. Changing the maximum length of the MACSEC_SA_ATTR_KEY attribute is unnecessary, as the previous value (MACSEC_MAX_KEY_LEN, which was 128B) is large enough to carry 32-bytes keys. This patch reverts MACSEC_MAX_KEY_LEN to 128B and restores the old length check on MACSEC_SA_ATTR_KEY.

Sabrina Dubroca committed 8 years ago

Commit e8660de1 parent 5e89cfa2 files · +8 −10Browse files

Showing the changes to include/uapi/linux (1 of 2 files). Show all

Unified · Split

include/uapi/linux/if_macsec.h+3−3
@@ -18,7 +18,7 @@ · 17 unmodified lines
18#define MACSEC_GENL_NAME "macsec"18#define MACSEC_GENL_NAME "macsec"
19#define MACSEC_GENL_VERSION 119#define MACSEC_GENL_VERSION 1
20 20
21#define MACSEC_MAX_KEY_LEN 25621#define MACSEC_MAX_KEY_LEN 128
22 22
23#define MACSEC_KEYID_LEN 1623#define MACSEC_KEYID_LEN 16
24 24
@@ -26,9 +26,9 @@ · 1 unmodified line
26#define MACSEC_CIPHER_ID_GCM_AES_128 0x0080C20001000001ULL26#define MACSEC_CIPHER_ID_GCM_AES_128 0x0080C20001000001ULL
27#define MACSEC_CIPHER_ID_GCM_AES_256 0x0080C20001000002ULL27#define MACSEC_CIPHER_ID_GCM_AES_256 0x0080C20001000002ULL
28 28
29#define MACSEC_DEFAULT_CIPHER_ID MACSEC_CIPHER_ID_GCM_AES_128
30/* deprecated cipher ID for GCM-AES-128 */29/* deprecated cipher ID for GCM-AES-128 */
31#define MACSEC_DEFAULT_CIPHER_ALT 0x0080020001000001ULL30#define MACSEC_DEFAULT_CIPHER_ID 0x0080020001000001ULL
31#define MACSEC_DEFAULT_CIPHER_ALT MACSEC_CIPHER_ID_GCM_AES_128
32 32
33#define MACSEC_MIN_ICV_LEN 833#define MACSEC_MIN_ICV_LEN 8
34#define MACSEC_MAX_ICV_LEN 3234#define MACSEC_MAX_ICV_LEN 32