From: Tom Rini Date: Fri, 20 Nov 2020 18:31:52 -0500 Subject: [PATCH v3 2/2] efi_loader: fix use after free in receive path In-Reply-To: References: <20201006222934.GA15578@nox.fritz.box> <20201006223051.GB15578@nox.fritz.box> <92745C9B-6D8B-4612-BAC6-82D7A6803FEC@gmx.de> <20201006225108.GC15578@nox.fritz.box> <20201006225714.GA15805@nox.fritz.box> <20201006225901.GB15805@nox.fritz.box> <20201007090330.GA28445@ryzen.blueri.se> <20201007090433.GB28445@ryzen.blueri.se> <93ac7c6a-2070-6c5a-f1a0-bdb08f00aedc@gmx.de> Message-ID: <20201120233152.GT32272@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Fri, Nov 20, 2020 at 11:56:27PM +0100, Patrick Wildt wrote: > Am Wed, Oct 07, 2020 at 03:26:38PM +0200 schrieb Heinrich Schuchardt: > > On 07.10.20 11:04, Patrick Wildt wrote: > > > With DM enabled the ethernet code will receive a packet, call > > > the push method that's set by the EFI network implementation > > > and then free the packet. Unfortunately the push methods only > > > sets a flag that the packet needs to be handled, but the code > > > that provides the packet to an EFI application runs after the > > > packet has already been freed. > > > > > > To rectify this issue, adjust the push method to accept the packet > > > and store it in a temporary buffer. The EFI application then gets > > > the data copied from that buffer. This way the packet is cached > > > until is is needed. > > > > > > The DM Ethernet stack tries to receive 32 packets at once, thus > > > we better allocate as many buffers as the stack. > > > > > > Signed-off-by: Patrick Wildt > > > > Reviewed-by: Heinrich Schuchardt > > Was this patchset ever merged? commit 42f804fbba2836e64f472306ff7616c812d5c54d Author: Patrick Wildt Date: Wed Oct 7 11:04:33 2020 +0200 efi_loader: fix use after free in rece is what I see atm. -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: