==706==ERROR: AddressSanitizer: heap-use-after-free on address 0x61e0000c9080 at pc 0x7f68604cef7f bp 0x7f683d79e270 sp 0x7f683d79da20 READ of size 2256 at 0x61e0000c9080 thread T40 2020-10-22 09:43:33.537249 99.70% [INFO] switch_time.c:1430 Timezone reloaded 1750 definitions #0 0x7f68604cef7e (/usr/lib/x86_64-linux-gnu/libasan.so.3+0x5cf7e) #1 0x7f685b6af3f1 in msg_mclass_clone (/usr/lib/libsofia-sip-ua.so.0+0x7d3f1) #2 0x7f685b727ccc in sip_extend_mclass (/usr/lib/libsofia-sip-ua.so.0+0xf5ccc) #3 0x7f6851cb0bdf in sofia_init /data/stack/src/mod/endpoints/mod_sofia/sofia.c:4336 #4 0x7f6851c964ee in mod_sofia_load /data/stack/src/mod/endpoints/mod_sofia/mod_sofia.c:6253 #5 0x7f685f48f26f in switch_loadable_module_load_file src/switch_loadable_module.c:1751 #6 0x7f685f48f26f in switch_loadable_module_load_module_ex src/switch_loadable_module.c:1858 #7 0x7f685f493fa9 in switch_loadable_module_load_module src/switch_loadable_module.c:1812 #8 0x7f684e5e2d3d in load_function /data/stack/src/mod/applications/mod_commands/mod_commands.c:2725 #9 0x7f685f49b004 in switch_api_execute src/switch_loadable_module.c:3010 #10 0x7f685f365c57 in switch_console_execute src/switch_console.c:393 #11 0x7f685f365f07 in switch_console_process src/switch_console.c:321 #12 0x7f685f366198 in console_thread src/switch_console.c:1077 #13 0x7f685fad2f3a in dummy_worker threadproc/unix/thread.c:151 #14 0x7f685e7a14a3 in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x74a3) #15 0x7f685de13d0e in __clone (/lib/x86_64-linux-gnu/libc.so.6+0xe8d0e) 0x61e0000c9080 is located 0 bytes inside of 2672-byte region [0x61e0000c9080,0x61e0000c9af0) freed by thread T40 here: #0 0x7f6860533a10 in free (/usr/lib/x86_64-linux-gnu/libasan.so.3+0xc1a10) #1 0x7f685b727c5c in sip_cloned_parser_destroy (/usr/lib/libsofia-sip-ua.so.0+0xf5c5c) #2 0x7f6851c95d8b in mod_sofia_shutdown_cleanup /data/stack/src/mod/endpoints/mod_sofia/mod_sofia.c:6483 #3 0x7f6851c9720a in mod_sofia_shutdown /data/stack/src/mod/endpoints/mod_sofia/mod_sofia.c:6493 #4 0x7f685f49327a in do_shutdown src/switch_loadable_module.c:2397 #5 0x7f685f494194 in switch_loadable_module_unload_module src/switch_loadable_module.c:1942 #6 0x7f684e5d2a97 in unload_function /data/stack/src/mod/applications/mod_commands/mod_commands.c:2774 #7 0x7f685f49b004 in switch_api_execute src/switch_loadable_module.c:3010 #8 0x7f685f365c57 in switch_console_execute src/switch_console.c:393 #9 0x7f685f365f07 in switch_console_process src/switch_console.c:321 #10 0x7f685f366198 in console_thread src/switch_console.c:1077 #11 0x7f685fad2f3a in dummy_worker threadproc/unix/thread.c:151 #12 0x7f685e7a14a3 in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x74a3) previously allocated by thread T0 here: #0 0x7f6860533d28 in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.3+0xc1d28) #1 0x7f685b6af2df in msg_mclass_clone (/usr/lib/libsofia-sip-ua.so.0+0x7d2df) #2 0x7f685b727ccc in sip_extend_mclass (/usr/lib/libsofia-sip-ua.so.0+0xf5ccc) #3 0x7f6851cb0bdf in sofia_init /data/stack/src/mod/endpoints/mod_sofia/sofia.c:4336 #4 0x7f6851c964ee in mod_sofia_load /data/stack/src/mod/endpoints/mod_sofia/mod_sofia.c:6253 #5 0x7f685f48f26f in switch_loadable_module_load_file src/switch_loadable_module.c:1751 #6 0x7f685f48f26f in switch_loadable_module_load_module_ex src/switch_loadable_module.c:1858 #7 0x7f685f495904 in switch_loadable_module_init src/switch_loadable_module.c:2288 #8 0x7f685f3d231a in switch_core_init_and_modload src/switch_core.c:2490 #9 0x561a909dab9c in main src/switch.c:1200 #10 0x7f685dd4b2e0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202e0) Thread T40 created by T0 here: #0 0x7f68604a2f59 in __interceptor_pthread_create (/usr/lib/x86_64-linux-gnu/libasan.so.3+0x30f59) #1 0x7f685fad34a7 in apr_thread_create threadproc/unix/thread.c:194 #2 0x7f685f36854e in switch_console_loop src/switch_console.c:1177 #3 0x561a909dac45 in main src/switch.c:1227 #4 0x7f685dd4b2e0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202e0) SUMMARY: AddressSanitizer: heap-use-after-free (/usr/lib/x86_64-linux-gnu/libasan.so.3+0x5cf7e) Shadow bytes around the buggy address: 0x0c3c800111c0: fd fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c3c800111d0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c3c800111e0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c3c800111f0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c3c80011200: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa =>0x0c3c80011210:[fd]fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x0c3c80011220: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x0c3c80011230: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x0c3c80011240: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x0c3c80011250: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x0c3c80011260: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Heap right redzone: fb Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack partial redzone: f4 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb ==706==ABORTING