mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-01-19 17:16:08 +07:00
macsec: fix use-after-free of skb during RX
Fix use-after-free of skb when rx_handler returns RX_HANDLER_PASS. Signed-off-by: Andreas Steinmetz <ast@domdv.de> Acked-by: Willem de Bruijn <willemb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
e835ada070
commit
095c02da80
@ -1099,10 +1099,9 @@ static rx_handler_result_t macsec_handle_frame(struct sk_buff **pskb)
|
|||||||
}
|
}
|
||||||
|
|
||||||
skb = skb_unshare(skb, GFP_ATOMIC);
|
skb = skb_unshare(skb, GFP_ATOMIC);
|
||||||
if (!skb) {
|
*pskb = skb;
|
||||||
*pskb = NULL;
|
if (!skb)
|
||||||
return RX_HANDLER_CONSUMED;
|
return RX_HANDLER_CONSUMED;
|
||||||
}
|
|
||||||
|
|
||||||
pulled_sci = pskb_may_pull(skb, macsec_extra_len(true));
|
pulled_sci = pskb_may_pull(skb, macsec_extra_len(true));
|
||||||
if (!pulled_sci) {
|
if (!pulled_sci) {
|
||||||
|
Loading…
Reference in New Issue
Block a user