u-boot/lib/efi_loader
Patrick Wildt 42f804fbba 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>
2020-10-19 22:59:53 +02:00
..
.gitignore efi_loader: git ignore helloworld_efi.S 2020-01-07 18:08:20 +01:00
efi_acpi.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
efi_bootmgr.c efi_loader: validate device path length in boot manager 2020-08-24 16:37:53 +02:00
efi_boottime.c efi_loader: save global data pointer on RISC-V 2020-09-14 23:28:52 +02:00
efi_console.c efi_loader: comments EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL 2020-06-05 04:04:41 +02:00
efi_device_path.c efi_loader: efi_dp_check_length() 2020-08-24 16:37:53 +02:00
efi_device_path_to_text.c efi_loader: device path for SATA devices 2020-05-21 10:00:17 +02:00
efi_device_path_utilities.c SPDX: Convert a few files that were missed before 2018-05-10 20:38:35 -04:00
efi_disk.c efi_loader: use logging for block device messages 2020-07-22 12:32:42 +02:00
efi_file.c efi_loader: loosen buffer parameter check in efi_file_read 2020-07-22 12:32:41 +02:00
efi_freestanding.c efi_loader: fix freestanding memmove() 2020-03-22 11:06:23 +01:00
efi_gop.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
efi_hii.c efi_loader: ListPackageLists() return EFI_NOT_FOUND 2019-06-20 22:26:19 +00:00
efi_hii_config.c efi_loader: debug output for HII protocols 2019-02-13 09:40:06 +01:00
efi_image_loader.c efi_loader: error message if image not authenticated 2020-09-06 21:21:41 +02:00
efi_load_initrd.c efi_loader: illegal free in EFI_LOAD_FILE2_PROTOCOL 2020-10-06 07:43:56 +02:00
efi_memory.c efi_memory: refine overlap_only_ram description 2020-09-18 22:23:58 +02:00
efi_net.c efi_loader: fix use after free in receive path 2020-10-19 22:59:53 +02:00
efi_rng.c efi_loader: installation of EFI_RNG_PROTOCOL 2020-09-27 16:10:45 +02:00
efi_root_node.c efi_loader: installation of EFI_RNG_PROTOCOL 2020-09-27 16:10:45 +02:00
efi_runtime.c efi_loader: ResetSystem() should not hang 2020-08-24 16:37:53 +02:00
efi_setup.c efi_loader: installation of EFI_RNG_PROTOCOL 2020-09-27 16:10:45 +02:00
efi_signature.c efi_loader: signature: correct a behavior against multiple signatures 2020-08-14 12:28:25 +02:00
efi_smbios.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
efi_unicode_collation.c efi_loader: function descriptions efi_unicode_collation.c 2020-04-16 08:10:01 +02:00
efi_var_common.c efi_loader: add copyright notice 2020-08-08 19:03:24 +02:00
efi_var_file.c efi_loader: Enable run-time variable support for tee based variables 2020-08-01 11:57:41 +02:00
efi_var_mem.c efi_loader: efi_var_mem_notify_exit_boot_services 2020-09-14 23:28:52 +02:00
efi_var_seed.S efi_loader: pre-seed UEFI variables 2020-07-16 12:37:02 +02:00
efi_variable.c efi_loader: variable: fix secure state initialization 2020-08-13 22:37:42 +02:00
efi_variable_tee.c efi_loader: Enable run-time variable support for tee based variables 2020-08-01 11:57:41 +02:00
efi_watchdog.c efi_loader: function descriptions efi_watchdog.c 2020-04-16 08:10:02 +02:00
helloworld.c efi_loader: consistent naming of protocol GUIDs 2019-04-23 00:37:27 +02:00
Kconfig efi_loader: QEMU CONFIG_EFI_GRUB_ARM32_WORKAROUND=n 2020-10-06 07:43:56 +02:00
Makefile efi_loader: Enable run-time variable support for tee based variables 2020-08-01 11:57:41 +02:00