]> git.baikalelectronics.ru Git - kernel.git/commit
macsec: avoid use-after-free in macsec_handle_frame()
authorEric Dumazet <edumazet@google.com>
Wed, 7 Oct 2020 08:42:46 +0000 (01:42 -0700)
committerJakub Kicinski <kuba@kernel.org>
Thu, 8 Oct 2020 19:21:08 +0000 (12:21 -0700)
commit9faac810f45030c639e99bca0095e0738dbcc9da
treed086a5359881325cddb35adc80a654e90afa8618
parentcc12b5874c92935360953252c1a8ed76ecb5929d
macsec: avoid use-after-free in macsec_handle_frame()

De-referencing skb after call to gro_cells_receive() is not allowed.
We need to fetch skb->len earlier.

Fixes: a0f1618812bf ("macsec: enable GRO and RPS on macsec devices")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Paolo Abeni <pabeni@redhat.com>
Acked-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/macsec.c