cloudwu / pbc

A protocol buffers library for C

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SEGV signal found when running program pbc

fCorleone opened this issue · comments

A SEGV signal occurred when running program pbc:

=================================================================
==31549==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7fa5a7083746 bp 0x7ffff026f650 sp 0x7ffff026edd8 T0)
    #0 0x7fa5a7083745 in strlen (/lib/x86_64-linux-gnu/libc.so.6+0x8b745)
    #1 0x7fa5a740dc0a  (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x4bc0a)
    #2 0x4016b2 in read_file ../test/readfile.h:9
    #3 0x4019f2 in test_des ../test/pbc.c:12
    #4 0x401e3d in main ../test/pbc.c:49
    #5 0x7fa5a701882f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)
    #6 0x401588 in _start (/home/mfc_fuzz/pbc/build/pbc+0x401588)

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

Another SEGV signal has been found when running addressbook program, I did a simple change in addressbook.c, I just give a parameter to main function and I use file descriptor.pb as the input to the new addressbook program. And I found this:

=================================================================
==26308==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x00000041ac59 bp 0x7fffb6982880 sp 0x7fffb69827b0 T0)
    #0 0x41ac58 in pbc_wmessage_string src/wmessage.c:245
    #1 0x4021e1 in test_wmessage ../test/addressbook.c:69
    #2 0x402538 in main ../test/addressbook.c:105
    #3 0x7f0a0622482f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)
    #4 0x401618 in _start (/home/mfc_fuzz/pbc/build/addressbook+0x401618)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV src/wmessage.c:245 pbc_wmessage_string
==26308==ABORTING

I believe there is another SEGV problem , when I was running pbc with the input of float.pb:

=================================================================
==22328==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000008 (pc 0x000000415c70 bp 0x7ffcccdb4b00 sp 0x7ffcccdb4ac0 T0)
    #0 0x415c6f in pbc_rmessage_message src/rmessage.c:418
    #1 0x401b52 in test_des ../test/pbc.c:16
    #2 0x401f25 in main ../test/pbc.c:49
    #3 0x7efed6c7d82f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)
    #4 0x401588 in _start (/home/mfc_fuzz/pbc/build/pbc+0x401588)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV src/rmessage.c:418 pbc_rmessage_message
==22328==ABORTING

Another SEGV problem has been found:

=================================================================
==15225==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000008 (pc 0x000000406e0f bp 0x7ffec150f760 sp 0x7ffec150f740 T0)
    #0 0x406e0e in pbc_pattern_set_default src/pattern.c:65
    #1 0x40239b in test_pattern_pack ../test/pattern.c:82
    #2 0x402bff in main ../test/pattern.c:166
    #3 0x7fe3a26cd82f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)
    #4 0x401678 in _start (/home/mfc_fuzz/pbc/build/pattern+0x401678)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV src/pattern.c:65 pbc_pattern_set_default
==15225==ABORTING

this occurred when I put test.pb into the program pattern. I just changed pattern.c to make it could receive a input file.

Another SEGV problem has been located:

=================================================================
==21638==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000010 (pc 0x000000429f40 bp 0x7ffcbbead460 sp 0x7ffcbbead430 T0)
    #0 0x429f3f in set_field_one src/bootstrap.c:177
    #1 0x42a461 in _pbcB_register_fields src/bootstrap.c:198
    #2 0x41698e in _register src/register.c:246
    #3 0x4170ed in _register_no_dependency src/register.c:296
    #4 0x4176bf in pbc_register src/register.c:329
    #5 0x402b43 in main ../test/pattern.c:145
    #6 0x7fa1de27c82f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)
    #7 0x401678 in _start (/home/mfc_fuzz/pbc/build/pattern+0x401678)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV src/bootstrap.c:177 set_field_one
==21638==ABORTING

I ran the program pattern. I give it a file as input. The input file has been displayed at:
https://github.com/fCorleone/fuzz_programs/blob/master/pbc/testcase09

Another SEGV problem has been located:

=================================================================
==9886==ERROR: AddressSanitizer: SEGV on unknown address 0x003000000010 (pc 0x7f226ac68c02 bp 0x7ffefaf3b610 sp 0x7ffefaf3ad58 T0)
    #0 0x7f226ac68c01  (/usr/lib/x86_64-linux-gnu/libasan.so.2+0xaac01)
    #1 0x7f226ac1e47b  (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x6047b)
    #2 0x7f226ac1e7f7 in __interceptor_vprintf (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x607f7)
    #3 0x7f226ac1e907 in __interceptor_printf (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x60907)
    #4 0x401fb7 in test_pattern_unpack ../test/pattern.c:62
    #5 0x402c33 in main ../test/pattern.c:170
    #6 0x7f226a81482f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)
    #7 0x401678 in _start (/home/mfc_fuzz/pbc/build/pattern+0x401678)

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

I ran the program pattern. I gave it a file as input. The input file has been displayed at:
https://github.com/fCorleone/fuzz_programs/blob/master/pbc/testcase30

Another SEGV problem has been located:

=================================================================
==4058==ERROR: AddressSanitizer: SEGV on unknown address 0x00009e439496 (pc 0x7fc79816771b bp 0x7ffdf220a130 sp 0x7ffdf22098c0 T0)
    #0 0x7fc79816771a in __asan_memcpy (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x8c71a)
    #1 0x42d6d7 in wiretype_decode src/context.c:26
    #2 0x42fec8 in _pbcC_open src/context.c:239
    #3 0x40feb7 in pbc_pattern_unpack src/pattern.c:817
    #4 0x401f9b in test_pattern_unpack ../test/pattern.c:61
    #5 0x402c33 in main ../test/pattern.c:170
    #6 0x7fc797d3182f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)
    #7 0x401678 in _start (/home/mfc_fuzz/pbc/build/pattern+0x401678)

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

I ran the program pattern. I gave it a file as input. The input file has been displayed at:
https://github.com/fCorleone/fuzz_programs/blob/master/pbc/testcase33

Another SEGV problem has been located:

=================================================================
==26609==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000008 (pc 0x00000040f9cb bp 0x7ffe2dabb650 sp 0x7ffe2dabb590 T0)
    #0 0x40f9ca in pbc_pattern_pack src/pattern.c:781
    #1 0x402442 in test_pattern_pack ../test/pattern.c:98
    #2 0x402bff in main ../test/pattern.c:166
    #3 0x7fdcc6df582f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)
    #4 0x401678 in _start (/home/mfc_fuzz/pbc/build/pattern+0x401678)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV src/pattern.c:781 pbc_pattern_pack
==26609==ABORTING

I ran the program pattern. I gave it a file as input. The input file has been displayed at:
https://github.com/fCorleone/fuzz_programs/blob/master/pbc/testcase36

Another SEGV problem has been located:

=================================================================
==18254==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000018 (pc 0x00000042a1f9 bp 0x7ffc2dc8e7d0 sp 0x7ffc2dc8e7a0 T0)
    #0 0x42a1f8 in set_field_one src/bootstrap.c:184
    #1 0x42a461 in _pbcB_register_fields src/bootstrap.c:198
    #2 0x41698e in _register src/register.c:246
    #3 0x4170ed in _register_no_dependency src/register.c:296
    #4 0x4176bf in pbc_register src/register.c:329
    #5 0x402b43 in main ../test/pattern.c:145
    #6 0x7f933ed7c82f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)
    #7 0x401678 in _start (/home/mfc_fuzz/pbc/build/pattern+0x401678)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV src/bootstrap.c:184 set_field_one
==18254==ABORTING

I ran the program pattern. I gave it a file as input. The input file has been displayed at:
https://github.com/fCorleone/fuzz_programs/blob/master/pbc/testcase39