diff options
author | Andrii Nakryiko <andrii@kernel.org> | 2023-05-22 16:29:14 -0700 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2023-05-23 16:56:37 +0200 |
commit | e7d85427ef898afe66c4c1b7e06e5659cec6b640 (patch) | |
tree | b01e23b47266421525dd69c2bc2fce34c35ac448 /tools/perf/scripts/python/task-analyzer.py | |
parent | f46392ee3dec24066e5fb260d9bd497b4cd4d191 (diff) |
bpf: Validate BPF object in BPF_OBJ_PIN before calling LSM
Do a sanity check whether provided file-to-be-pinned is actually a BPF
object (prog, map, btf) before calling security_path_mknod LSM hook. If
it's not, LSM hook doesn't have to be triggered, as the operation has no
chance of succeeding anyways.
Suggested-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Reviewed-by: Christian Brauner <brauner@kernel.org>
Link: https://lore.kernel.org/bpf/20230522232917.2454595-2-andrii@kernel.org
Diffstat (limited to 'tools/perf/scripts/python/task-analyzer.py')
0 files changed, 0 insertions, 0 deletions