kernel_samsung_a53x/net/hsr
Dan Carpenter 5657e0e642 hsr: Prevent use after free in prp_create_tagged_frame()
[ Upstream commit 876f8ab52363f649bcc74072157dfd7adfbabc0d ]

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: 451d8123f897 ("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>
2024-11-18 11:43:07 +01:00
..
hsr_debugfs.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hsr_device.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hsr_device.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hsr_forward.c hsr: Prevent use after free in prp_create_tagged_frame() 2024-11-18 11:43:07 +01:00
hsr_forward.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hsr_framereg.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hsr_framereg.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hsr_main.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hsr_main.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hsr_netlink.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hsr_netlink.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hsr_slave.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hsr_slave.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00