[PATCH v2] bpf: reject NULL data/sig in bpf_verify_pkcs7_signature

patchwork-bot+netdevbpf at kernel.org patchwork-bot+netdevbpf at kernel.org
Wed May 20 03:30:05 UTC 2026


Hello:

This patch was applied to bpf/bpf.git (master)
by Kumar Kartikeya Dwivedi <memxor at gmail.com>:

On Wed, 20 May 2026 04:40:59 +0200 you wrote:
> __bpf_dynptr_data() can return NULL (FILE dynptrs, any non-contiguous
> backing). bpf_verify_pkcs7_signature() forwards the pointer to
> verify_pkcs7_signature() unchecked, causing a NULL deref in
> asn1_ber_decoder() reachable from a sleepable BPF LSM at lsm.s/bpf.
> 
> NULL-check both pointers and reject with -EINVAL. Mirrors the guards
> already in kernel/bpf/crypto.c.
> 
> [...]

Here is the summary with links:
  - [v2] bpf: reject NULL data/sig in bpf_verify_pkcs7_signature
    https://git.kernel.org/bpf/bpf/c/49b18315be4e

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html





More information about the Linux-security-module-archive mailing list