[lvc-project] [PATCH net-next] udp: fix incorrect parameter validation in the udp_lib_getsockopt() function

Willem de Bruijn willemdebruijn.kernel at gmail.com
Thu Mar 7 12:11:42 MSK 2024


Gavrilov Ilia wrote:
> The 'len' variable can't be negative because all 'min_t' parameters
> cast to unsigned int, and then the minimum one is chosen.
> 
> To fix it, move the if statement higher.
> 
> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
> Signed-off-by: Gavrilov Ilia <Ilia.Gavrilov at infotecs.ru>

Reviewed-by: Willem de Bruijn <willemb at google.com>



More information about the lvc-project mailing list