diff options
| author | Anton Protopopov <[email protected]> | 2024-04-12 14:11:00 +0000 |
|---|---|---|
| committer | Daniel Borkmann <[email protected]> | 2024-04-12 16:37:20 +0000 |
| commit | 37eacb9f6e89fb399a79e952bc9c78eb3e16290e (patch) | |
| tree | 58df1bb3ed11511fa6c3fd8f7f56f9ff13b6e2d9 /net/unix/af_unix.c | |
| parent | bpf, skmsg: Fix NULL pointer dereference in sk_psock_skb_ingress_enqueue (diff) | |
| download | kernel-37eacb9f6e89fb399a79e952bc9c78eb3e16290e.tar.gz kernel-37eacb9f6e89fb399a79e952bc9c78eb3e16290e.zip | |
bpf: Fix a verifier verbose message
Long ago a map file descriptor in a pseudo ldimm64 instruction could
only be present as an immediate value insn[0].imm, and thus this value
was used in a verbose verifier message printed when the file descriptor
wasn't valid. Since addition of BPF_PSEUDO_MAP_IDX_VALUE/BPF_PSEUDO_MAP_IDX
the insn[0].imm field can also contain an index pointing to the file
descriptor in the attr.fd_array array. However, if the file descriptor
is invalid, the verifier still prints the verbose message containing
value of insn[0].imm. Patch the verifier message to always print the
actual file descriptor value.
Fixes: 387544bfa291 ("bpf: Introduce fd_idx")
Signed-off-by: Anton Protopopov <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Acked-by: Daniel Borkmann <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions
