[Home]

Summary:ASTERISK-26533: [UBSAN] stdtime/localtime.c: runtime error: left shift of negative value -1
Reporter:Badalian Vyacheslav (slavon)Labels:
Date Opened:2016-10-30 14:11:14Date Closed:
Priority:MajorRegression?
Status:Open/NewComponents:Core/General
Versions:13.12.1 13.15.0 14.1.1 GIT Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:{code}
stdtime/localtime.c:831:20: runtime error: left shift of negative value -1
   #0 0x90ba61 in detzcode stdtime/localtime.c:831
   #1 0x90cb0a in tzload stdtime/localtime.c:946
   #2 0x911d9b in tzparse stdtime/localtime.c:1427
   #3 0x90e541 in tzload stdtime/localtime.c:1066
   #4 0x91497f in ast_tzset stdtime/localtime.c:1665
   #5 0x91614e in ast_localtime stdtime/localtime.c:1777
   #6 0x775ccb in ast_log_full /usr/src/asterisk/main/logger.c:1884
   #7 0x777bfd in ast_log_callid /usr/src/asterisk/main/logger.c:1967
   #8 0x7784ea in __ast_verbose_ap /usr/src/asterisk/main/logger.c:2048
   #9 0x7786ab in __ast_verbose /usr/src/asterisk/main/logger.c:2059
   #10 0x4bb9f5 in print_intro_message /usr/src/asterisk/main/asterisk.c:3966
   #11 0x4bece4 in asterisk_daemon /usr/src/asterisk/main/asterisk.c:4481
   #12 0x4be642 in main /usr/src/asterisk/main/asterisk.c:4373
   #13 0x7f205057eb44 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b44)
   #14 0x433918  (/usr/sbin/asterisk+0x433918)
{code}


{code}
root@0bfa9456f68a:/usr/src/asterisk# git log
commit 6b1c55dc9be90904363dbcf958a9fcc243c85629
Author: George Joseph <gjoseph@digium.com>
Date:   Fri Oct 28 15:59:19 2016 -0600

   pjproject_bundled:  Fix issue where "/version.mak" wasn't found

root@0bfa9456f68a:/usr/src/asterisk# git branch
* 13

{code}

on module load...
Comments:By: Asterisk Team (asteriskteam) 2016-10-30 14:11:14.903-0500

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) 2017-04-24 20:12:57.877-0500

Here is fixed version of code. Please backport...
https://github.com/eggert/tz/blob/master/localtime.c

also look like individual bug fix:
https://gcc.gnu.org/ml/gcc-patches/2015-05/msg00764.html