public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [PATCH v3 2/2] efi_loader: fix use after free in receive path
Date: Fri, 20 Nov 2020 18:31:52 -0500	[thread overview]
Message-ID: <20201120233152.GT32272@bill-the-cat> (raw)
In-Reply-To: <X7hJm0W6VL9F3yXo@nyx.fritz.box>

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 <patrick@blueri.se>
> > 
> > Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> 
> Was this patchset ever merged?

commit 42f804fbba2836e64f472306ff7616c812d5c54d
Author: Patrick Wildt <patrick@blueri.se>
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: <https://lists.denx.de/pipermail/u-boot/attachments/20201120/7a1c3817/attachment.sig>

  reply	other threads:[~2020-11-20 23:31 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-06 14:56 efi_loader: fix free() before use in RX path Patrick Wildt
2020-10-06 16:32 ` Patrick Wildt
2020-10-06 20:26   ` Heinrich Schuchardt
2020-10-06 22:29     ` Patrick Wildt
2020-10-06 22:30       ` [PATCH] efi_loader: fix use after free in receive path Patrick Wildt
2020-10-06 22:45         ` Heinrich Schuchardt
2020-10-06 22:51           ` Patrick Wildt
2020-10-06 22:57             ` [PATCH v2 1/2] net: add a define for the number of packets received as batch Patrick Wildt
2020-10-06 22:59               ` [PATCH v2 2/2] efi_loader: fix use after free in receive path Patrick Wildt
2020-10-07  9:03                 ` [PATCH v3 1/2] net: add a define for the number of packets received as batch Patrick Wildt
2020-10-07  9:04                   ` [PATCH v3 2/2] efi_loader: fix use after free in receive path Patrick Wildt
2020-10-07 13:26                     ` Heinrich Schuchardt
2020-11-20 22:56                       ` Patrick Wildt
2020-11-20 23:31                         ` Tom Rini [this message]
2020-11-21  1:36                           ` Patrick Wildt
2020-10-07 10:51                   ` [PATCH v3 1/2] net: add a define for the number of packets received as batch Heinrich Schuchardt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201120233152.GT32272@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox