]> 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)
commited4916e7353ad57aae9dcffa2b1294a6ada176ad
treed086a5359881325cddb35adc80a654e90afa8618
parent8a06a244d88c64b0b41cbaca07f3b86b50af3944
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: d77b70bcf14a ("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