Files
linux/drivers
Tho Vu 1e5f5888e0 ravb: Fix use-after-free ravb_tstamp_skb
[ Upstream commit cfef46d692 ]

When a Tx timestamp is requested, a pointer to the skb is stored in the
ravb_tstamp_skb struct. This was done without an skb_get. There exists
the possibility that the skb could be freed by ravb_tx_free (when
ravb_tx_free is called from ravb_start_xmit) before the timestamp was
processed, leading to a use-after-free bug.

Use skb_get when filling a ravb_tstamp_skb struct, and add appropriate
frees/consumes when a ravb_tstamp_skb struct is freed.

Fixes: c156633f13 ("Renesas Ethernet AVB driver proper")
Signed-off-by: Tho Vu <tho.vu.wh@rvc.renesas.com>
Signed-off-by: Kazuya Mizuguchi <kazuya.mizuguchi.ks@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-05-15 14:28:28 +09:00
..
2023-05-12 16:27:16 +09:00
2023-05-15 14:21:32 +09:00
2023-05-15 13:57:04 +09:00
2023-05-15 10:39:04 +09:00
2023-05-15 12:46:28 +09:00
2017-09-09 17:39:41 +02:00
2018-05-25 17:06:35 +02:00
2023-05-15 10:37:00 +09:00
2023-05-15 09:23:01 +09:00
2023-05-15 09:51:46 +09:00
2023-05-15 08:28:33 +09:00
2023-05-15 14:18:11 +09:00
2023-05-15 13:00:07 +09:00