linux-stable/net/hsr
Dan Carpenter a1a485e45d hsr: Prevent use after free in prp_create_tagged_frame()
[ Upstream commit 876f8ab523 ]

The prp_fill_rct() function can fail.  In that situation, it frees the
skb and returns NULL.  Meanwhile on the success path, it returns the
original skb.  So it's straight forward to fix bug by using the returned
value.

Fixes: 451d8123f8 ("net: prp: add packet handling support")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Acked-by: Paolo Abeni <pabeni@redhat.com>
Link: https://lore.kernel.org/r/57af1f28-7f57-4a96-bcd3-b7a0f2340845@moroto.mountain
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-11-20 11:08:28 +01:00
..
hsr_debugfs.c /net/hsr: fix misspellings using codespell tool 2021-03-18 19:13:41 -07:00
hsr_device.c hsr: Synchronize sending frames to have always incremented outgoing seq nr. 2022-12-31 13:14:15 +01:00
hsr_device.h net: hsr: add offloading support 2021-02-11 13:24:44 -08:00
hsr_forward.c hsr: Prevent use after free in prp_create_tagged_frame() 2023-11-20 11:08:28 +01:00
hsr_forward.h net: hsr: fix mac_len checks 2021-05-24 14:10:28 -07:00
hsr_framereg.c hsr: ratelimit only when errors are printed 2023-04-05 11:25:02 +02:00
hsr_framereg.h hsr: Synchronize sequence number updates. 2022-12-31 13:14:15 +01:00
hsr_main.c net: use eth_hw_addr_set() instead of ether_addr_copy() 2022-08-31 17:16:37 +02:00
hsr_main.h net: hsr: fix mac_len checks 2021-05-24 14:10:28 -07:00
hsr_netlink.c genetlink: move to smaller ops wherever possible 2020-10-02 19:11:11 -07:00
hsr_netlink.h
hsr_slave.c net: hsr: fix mac_len checks 2021-05-24 14:10:28 -07:00
hsr_slave.h
Kconfig
Makefile