diff options
author | Dan Carpenter <dan.carpenter@linaro.org> | 2023-10-27 14:19:01 +0200 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2023-11-02 06:26:04 +0100 |
commit | 876f8ab52363f649bcc74072157dfd7adfbabc0d (patch) | |
tree | 4ddaeb45f1799c128db39176b335933a9f483f7e /lib/lockref.c | |
parent | llc: verify mac len before reading mac header (diff) | |
download | linux-876f8ab52363f649bcc74072157dfd7adfbabc0d.tar.xz linux-876f8ab52363f649bcc74072157dfd7adfbabc0d.zip |
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: 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>
Diffstat (limited to 'lib/lockref.c')
0 files changed, 0 insertions, 0 deletions