[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] hw/net: Fix read of uninitialized memory in imx_fec.
From: |
Peter Maydell |
Subject: |
Re: [PATCH] hw/net: Fix read of uninitialized memory in imx_fec. |
Date: |
Thu, 5 Jan 2023 15:33:57 +0000 |
On Wed, 21 Dec 2022 at 18:32, Stephen Longfield <slongfield@google.com> 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 will access uninitialized memory.
>
> This was pointed out to me by clg@kaod.org during the code review of
> a similar patch to hw/net/ftgmac100.c
>
> Change-Id: Ib0464303b191af1e28abeb2f5105eb25aadb5e9b
> Signed-off-by: Stephen Longfield <slongfield@google.com>
> Reviewed-by: Patrick Venture <venture@google.com>
Applied to target-arm.next, thanks.
(Looking at other ethernet device models we do indeed want to crc
just the packet, not "packet plus 4 0 bytes" or something.)
-- PMM
- Re: [PATCH] hw/net: Fix read of uninitialized memory in imx_fec.,
Peter Maydell <=