Files
linux/kernel
Lee Jones 0e3339114a UPSTREAM: bpf: Ensure correct locking around vulnerable function find_vpid()
[ Upstream commit 83c10cc362 ]

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.

Bug: 232939090
Fixes: 41bdc4b40e ("bpf: introduce bpf subcommand BPF_TASK_FD_QUERY")
Signed-off-by: Lee Jones <lee@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Yonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/bpf/20220912133855.1218900-1-lee@kernel.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Lee Jones <joneslee@google.com>
Change-Id: I517b52d97a22b92be1a479279067ddb7b84efbba
2022-12-08 11:26:25 +00:00
..
2021-04-14 08:41:58 +02:00
2022-05-15 18:02:37 +02:00
2022-05-15 18:02:37 +02:00
2021-09-08 09:07:16 +02:00
2020-08-12 10:58:02 -07:00
2021-09-03 10:59:15 +02:00
2020-11-14 11:26:04 -08:00
2020-07-27 14:31:12 -04:00
2022-05-15 18:02:37 +02:00
2021-08-18 09:34:44 +02:00
2022-06-24 11:54:12 +02:00
2021-09-03 10:59:15 +02:00