[asterisk-bugs] [JIRA] (ASTERISK-26526) [UBSAN] vector.h: null pointer can be passed as argument 2 to memcpy

Corey Farrell (JIRA) noreply at issues.asterisk.org
Sun Oct 30 13:43:11 CDT 2016


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

Corey Farrell updated ASTERISK-26526:
-------------------------------------

          Component/s: Core/AstMM
             Severity: Minor  (was: Major)
    Affects Version/s: GIT
                       13.12.1
                       14.1.1
             Assignee: Corey Farrell  (was: Unassigned)
              Summary: [UBSAN] vector.h: null pointer can be passed as argument 2 to memcpy  (was: [UBSAN] cli.c: null pointer passed as argument 2, which is declared to never be null)

It appears UBSAN is being tripped by {{AST_VECTOR_APPEND}} being called when {{(vec)->elems == NULL}}.  This causes {{memcpy}} to be called with a NULL 2nd argument.  Note this is only a minor issue as the 3rd argument is always 0 when the 2nd argument is NULL, so memcpy won't crash.

> [UBSAN] vector.h: null pointer can be passed as argument 2 to memcpy
> --------------------------------------------------------------------
>
>                 Key: ASTERISK-26526
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-26526
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Core/AstMM
>    Affects Versions: 13.12.1, 14.1.1, GIT
>            Reporter: Badalian Vyacheslav
>            Assignee: Corey Farrell
>            Severity: Minor
>
> asterisk 13 git branch
> {code}
> [Oct 30 11:53:23] WARNING[911]: asterisk:243 errReceived: Asterisk 127.0.0.1 received error: cli.c:2786:77: runtime error: null pointer passed as argument 2, which is declared to never be null
> {code}



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



More information about the asterisk-bugs mailing list