linux-IllusionX/net/hsr
Dan Carpenter 876f8ab523 hsr: Prevent use after free in prp_create_tagged_frame()
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>
2023-11-01 22:26:04 -07:00
..
hsr_debugfs.c
hsr_device.c net: hsr: Disable promiscuous mode in offload mode 2023-06-21 16:47:05 -07:00
hsr_device.h
hsr_forward.c hsr: Prevent use after free in prp_create_tagged_frame() 2023-11-01 22:26:04 -07:00
hsr_forward.h
hsr_framereg.c net: hsr: Properly parse HSRv1 supervisor frames. 2023-09-18 08:26:19 +01:00
hsr_framereg.h hsr: Synchronize sequence number updates. 2022-12-01 20:26:21 -08:00
hsr_main.c
hsr_main.h net: hsr: Add __packed to struct hsr_sup_tlv. 2023-09-18 08:26:19 +01:00
hsr_netlink.c
hsr_netlink.h net/hsr: Remove unused function declarations 2023-07-31 20:11:47 -07:00
hsr_slave.c net: hsr: Disable promiscuous mode in offload mode 2023-06-21 16:47:05 -07:00
hsr_slave.h
Kconfig
Makefile