aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/prog_tests
diff options
context:
space:
mode:
authorMagnus Karlsson <[email protected]>2020-09-02 07:36:04 +0000
committerDaniel Borkmann <[email protected]>2020-09-02 21:37:19 +0000
commit83cf5c68d663fc78ce529c41bf24f9f6be88bef4 (patch)
tree01b95b3eb5bb1654b9eb7f13ed425f2f5b1db5cf /tools/testing/selftests/bpf/prog_tests
parentxsk: Fix null check on error return path (diff)
downloadkernel-83cf5c68d663fc78ce529c41bf24f9f6be88bef4.tar.gz
kernel-83cf5c68d663fc78ce529c41bf24f9f6be88bef4.zip
xsk: Fix use-after-free in failed shared_umem bind
Fix use-after-free when a shared umem bind fails. The code incorrectly tried to free the allocated buffer pool both in the bind code and then later also when the socket was released. Fix this by setting the buffer pool pointer to NULL after the bind code has freed the pool, so that the socket release code will not try to free the pool. This is the same solution as the regular, non-shared umem code path has. This was missing from the shared umem path. Fixes: b5aea28dca13 ("xsk: Add shared umem support between queue ids") Reported-by: [email protected] Signed-off-by: Magnus Karlsson <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests')
0 files changed, 0 insertions, 0 deletions