Re: [PATCH 2/2] [v2] net/mlx5: fix possible stack overflows

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Feb 20, 2024 at 09:11:51AM +0100, Arnd Bergmann wrote:
> On Tue, Feb 20, 2024, at 09:06, Simon Horman wrote:
> > On Mon, Feb 19, 2024 at 11:04:56AM +0100, Arnd Bergmann wrote:
> 
> > Hi Arnd,
> >
> > With patch 1/2 in place this code goes on as:
> >
> > 	switch (action->action_type) {
> > 	case DR_ACTION_TYP_DROP:
> > 		memset(buff, 0, sizeof(buff));
> >
> > buff is now a char * rather than an array of char.
> > siceof(buff) doesn't seem right here anymore.
> >
> > Flagged by Coccinelle.
> 
> Rihgt, that would be bad. It sounds like we won't use patch 1/2
> after all though, so I think it's going to be fine after all.
> If the mlx5 maintainers still want both patches, I'll rework
> it to use the fixed size.

Ack. I agree that this patch is fine if 1/2 is dropped.

If that is the case feel free to add.

Reviewed-by: Simon Horman <horms@xxxxxxxxxx>





[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux