Re: [PATCH][next] ALSA: 6fire: Fix undefined behavior bug in struct midi_runtime

2023-10-06 Thread Takashi Iwai
On Fri, 29 Sep 2023 18:06:32 +0200, Gustavo A. R. Silva wrote: > > `struct urb` is a flexible structure, which means that it contains a > flexible-array member at the bottom. This could potentially lead to an > overwrite of the objects following `out_urb` in `struct midi_runtime`, > among them a f

Re: [PATCH][next] ALSA: 6fire: Fix undefined behavior bug in struct midi_runtime

2023-10-01 Thread Gustavo A. R. Silva
On 9/29/23 19:27, Kees Cook wrote: On Fri, Sep 29, 2023 at 06:06:32PM +0200, Gustavo A. R. Silva wrote: `struct urb` is a flexible structure, which means that it contains a flexible-array member at the bottom. This could potentially lead to an overwrite of the objects following `out_urb` in `

Re: [PATCH][next] ALSA: 6fire: Fix undefined behavior bug in struct midi_runtime

2023-09-29 Thread Kees Cook
On Fri, Sep 29, 2023 at 06:06:32PM +0200, Gustavo A. R. Silva wrote: > `struct urb` is a flexible structure, which means that it contains a > flexible-array member at the bottom. This could potentially lead to an > overwrite of the objects following `out_urb` in `struct midi_runtime`, > among them

[PATCH][next] ALSA: 6fire: Fix undefined behavior bug in struct midi_runtime

2023-09-29 Thread Gustavo A. R. Silva
`struct urb` is a flexible structure, which means that it contains a flexible-array member at the bottom. This could potentially lead to an overwrite of the objects following `out_urb` in `struct midi_runtime`, among them a function pointer. Fix this by placing the declaration of object `out_urb`