From e17ffbfb1ab07f8d0d4b864a5f477e119843722d Mon Sep 17 00:00:00 2001 From: Zhihao Cheng Date: Mon, 11 Nov 2024 17:08:30 +0800 Subject: ubifs-utils: Support Address-Sanitizier debug Add new option '--asan' for configuration to support dynamic Address-Sanitizier debugging, which could detect kinds of invalid memory accessing problems(eg. UAF, r/w OOB, etc.). Currently, only ubifs-utils(mkfs.ubifs/fsck.ubifs) is supported. Enable Address-Sanitizier debugging with configuration: ./configure --enable-asan Notice: The Address-Sanitizier will stop the program and print problems if memory problems are detected. Sometimes the memory problems come from third libs(not mtd-utils), which could stuck the testcases. Signed-off-by: Zhihao Cheng Signed-off-by: David Oberhollenzer --- ubifs-utils/Makemodule.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ubifs-utils/Makemodule.am') diff --git a/ubifs-utils/Makemodule.am b/ubifs-utils/Makemodule.am index a511c40..21ba059 100644 --- a/ubifs-utils/Makemodule.am +++ b/ubifs-utils/Makemodule.am @@ -72,7 +72,7 @@ mkfs_ubifs_SOURCES = \ ubifs-utils/mkfs.ubifs/mkfs.ubifs.c mkfs_ubifs_LDADD = libmtd.a libubi.a $(ZLIB_LIBS) $(LZO_LIBS) $(ZSTD_LIBS) $(UUID_LIBS) $(LIBSELINUX_LIBS) $(OPENSSL_LIBS) \ - $(DUMP_STACK_LD) -lm -lpthread + $(DUMP_STACK_LD) $(ASAN_LIBS) -lm -lpthread mkfs_ubifs_CPPFLAGS = $(AM_CPPFLAGS) $(ZLIB_CFLAGS) $(LZO_CFLAGS) $(ZSTD_CFLAGS) $(UUID_CFLAGS) $(LIBSELINUX_CFLAGS) \ -I$(top_srcdir)/ubi-utils/include -I$(top_srcdir)/ubifs-utils/common -I $(top_srcdir)/ubifs-utils/libubifs @@ -90,7 +90,7 @@ fsck_ubifs_SOURCES = \ ubifs-utils/fsck.ubifs/handle_disconnected.c fsck_ubifs_LDADD = libmtd.a libubi.a $(ZLIB_LIBS) $(LZO_LIBS) $(ZSTD_LIBS) $(UUID_LIBS) $(LIBSELINUX_LIBS) $(OPENSSL_LIBS) \ - $(DUMP_STACK_LD) -lm -lpthread + $(DUMP_STACK_LD) $(ASAN_LIBS) -lm -lpthread fsck_ubifs_CPPFLAGS = $(AM_CPPFLAGS) $(ZLIB_CFLAGS) $(LZO_CFLAGS) $(ZSTD_CFLAGS) $(UUID_CFLAGS) $(LIBSELINUX_CFLAGS) \ -I$(top_srcdir)/ubi-utils/include -I$(top_srcdir)/ubifs-utils/common -I $(top_srcdir)/ubifs-utils/libubifs \ -I$(top_srcdir)/ubifs-utils/fsck.ubifs -- cgit v1.2.3