On Mon, Mar 17, 2025 at 10:04:00AM +0100, Peter Seiderer wrote: > Add strict buffer parsing index check to avoid the following Smatch > warning: > > net/core/pktgen.c:877 get_imix_entries() > warn: check that incremented offset 'i' is capped > > Checking the buffer index i after every get_user/i++ step and returning > with error code immediately avoids the current indirect (but correct) > error handling. > > Reported-by: Dan Carpenter <dan.carpen...@linaro.org> > Closes: > https://lore.kernel.org/netdev/36cf3ee2-38b1-47e5-a42a-363efeb0ace3@stanley.mountain/ > Signed-off-by: Peter Seiderer <ps.rep...@gmx.net>
Reviewed-by: Simon Horman <ho...@kernel.org>