bugThe oSIP library - Bugs: bug #54227, Null pointer access

 
 

bug #54227: Null pointer access

Submitter:  fei <lxxxxfdh>
Submitted:  Mon 02 Jul 2018 09:16:04 AM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Invalid
Privacy:  Public Assigned to:  aymeric
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 18 Mar 2019 01:36:34 PM UTC, comment #1: 

Hi,

Sorry for the delay. I haven't received the bug notification...

In your driver.c file, you are missing the init of the osipparser2 API which is mandatory:


    parser_init ();

Also, the file you have attached seems to be 26 length instead of 30?

When adding "parser_init()", there is no segfault. And when parsing with correct size, there is no segfault too.

Closing!
Tks

Aymeric MOIZARD <aymeric>
Group administrator
Mon 02 Jul 2018 09:16:04 AM UTC, original submission:  

Hi, a new bug is found on libosip2-5.0.0

The test driver and test case are attached.

usage:

```
./driver 30 testcase

```


Error information:

```
ASAN:SIGSEGV
=================================================================
==16419==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7fbea2a7805a bp 0x7ffef92462d0 sp 0x7ffef9245a60 T0)
    #0 0x7fbea2a78059  (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x47059)
    #1 0x7fbea2802b84 in __osip_message_is_known_header ../../../src/osipparser2/osip_parser_cfg.c:217
    #2 0x7fbea27f68a1 in osip_message_set__header ../../../src/osipparser2/osip_message_parse.c:407
    #3 0x7fbea27f6fd2 in osip_message_set_multiple_header ../../../src/osipparser2/osip_message_parse.c:481
    #4 0x7fbea27f79e0 in msg_headers_parse ../../../src/osipparser2/osip_message_parse.c:645
    #5 0x7fbea27f8f60 in _osip_message_parse ../../../src/osipparser2/osip_message_parse.c:853
    #6 0x7fbea27f95b5 in osip_message_parse ../../../src/osipparser2/osip_message_parse.c:897
    #7 0x400f0f in main ../../../src/test/driver.c:38
    #8 0x7fbea21f982f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)
    #9 0x400be8 in _start (/home/test/Downloads/libosip2-5.0.0/build/src/test/.libs/lt-driver+0x400be8)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV ??:0 ??
==16419==ABORTING


```

fei <lxxxxfdh>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #44486:  driver.c added by lxxxxfdh (832B - text/x-csrc)
file #44487:  testcase added by lxxxxfdh (26B - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by aymeric (Posted a comment)
  • -email is unavailable- added by lxxxxfdh (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-03-18 aymeric StatusNone Invalid
        Assigned toNone aymeric
        Open/ClosedOpen Closed
    2018-07-02 lxxxxfdh Attached File- Added driver.c, #44486
        Attached File- Added testcase, #44487

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code