Re: [PATCH] hw/net: Fix read of uninitialized memory in imx_fec.

2023-01-05 Thread Cédric Le Goater
On 1/5/23 16:33, Peter Maydell wrote: On Wed, 21 Dec 2022 at 18:32, Stephen Longfield wrote: Size is used at lines 1088/1188 for the loop, which reads the last 4 bytes from the crc_ptr so it does need to get increased, however it shouldn't be increased before the buffer is passed to CRC comput

Re: [PATCH] hw/net: Fix read of uninitialized memory in imx_fec.

2023-01-05 Thread Cédric Le Goater
On 1/5/23 17:50, Peter Maydell wrote: On Thu, 5 Jan 2023 at 16:46, Cédric Le Goater wrote: On 1/5/23 16:33, Peter Maydell wrote: On Wed, 21 Dec 2022 at 18:32, Stephen Longfield wrote: Size is used at lines 1088/1188 for the loop, which reads the last 4 bytes from the crc_ptr so it does nee

Re: [PATCH] hw/net: Fix read of uninitialized memory in imx_fec.

2023-01-05 Thread Peter Maydell
On Thu, 5 Jan 2023 at 16:46, Cédric Le Goater wrote: > > On 1/5/23 16:33, Peter Maydell wrote: > > On Wed, 21 Dec 2022 at 18:32, Stephen Longfield > > wrote: > >> > >> Size is used at lines 1088/1188 for the loop, which reads the last 4 > >> bytes from the crc_ptr so it does need to get increase

Re: [PATCH] hw/net: Fix read of uninitialized memory in imx_fec.

2023-01-05 Thread Peter Maydell
On Wed, 21 Dec 2022 at 18:32, Stephen Longfield wrote: > > Size is used at lines 1088/1188 for the loop, which reads the last 4 > bytes from the crc_ptr so it does need to get increased, however it > shouldn't be increased before the buffer is passed to CRC computation, > or the crc32 function wil

[PATCH] hw/net: Fix read of uninitialized memory in imx_fec.

2022-12-21 Thread Stephen Longfield
Size is used at lines 1088/1188 for the loop, which reads the last 4 bytes from the crc_ptr so it does need to get increased, however it shouldn't be increased before the buffer is passed to CRC computation, or the crc32 function will access uninitialized memory. This was pointed out to me by c...