diff options
| author | Vincent Mailhol <mailhol.vincent@wanadoo.fr> | 2021-01-20 20:41:35 +0900 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-01-30 13:25:55 +0100 |
| commit | 260925a0b7d2da5449f8ecfd02c1405e0c8a45b8 (patch) | |
| tree | d071ca8fe08c125aaa5e47225db92521bfda3562 /tools/perf/scripts/python | |
| parent | 6a2aa69a8e0ac25fb4e31e8abd85f7e920ded52a (diff) | |
can: dev: can_restart: fix use after free bug
[ Upstream commit 03f16c5075b22c8902d2af739969e878b0879c94 ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
