bpf: Clear per_cpu pointers during bpf_prog_realloc
mainline inclusion from mainline-5.12-rc1 commit 1336c662 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I5EUVD CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1336c662474edec3966c96c8de026f794d16b804 ------------------------------------------------- bpf_prog_realloc copies contents of struct bpf_prog. The pointers have to be cleared before freeing old struct. Reported-by: NIlya Leoshkevich <iii@linux.ibm.com> Fixes: 700d4796 ("bpf: Optimize program stats") Fixes: ca06f55b ("bpf: Add per-program recursion prevention mechanism") Signed-off-by: NAlexei Starovoitov <ast@kernel.org> (cherry picked from commit 1336c662) Signed-off-by: NWang Yufen <wangyufen@huawei.com>
Showing
想要评论请 注册 或 登录