[asterisk-bugs] [JIRA] (ASTERISK-23488) Logic error in callerid checksum processing

Matt Jordan (JIRA) noreply at issues.asterisk.org
Fri Mar 28 13:54:51 CDT 2014


     [ https://issues.asterisk.org/jira/browse/ASTERISK-23488?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matt Jordan updated ASTERISK-23488:
-----------------------------------

    Target Release Version/s: 11.9.0

> Logic error in callerid checksum processing
> -------------------------------------------
>
>                 Key: ASTERISK-23488
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-23488
>             Project: Asterisk
>          Issue Type: Bug
>          Components: Core/CallerID
>    Affects Versions: 1.8.15.1
>            Reporter: Russ Meyerriecks
>            Assignee: Russ Meyerriecks
>      Target Release: 1.8.27.0, 11.9.0
>
>         Attachments: checksum_fix.patch, checksum_fix_v2.patch
>
>
> In short, callerid will fail if the checksum is ever calculated to 0x00. A valid checksum lies in the range 0-255, a 16 bit value. We suddenly started seeing our CID tests in production fail fairly consistently. I believe this is due to the transmitted date field incrementing to the point where checksums were more often calculated close to the 0x00 value.
> The following line in main/callerid.c which checks the received cid checksum (b) against the calculated checksum will overflow with a checksum of 0x00:
> if (b != (256 - (cid->cksum & 0xff))) {
> Even though cid->cksum is masked off, 0x100-0x00 is 0x100 which fails this check. A better way to do this is to add our calculated checksum to the transmitted 2's compliment checksum.
> if (b + (cid->cksum & 0xff)) {



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list