[Home]

Summary:ASTERISK-21209: crash in res_clialiases on reload
Reporter:Jaco Kroon (jkroon)Labels:
Date Opened:2013-03-06 10:11:13.000-0600Date Closed:2013-03-18 13:36:06
Priority:CriticalRegression?
Status:Closed/CompleteComponents:Resources/res_clialiases
Versions:11.2.1 Frequency of
Occurrence
Occasional
Related
Issues:
Environment:Attachments:( 0) asterisk-11.2.1-res_clialiases-segfault.diff
Description:Not sure what triggered it, but I got a backtrace that crashed in the hash function for res_clialises, after some static analysis of the code I found that the load_config() function doesn't verify the result of ast_cli_register - which in the case of error de-allocates (it re-allocates cli_entry->command) cli_entry->command and then sets it to NULL, which in turn is used in the hash function to compute the hash.
Comments:By: Jaco Kroon (jkroon) 2013-03-06 10:18:09.084-0600

Code has ONLY been compile tested.

Logic basically says that if ast_cli_register fails, give a warning, de-allocate the ao2 object and go on with our lives.

By: Kinsey Moore (kmoore) 2013-03-18 13:35:31.988-0500

This was fixed in R37784[0234] in mid-December.