Skip to content

Fix misc ASAN reports

Andrew Scull u-boot 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest8 patches 18 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8doc: Correct position of gdb '--args' parameterdoc/develop/tests_sandbox.rst+1 -12 replies
2/8acpi: Fix buffer overflow in do_acpi_dump()cmd/acpi.c+1 -12 replies
3/8x86: sandbox: Add missing PCI bar to barinfodrivers/power/acpi_pmc/pmc_emul.c+1 -02 replies
4/8usb: sandbox: Check for string end in copy_to_unicode()drivers/usb/emul/usb-emul-uclass.c+2 -32 replies
5/8usb: sandbox: Bounds check read from bufferdrivers/usb/emul/sandbox_flash.c+2 -02 replies
6/8sound: Fix buffer overflow in square wave generationdrivers/sound/sound.c+2 -42 replies
7/8test: Fix pointer overrun in dm_test_devm_regmap()test/dm/regmap.c+4 -52 replies
8/8test: dm: devres: Remove use-after-freetest/dm/devres.c+1 -42 replies

Reviews trailers per patch

All 8 patches have a Reviewed-by or Acked-by.

PatchSimon Glass
1/8R-b
2/8R-b
3/8R-b
4/8R-b
5/8R-b
6/8R-b
7/8R-b
8/8R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/8] Fix misc ASAN reports

I've been experimenting with ASAN on sandbox and turned up a few issues that are fixed in this series.

Basic ASAN was easy to turn on, but integrating with dlmalloc was messier and fairly intrusive. Even when I had it working, there was only a small redzone between allocations which limits the usefulness.

I saw another series on the list by Sean Anderson to enable valgrind which was finding a different set of issues, though there was one overlap that Sean is fixing with
"[PATCH] IOMUX: Fix access past end of console_devices".

With these issues fixed, I was able to run the dm tests without any ASAN issues. There are a couple of leaks reported at the end, but that's for another day.

Andrew Scull (8):
doc: Correct position of gdb '--args' parameter
acpi: Fix buffer overflow in do_acpi_dump()
x86: sandbox: Add missing PCI bar to barinfo
usb: sandbox: Check for string end in copy_to_unicode()
usb: sandbox: Bounds check read from buffer
sound: Fix buffer overflow in square wave generation
test: Fix pointer overrun in dm_test_devm_regmap()
test: dm: devres: Remove use-after-free

 cmd/acpi.c                         | 2 +-
 doc/develop/tests_sandbox.rst      | 2 +-
 drivers/power/acpi_pmc/pmc_emul.c  | 1 +
 drivers/sound/sound.c              | 6 ++----
 drivers/usb/emul/sandbox_flash.c   | 2 ++
 drivers/usb/emul/usb-emul-uclass.c | 5 ++---
 test/dm/devres.c                   | 5 +----
 test/dm/regmap.c                   | 9 ++++-----
 8 files changed, 14 insertions(+), 18 deletions(-)
Signature · 1 line
2.35.1.1094.g7c7d902a7c-goog