Re: [PATCH net] ipvs: prevent integer overflow in do_ip_vs_get_ctl()

2025-03-08 Thread kernel test robot
Hi Dan, kernel test robot noticed the following build warnings: [auto build test WARNING on net/main] url: https://github.com/intel-lab-lkp/linux/commits/Dan-Carpenter/ipvs-prevent-integer-overflow-in-do_ip_vs_get_ctl/20250307-214537 base: net/main patch link: https://lore.kernel.org/r

Re: [PATCH net] ipvs: prevent integer overflow in do_ip_vs_get_ctl()

2025-03-08 Thread Julian Anastasov
Hello, On Fri, 7 Mar 2025, Dan Carpenter wrote: > The get->num_services variable is an unsigned int which is controlled by > the user. The struct_size() function ensures that the size calculation > does not overflow an unsigned long, however, we are saving the result to > an int so the

Re: [PATCH net] ipvs: prevent integer overflow in do_ip_vs_get_ctl()

2025-03-07 Thread Jan Engelhardt
On Friday 2025-03-07 14:44, Dan Carpenter wrote: > case IP_VS_SO_GET_SERVICES: > { > struct ip_vs_get_services *get; >- int size; >+ size_t size; > > get = (struct ip_vs_get_services *)arg; > size = struct_size(get,