mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH master 00/39] efi: fix bugs
@ 2026-02-16  8:44 Ahmad Fatoum
  2026-02-16  8:44 ` [PATCH master 01/39] efi: fix potential NULL dereference Ahmad Fatoum
                   ` (38 more replies)
  0 siblings, 39 replies; 40+ messages in thread
From: Ahmad Fatoum @ 2026-02-16  8:44 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

While adding new tests for the barebox EFI support, a number of issues
were unearthed. Additionally, I ran Claude Code to determine suspicious
looking patterns and it found a number of extra issues, mostly in error
paths.

Except for patches 36, 37 and 38, all other patches affect only efi/,
so I hope it's ok to merge into master after review.

Ahmad Fatoum (39):
  efi: fix potential NULL dereference
  efi: trace: fix EFI_EXIT2 to not evaluate output value on error
  efi: loader: fix CRC32 computation in table header update
  efi: loader: fix pointer vs value comparison in free_efi_only
  efi: loader: fix disk write return value check
  efi: loader: fix EFI_ENTRY/EFI_EXIT ordering in efi_set_time
  efi: runtime: fix missing EFI_EXIT in efirt_query_variable_info
  efi: loader: fix file handle leak in efi_file_from_path
  efi: loader: fix missing field init in deferred protocol add
  efi: loader: fix memory leak in efi_var_to_file
  efi: loader: fix multiple bugs in efi_loader_bootm
  efi: loader: fix return type and memory leak in efi_smbios_register
  efi: loader: fix memory leak in efi_dp_split_file_path
  efi: loader: fix HII string table realloc and memset bugs
  efi: loader: fix format specifier and missing EFI_EXIT in boot
    services
  efi: fix unreachable free in efi_set_variable_printf
  efi: payload: fix missing NULL check after read_file in handover
  efi: payload: fix EFI page leak in efi_read_file
  efi: payload: fix inverted error check after state_load
  efi: fix out-of-bounds read in device path unknown node printing
  efi: payload: fix wrong page count in efi_unload_fdt
  efi: fix out-of-bounds read in 1394 device path printing
  efi: loader: initialize block IO ops before installing protocol
  efi: runtime: fix variable store bounds check to account for alignment
  efi: fix Fibre Channel device path type vs sub_type comparison
  efi: loader: fix file open mode always setting O_RDWR
  efi: loader: fix NULL pointer dereference when deleting root volume
    handle
  efi: loader: fix memory leak of variable file buffer on success
  efi: loader: fix memory leak in efi_var_collect on buffer overflow
  efi: fix signed format specifier for uint64_t timestamp
  efi: payload: fix possible memory leaks during init
  efi: payload: protect against missing state alias
  efi: loader: fix stale return value in console out-of-memory path
  efi: loader: fix off-by-one in FAT codepage translation
  efi: loader: fix co-existence with EFI payload support
  efi: payload: skip ELF MMU handling when booted via stub
  efi: payload: register dummy device tree
  console: introduce helper for printing binary buffers as-is
  efi: loader: protocol: console: don't turn LF into CRLF

 common/console.c                         | 31 +++++++++++++++++++++++
 drivers/of/base.c                        |  8 ++++--
 efi/devicepath.c                         |  6 ++---
 efi/efivar-filename.c                    |  3 +++
 efi/efivar.c                             |  7 ++++--
 efi/loader/boot.c                        |  4 +--
 efi/loader/bootm.c                       | 22 ++++++++--------
 efi/loader/defaultvars.c                 |  4 +++
 efi/loader/devicepath.c                  |  4 ++-
 efi/loader/efi_var_common.c              |  4 ++-
 efi/loader/efi_var_file.c                |  5 ++--
 efi/loader/memory.c                      |  2 +-
 efi/loader/protocols/console.c           | 32 +++++++++---------------
 efi/loader/protocols/disk.c              | 26 +++++++++----------
 efi/loader/protocols/file.c              | 19 +++++++++++---
 efi/loader/protocols/hii.c               |  5 ++--
 efi/loader/protocols/unicode_collation.c |  2 +-
 efi/loader/runtime.c                     |  4 +--
 efi/loader/setup.c                       |  8 +++++-
 efi/loader/smbios.c                      |  3 ++-
 efi/loader/table.c                       |  1 +
 efi/payload/boarddata.c                  | 11 ++++++++
 efi/payload/bootm.c                      |  2 +-
 efi/payload/entry-multi.c                | 13 ++++++++++
 efi/payload/handover.c                   | 16 +++++++++---
 efi/payload/image.c                      |  4 ++-
 efi/payload/init.c                       | 12 +++++++--
 efi/runtime/efi_var_mem.c                |  4 +--
 efi/runtime/services.c                   |  4 +--
 include/console.h                        |  1 +
 include/efi/loader/trace.h               | 10 +++++---
 include/efi/mode.h                       |  6 ++++-
 pbl/mmu.c                                |  4 +++
 33 files changed, 203 insertions(+), 84 deletions(-)

-- 
2.47.3




^ permalink raw reply	[flat|nested] 40+ messages in thread

end of thread, other threads:[~2026-02-16  9:18 UTC | newest]

Thread overview: 40+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-02-16  8:44 [PATCH master 00/39] efi: fix bugs Ahmad Fatoum
2026-02-16  8:44 ` [PATCH master 01/39] efi: fix potential NULL dereference Ahmad Fatoum
2026-02-16  8:44 ` [PATCH master 02/39] efi: trace: fix EFI_EXIT2 to not evaluate output value on error Ahmad Fatoum
2026-02-16  8:44 ` [PATCH master 03/39] efi: loader: fix CRC32 computation in table header update Ahmad Fatoum
2026-02-16  8:44 ` [PATCH master 04/39] efi: loader: fix pointer vs value comparison in free_efi_only Ahmad Fatoum
2026-02-16  8:44 ` [PATCH master 05/39] efi: loader: fix disk write return value check Ahmad Fatoum
2026-02-16  8:44 ` [PATCH master 06/39] efi: loader: fix EFI_ENTRY/EFI_EXIT ordering in efi_set_time Ahmad Fatoum
2026-02-16  8:44 ` [PATCH master 07/39] efi: runtime: fix missing EFI_EXIT in efirt_query_variable_info Ahmad Fatoum
2026-02-16  8:44 ` [PATCH master 08/39] efi: loader: fix file handle leak in efi_file_from_path Ahmad Fatoum
2026-02-16  8:44 ` [PATCH master 09/39] efi: loader: fix missing field init in deferred protocol add Ahmad Fatoum
2026-02-16  8:44 ` [PATCH master 10/39] efi: loader: fix memory leak in efi_var_to_file Ahmad Fatoum
2026-02-16  8:44 ` [PATCH master 11/39] efi: loader: fix multiple bugs in efi_loader_bootm Ahmad Fatoum
2026-02-16  8:44 ` [PATCH master 12/39] efi: loader: fix return type and memory leak in efi_smbios_register Ahmad Fatoum
2026-02-16  8:44 ` [PATCH master 13/39] efi: loader: fix memory leak in efi_dp_split_file_path Ahmad Fatoum
2026-02-16  8:44 ` [PATCH master 14/39] efi: loader: fix HII string table realloc and memset bugs Ahmad Fatoum
2026-02-16  8:44 ` [PATCH master 15/39] efi: loader: fix format specifier and missing EFI_EXIT in boot services Ahmad Fatoum
2026-02-16  8:44 ` [PATCH master 16/39] efi: fix unreachable free in efi_set_variable_printf Ahmad Fatoum
2026-02-16  8:44 ` [PATCH master 17/39] efi: payload: fix missing NULL check after read_file in handover Ahmad Fatoum
2026-02-16  8:44 ` [PATCH master 18/39] efi: payload: fix EFI page leak in efi_read_file Ahmad Fatoum
2026-02-16  8:44 ` [PATCH master 19/39] efi: payload: fix inverted error check after state_load Ahmad Fatoum
2026-02-16  8:44 ` [PATCH master 20/39] efi: fix out-of-bounds read in device path unknown node printing Ahmad Fatoum
2026-02-16  8:44 ` [PATCH master 21/39] efi: payload: fix wrong page count in efi_unload_fdt Ahmad Fatoum
2026-02-16  8:44 ` [PATCH master 22/39] efi: fix out-of-bounds read in 1394 device path printing Ahmad Fatoum
2026-02-16  8:44 ` [PATCH master 23/39] efi: loader: initialize block IO ops before installing protocol Ahmad Fatoum
2026-02-16  8:44 ` [PATCH master 24/39] efi: runtime: fix variable store bounds check to account for alignment Ahmad Fatoum
2026-02-16  8:44 ` [PATCH master 25/39] efi: fix Fibre Channel device path type vs sub_type comparison Ahmad Fatoum
2026-02-16  8:44 ` [PATCH master 26/39] efi: loader: fix file open mode always setting O_RDWR Ahmad Fatoum
2026-02-16  8:44 ` [PATCH master 27/39] efi: loader: fix NULL pointer dereference when deleting root volume handle Ahmad Fatoum
2026-02-16  8:44 ` [PATCH master 28/39] efi: loader: fix memory leak of variable file buffer on success Ahmad Fatoum
2026-02-16  8:44 ` [PATCH master 29/39] efi: loader: fix memory leak in efi_var_collect on buffer overflow Ahmad Fatoum
2026-02-16  8:44 ` [PATCH master 30/39] efi: fix signed format specifier for uint64_t timestamp Ahmad Fatoum
2026-02-16  8:44 ` [PATCH master 31/39] efi: payload: fix possible memory leaks during init Ahmad Fatoum
2026-02-16  8:44 ` [PATCH master 32/39] efi: payload: protect against missing state alias Ahmad Fatoum
2026-02-16  8:44 ` [PATCH master 33/39] efi: loader: fix stale return value in console out-of-memory path Ahmad Fatoum
2026-02-16  8:44 ` [PATCH master 34/39] efi: loader: fix off-by-one in FAT codepage translation Ahmad Fatoum
2026-02-16  8:44 ` [PATCH master 35/39] efi: loader: fix co-existence with EFI payload support Ahmad Fatoum
2026-02-16  8:44 ` [PATCH master 36/39] efi: payload: skip ELF MMU handling when booted via stub Ahmad Fatoum
2026-02-16  8:44 ` [PATCH master 37/39] efi: payload: register dummy device tree Ahmad Fatoum
2026-02-16  8:44 ` [PATCH master 38/39] console: introduce helper for printing binary buffers as-is Ahmad Fatoum
2026-02-16  8:44 ` [PATCH master 39/39] efi: loader: protocol: console: don't turn LF into CRLF Ahmad Fatoum

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox