diff options
author | Lee Jones <[email protected]> | 2022-09-12 14:38:55 +0100 |
---|---|---|
committer | Daniel Borkmann <[email protected]> | 2022-09-16 18:00:52 +0200 |
commit | 83c10cc362d91c0d8d25e60779ee52fdbbf3894d (patch) | |
tree | 98b9cf773986ab7052dd7874ddb663d07dc2dd25 /tools/perf/scripts/python/Perf-Trace-Util/lib | |
parent | a37a32583e282d8d815e22add29bc1e91e19951a (diff) |
bpf: Ensure correct locking around vulnerable function find_vpid()
The documentation for find_vpid() clearly states:
"Must be called with the tasklist_lock or rcu_read_lock() held."
Presently we do neither for find_vpid() instance in bpf_task_fd_query().
Add proper rcu_read_lock/unlock() to fix the issue.
Fixes: 41bdc4b40ed6f ("bpf: introduce bpf subcommand BPF_TASK_FD_QUERY")
Signed-off-by: Lee Jones <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Acked-by: Yonghong Song <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/perf/scripts/python/Perf-Trace-Util/lib')
0 files changed, 0 insertions, 0 deletions