Revision 0b2dc83906cf1e694e48003eae5df8fa63f76fd9 authored by Jakub Sitnicki on 06 February 2020, 11:16:51 UTC, committed by Daniel Borkmann on 07 February 2020, 21:36:26 UTC
We need to have a synchronize_rcu before free'ing the sockhash because any
outstanding psock references will have a pointer to the map and when they
use it, this could trigger a use after free.

This is a sister fix for sockhash, following commit 2bb90e5cc90e ("bpf:
sockmap, synchronize_rcu before free'ing map") which addressed sockmap,
which comes from a manual audit.

Fixes: 604326b41a6fb ("bpf, sockmap: convert to generic sk_msg interface")
Signed-off-by: Jakub Sitnicki <jakub@cloudflare.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: John Fastabend <john.fastabend@gmail.com>
Link: https://lore.kernel.org/bpf/20200206111652.694507-3-jakub@cloudflare.com
1 parent db6a501
History
File Mode Size
governors
Kconfig -rw-r--r-- 2.1 KB
Kconfig.arm -rw-r--r-- 2.8 KB
Kconfig.mips -rw-r--r-- 658 bytes
Kconfig.powerpc -rw-r--r-- 520 bytes
Makefile -rw-r--r-- 1.4 KB
coupled.c -rw-r--r-- 25.2 KB
cpuidle-arm.c -rw-r--r-- 3.9 KB
cpuidle-at91.c -rw-r--r-- 1.6 KB
cpuidle-big_little.c -rw-r--r-- 6.6 KB
cpuidle-calxeda.c -rw-r--r-- 1.6 KB
cpuidle-clps711x.c -rw-r--r-- 1.2 KB
cpuidle-cps.c -rw-r--r-- 4.2 KB
cpuidle-exynos.c -rw-r--r-- 3.3 KB
cpuidle-haltpoll.c -rw-r--r-- 3.0 KB
cpuidle-kirkwood.c -rw-r--r-- 2.2 KB
cpuidle-mvebu-v7.c -rw-r--r-- 3.3 KB
cpuidle-powernv.c -rw-r--r-- 10.5 KB
cpuidle-psci.c -rw-r--r-- 5.1 KB
cpuidle-pseries.c -rw-r--r-- 6.7 KB
cpuidle-ux500.c -rw-r--r-- 3.0 KB
cpuidle-zynq.c -rw-r--r-- 1.5 KB
cpuidle.c -rw-r--r-- 18.5 KB
cpuidle.h -rw-r--r-- 2.2 KB
driver.c -rw-r--r-- 9.5 KB
dt_idle_states.c -rw-r--r-- 6.3 KB
dt_idle_states.h -rw-r--r-- 216 bytes
governor.c -rw-r--r-- 2.8 KB
poll_state.c -rw-r--r-- 1.3 KB
sysfs.c -rw-r--r-- 19.5 KB

back to top