Re: [PATCH] fsverity: Fix bpf_get_fsverity_digest() dynptr assumptions

Eric Biggers <[email protected]> Sat, 1 Aug 2026 10:15:49 -0700
Newsgroups dev.linux.lists.fsverity,org.kernel.vger.bpf,org.kernel.vger.linux-kernel,org.kernel.vger.stable
Message-ID <20260801171549.GB3567@quark>
On Sat, Aug 01, 2026 at 06:52:45PM +0200, Kumar Kartikeya Dwivedi wrote:
> > Also correctly handle sizes over INT_MAX, which previously caused an
> > integer overflow and crash.  __bpf_dynptr_size() returns a u64.
> >
> 
> I guess this occurs when using file dynptrs? Otherwise the size is capped to
> DYNPTR_SIZE_MASK.

Yes, though it looks like __bpf_dynptr_data_rw() excludes file dynptrs.
So this particular issue might be unreachable.  Still seems like a good
idea to match the u64 type that __bpf_dynptr_size() returns though.

- Eric