Skip to content
Commit 424a7cd0 authored by Paolo Abeni's avatar Paolo Abeni Committed by David S. Miller
Browse files

udpv6: fix possible user after free in error handler

Before derefencing the encap pointer, commit e7cc0824 ("udp: Support
for error handlers of tunnels with arbitrary destination port") checks
for a NULL value, but the two fetch operation can race with removal.
Fix the above using a single access.
Also fix a couple of type annotations, to make sparse happy.

Fixes: e7cc0824

 ("udp: Support for error handlers of tunnels with arbitrary destination port")
Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
Acked-by: default avatarStefano Brivio <sbrivio@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 5de362df
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment