summaryrefslogtreecommitdiffstats
path: root/drivers/ddr/imx/imx8m/ddr_init.c
diff options
context:
space:
mode:
authorPatrick Wildt <patrick@blueri.se>2020-10-07 11:04:33 +0200
committerHeinrich Schuchardt <xypron.glpk@gmx.de>2020-10-19 22:59:53 +0200
commit42f804fbba2836e64f472306ff7616c812d5c54d (patch)
tree6ec73e69086dd764748b7c26bd60ddc4f07af6ec /drivers/ddr/imx/imx8m/ddr_init.c
parent36ea0cab2696655030dc953e559f5c5bd223a38e (diff)
downloadu-boot-42f804fbba2836e64f472306ff7616c812d5c54d.tar.gz
u-boot-42f804fbba2836e64f472306ff7616c812d5c54d.tar.xz
u-boot-42f804fbba2836e64f472306ff7616c812d5c54d.zip
efi_loader: fix use after free in receive path
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> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Diffstat (limited to 'drivers/ddr/imx/imx8m/ddr_init.c')
0 files changed, 0 insertions, 0 deletions