Re: [PATCH bpf] bpf: Reject writes through untrusted allocated pointers
Ning Ding <[email protected]> Sun, 2 Aug 2026 21:06:55 -0700
| Newsgroups | org.kernel.vger.bpf,org.kernel.vger.linux-kernel,org.kernel.vger.linux-kselftest |
|---|---|
| Message-ID | <CAJP4iusveRqaScJhLJhdkA7fLXZu74_W0MJN0YuHo=3Et5e0NQ@mail.gmail.com> |
> Why is this not enough? 'key' is scalar, but 'res' which is being written to is > still a PTR_TO_BTF_ID with PTR_UNTRUSTED. Ah, right. I was testing against Linus’ master, where that PTR_UNTRUSTED write check is not present, and I missed that it had already been added in bpf-next. That patch is not necessary.