diff options
author | Eric Dumazet <edumazet@google.com> | 2024-08-20 16:08:58 +0000 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2024-08-21 17:35:49 -0700 |
commit | da273b377ae0d9bd255281ed3c2adb228321687b (patch) | |
tree | 93eb1d8a41e18154d4ca37d010815fe762e98fe0 /net/lapb | |
parent | faa389b2fbaaec7fd27a390b4896139f9da662e3 (diff) | |
download | linux-da273b377ae0d9bd255281ed3c2adb228321687b.tar.gz linux-da273b377ae0d9bd255281ed3c2adb228321687b.tar.bz2 linux-da273b377ae0d9bd255281ed3c2adb228321687b.zip |
ipv6: fix possible UAF in ip6_finish_output2()
If skb_expand_head() returns NULL, skb has been freed
and associated dst/idev could also have been freed.
We need to hold rcu_read_lock() to make sure the dst and
associated idev are alive.
Fixes: 5796015fa968 ("ipv6: allocate enough headroom in ip6_finish_output2()")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Vasily Averin <vasily.averin@linux.dev>
Reviewed-by: David Ahern <dsahern@kernel.org>
Link: https://patch.msgid.link/20240820160859.3786976-3-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/lapb')
0 files changed, 0 insertions, 0 deletions