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.
Showing the changes to include/uapi/linux (1 of 2 files). Show all
Unified · Split
| @@ -18,7 +18,7 @@ · 17 unmodified lines | ||
| 18 | 18 | #define MACSEC_GENL_NAME "macsec" |
| 19 | 19 | #define MACSEC_GENL_VERSION 1 |
| 20 | 20 | |
| 21 | −#define MACSEC_MAX_KEY_LEN 256 | |
| 21 | +#define MACSEC_MAX_KEY_LEN 128 | |
| 22 | 22 | |
| 23 | 23 | #define MACSEC_KEYID_LEN 16 |
| 24 | 24 | |
| @@ -26,9 +26,9 @@ · 1 unmodified line | ||
| 26 | 26 | #define MACSEC_CIPHER_ID_GCM_AES_128 0x0080C20001000001ULL |
| 27 | 27 | #define MACSEC_CIPHER_ID_GCM_AES_256 0x0080C20001000002ULL |
| 28 | 28 | |
| 29 | −#define MACSEC_DEFAULT_CIPHER_ID MACSEC_CIPHER_ID_GCM_AES_128 | |
| 30 | 29 | /* deprecated cipher ID for GCM-AES-128 */ |
| 31 | −#define MACSEC_DEFAULT_CIPHER_ALT 0x0080020001000001ULL | |
| 30 | +#define MACSEC_DEFAULT_CIPHER_ID 0x0080020001000001ULL | |
| 31 | +#define MACSEC_DEFAULT_CIPHER_ALT MACSEC_CIPHER_ID_GCM_AES_128 | |
| 32 | 32 | |
| 33 | 33 | #define MACSEC_MIN_ICV_LEN 8 |
| 34 | 34 | #define MACSEC_MAX_ICV_LEN 32 |