summaryrefslogtreecommitdiffstats
path: root/kernel/uid16.c
diff options
context:
space:
mode:
authorAndrii Nakryiko <andriin@fb.com>2020-03-09 23:27:55 +0100
committerAlexei Starovoitov <ast@kernel.org>2020-03-10 03:56:48 +0100
commit62039c30c19dcab96621e074aeeb90da7100def7 (patch)
tree7eaf14dc8ca1e1c1751eb54448f63f7ad35bc002 /kernel/uid16.c
parentselftests: bpf: Add test for JMP32 JSET BPF_X with upper bits set (diff)
downloadlinux-62039c30c19dcab96621e074aeeb90da7100def7.tar.xz
linux-62039c30c19dcab96621e074aeeb90da7100def7.zip
bpf: Initialize storage pointers to NULL to prevent freeing garbage pointer
Local storage array isn't initialized, so if cgroup storage allocation fails for BPF_CGROUP_STORAGE_SHARED, error handling code will attempt to free uninitialized pointer for BPF_CGROUP_STORAGE_PERCPU storage type. Avoid this by always initializing storage pointers to NULLs. Fixes: 8bad74f9840f ("bpf: extend cgroup bpf core to allow multiple cgroup storage types") Signed-off-by: Andrii Nakryiko <andriin@fb.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://lore.kernel.org/bpf/20200309222756.1018737-1-andriin@fb.com
Diffstat (limited to 'kernel/uid16.c')
0 files changed, 0 insertions, 0 deletions