[apparmor] Memory leaks in parser/parser_regex.c (at least)
intrigeri
intrigeri at debian.org
Thu Aug 27 13:24:09 UTC 2015
Hi,
Steve Beattie wrote (27 Aug 2015 05:46:15 GMT) :
> On Mon, Aug 24, 2015 at 08:43:46AM -0700, Steve Beattie wrote:
>> > SUMMARY: AddressSanitizer: alloc-dealloc-mismatch ??:0 operator delete(void*)
>> > ==16428==HINT: if you don't care about these warnings you may set ASAN_OPTIONS=alloc_dealloc_mismatch=0
>> > ==16428==ABORTING
>> > Makefile:33: recipe for target 'error_output' failed
>> > make[3]: *** [error_output] Error 1
>> > make[3]: Leaving directory '/tmp/buildd/apparmor-2.10/parser/tst'
>> > Makefile:298: recipe for target 'tests' failed
>>
>> Looks like a legitimate type mismatch error when the objects are
>> deleted.
> Try the following patch: [...]
It seems to fix this problem! Thanks :)
> With that applied, local testing with AddressSanitzer shows the
> caching tests failing due to leaking cached and feature objects
> from libapparmor. I'll dig into it tomorrow.
Not sure if it's the same problem, but I see that:
FAIL: tst_aalogmisc
===================
=================================================================
==9632==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 20 byte(s) in 1 object(s) allocated from:
#0 0x7f143d8ea37a in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x9437a)
#1 0x403423 in hex_to_string /tmp/buildd/apparmor-2.10/libraries/libapparmor/src/libaalogparse.c:140
#2 0x401d8e in main /tmp/buildd/apparmor-2.10/libraries/libapparmor/src/tst_aalogmisc.c:34
#3 0x7f143c7bfb44 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b44)
Direct leak of 15 byte(s) in 1 object(s) allocated from:
#0 0x7f143d8ea37a in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x9437a)
#1 0x7f143c893f6f in __vasprintf_chk (/lib/x86_64-linux-gnu/libc.so.6+0xf5f6f)
Direct leak of 4 byte(s) in 1 object(s) allocated from:
#0 0x7f143d8ea37a in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x9437a)
#1 0x7f143c81f9e9 in strdup (/lib/x86_64-linux-gnu/libc.so.6+0x819e9)
Direct leak of 2 byte(s) in 1 object(s) allocated from:
#0 0x7f143d8ea37a in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x9437a)
#1 0x403423 in hex_to_string /tmp/buildd/apparmor-2.10/libraries/libapparmor/src/libaalogparse.c:140
#2 0x401db9 in main /tmp/buildd/apparmor-2.10/libraries/libapparmor/src/tst_aalogmisc.c:38
#3 0x7f143c7bfb44 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b44)
Direct leak of 1 byte(s) in 1 object(s) allocated from:
#0 0x7f143d8ea37a in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x9437a)
#1 0x403423 in hex_to_string /tmp/buildd/apparmor-2.10/libraries/libapparmor/src/libaalogparse.c:140
#2 0x401e2d in main /tmp/buildd/apparmor-2.10/libraries/libapparmor/src/tst_aalogmisc.c:41
#3 0x7f143c7bfb44 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b44)
SUMMARY: AddressSanitizer: 42 byte(s) leaked in 5 allocation(s).
FAIL tst_aalogmisc (exit status: 23)
Cheers,
--
intrigeri
More information about the AppArmor
mailing list