diff options
author | Vincent Mailhol <mailhol.vincent@wanadoo.fr> | 2021-01-20 20:41:35 +0900 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2021-01-20 13:32:05 +0100 |
commit | 03f16c5075b22c8902d2af739969e878b0879c94 (patch) | |
tree | 9e9609f281b8ed7468d8e883915c2e528f75ff28 /net/ipv6/proc.c | |
parent | 9c30ae8398b0813e237bde387d67a7f74ab2db2d (diff) |
can: dev: can_restart: fix use after free bug
After calling netif_rx_ni(skb), dereferencing skb is unsafe.
Especially, the can_frame cf which aliases skb memory is accessed
after the netif_rx_ni() in:
stats->rx_bytes += cf->len;
Reordering the lines solves the issue.
Fixes: 39549eef3587 ("can: CAN Network device driver and Netlink interface")
Link: https://lore.kernel.org/r/20210120114137.200019-2-mailhol.vincent@wanadoo.fr
Signed-off-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'net/ipv6/proc.c')
0 files changed, 0 insertions, 0 deletions