mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 18:09:56 +00:00
macsec: ensure rx_sa is set when validation is disabled
[ Upstream commite3a3b62601] macsec_decrypt() is not called when validation is disabled and so macsec_skb_cb(skb)->rx_sa is not set; but it is used later in macsec_post_decrypt(), ensure that it's always initialized. Fixes:c09440f7dc("macsec: introduce IEEE 802.1AE driver") Signed-off-by: Beniamino Galvani <bgalvani@redhat.com> Acked-by: Sabrina Dubroca <sd@queasysnail.net> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
e6ec788ea5
commit
3b52ddfbb9
@@ -914,7 +914,6 @@ static struct sk_buff *macsec_decrypt(struct sk_buff *skb,
|
|||||||
}
|
}
|
||||||
|
|
||||||
macsec_skb_cb(skb)->req = req;
|
macsec_skb_cb(skb)->req = req;
|
||||||
macsec_skb_cb(skb)->rx_sa = rx_sa;
|
|
||||||
skb->dev = dev;
|
skb->dev = dev;
|
||||||
aead_request_set_callback(req, 0, macsec_decrypt_done, skb);
|
aead_request_set_callback(req, 0, macsec_decrypt_done, skb);
|
||||||
|
|
||||||
@@ -1141,6 +1140,8 @@ static rx_handler_result_t macsec_handle_frame(struct sk_buff **pskb)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
macsec_skb_cb(skb)->rx_sa = rx_sa;
|
||||||
|
|
||||||
/* Disabled && !changed text => skip validation */
|
/* Disabled && !changed text => skip validation */
|
||||||
if (hdr->tci_an & MACSEC_TCI_C ||
|
if (hdr->tci_an & MACSEC_TCI_C ||
|
||||||
secy->validate_frames != MACSEC_VALIDATE_DISABLED)
|
secy->validate_frames != MACSEC_VALIDATE_DISABLED)
|
||||||
|
|||||||
Reference in New Issue
Block a user