Summary: | ASTERISK-25721: [patch] res_phoneprov: memory leak and heap-use-after-free | ||
Reporter: | Badalian Vyacheslav (slavon) | Labels: | |
Date Opened: | 2016-01-23 01:39:31.000-0600 | Date Closed: | 2016-02-22 12:14:09.000-0600 |
Priority: | Minor | Regression? | |
Status: | Closed/Complete | Components: | Resources/res_phoneprov |
Versions: | 13.7.0 | Frequency of Occurrence | |
Related Issues: | |||
Environment: | Attachments: | ( 0) res_phoneprov.diff ( 1) res_phoneprov2.diff | |
Description: | fonded and tested in asan | ||
Comments: | By: Asterisk Team (asteriskteam) 2016-01-23 01:39:33.171-0600 Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution. A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report. Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process]. By: Badalian Vyacheslav (slavon) 2016-01-23 03:01:15.624-0600 second patch fixes this {code} ==23039==ERROR: AddressSanitizer: heap-use-after-free on address 0x60c000c7feb9 at pc 0x7f658554d17e bp 0x7ffeda1ccff0 sp 0x7ffeda1ccfe0 READ of size 1 at 0x60c000c7feb9 thread T0 #0 0x7f658554d17d in _ast_strlen_zero /root/asterisk-13.7.0/include/asterisk/strings.h:54 #1 0x7f6585555eca in get_defaults /root/asterisk-13.7.0/res/res_phoneprov.c:1239 #2 0x7f658555631b in load_users /root/asterisk-13.7.0/res/res_phoneprov.c:1281 #3 0x7f65855576e8 in ast_phoneprov_provider_register /root/asterisk-13.7.0/res/res_phoneprov.c:1552 #4 0x7f6585556d5d in load_module /root/asterisk-13.7.0/res/res_phoneprov.c:1443 #5 0x669fda in start_resource /root/asterisk-13.7.0/main/loader.c:1021 #6 0x66b88e in load_resource_list /root/asterisk-13.7.0/main/loader.c:1219 #7 0x66c58e in load_modules /root/asterisk-13.7.0/main/loader.c:1367 #8 0x49344d in asterisk_daemon /root/asterisk-13.7.0/main/asterisk.c:4676 #9 0x4923db in main /root/asterisk-13.7.0/main/asterisk.c:4282 #10 0x7f658b42bb14 in __libc_start_main (/lib64/libc.so.6+0x21b14) #11 0x432ae8 (/usr/sbin/asterisk+0x432ae8) {code} ponter was deleted becouse {{cfg}} destroyed By: Joshua C. Colp (jcolp) 2016-01-25 08:13:43.776-0600 This can be put up for code review if you'd like. By: Badalian Vyacheslav (slavon) 2016-02-08 05:28:53.681-0600 Yes, please. I more 3 month try to get access to Garret server from datacenter :( Is Garrett web UI have patch post fuctions? By: Joshua C. Colp (jcolp) 2016-02-08 05:46:53.028-0600 Not that I am aware of. By: Badalian Vyacheslav (slavon) 2016-02-09 22:59:54.326-0600 Patch added to review |