cloudwu / pbc

A protocol buffers library for C
MIT License
1.62k stars 567 forks source link

Segmentation fault in _pbcB_register_fields () #121

Open EnchantedJohn opened 6 years ago

EnchantedJohn commented 6 years ago

Hello.I use my company tool.I found two Segmentation Fault.There is Second one.Then I want to provide more information.I hope will hope your guys.

EnchantedJohn commented 6 years ago

there is GDB information:

Program received signal SIGSEGV, Segmentation fault.
0x0000000000403d58 in _pbcB_register_fields ()
(gdb) bt
#0  0x0000000000403d58 in _pbcB_register_fields ()
#1  0x0000000000401c42 in pbc_register ()
#2  0x0000000000400ff5 in test_decode ()
#3  0x0000000000400bed in main ()
(gdb) i r
rax            0x0  0
rbx            0x8  8
rcx            0x6138f8 6371576
rdx            0x0  0
rsi            0x616db4 6385076
rdi            0x60b1e0 6336992
rbp            0x6138e0 0x6138e0
rsp            0x7fffffffe000   0x7fffffffe000
r8             0x0  0
r9             0x10 16
r10            0xfffffffffffff7bb   -2117
r11            0x7ffff7b9bb01   140737349532417
r12            0xe  14
r13            0x7fffffffe0d0   140737488347344
r14            0x7fffffffe010   140737488347152
r15            0x60d010 6344720
rip            0x403d58 0x403d58 <_pbcB_register_fields+200>
eflags         0x10206  [ PF IF RF ]
cs             0x33 51
ss             0x2b 43
ds             0x0  0
es             0x0  0
fs             0x0  0
gs             0x0  0
(gdb) x/10i $pc
=> 0x403d58 <_pbcB_register_fields+200>:    mov    0x10(%rax),%rdi
   0x403d5c <_pbcB_register_fields+204>:    mov    %rcx,%rdx
   0x403d5f <_pbcB_register_fields+207>:    mov    %rcx,0x8(%rsp)
   0x403d64 <_pbcB_register_fields+212>:    callq  0x402750 <_pbcM_si_query>
   0x403d69 <_pbcB_register_fields+217>:    test   %eax,%eax
   0x403d6b <_pbcB_register_fields+219>:    jns    0x403d80 <_pbcB_register_fields+240>
   0x403d6d <_pbcB_register_fields+221>:    mov    0x28(%rbp),%rax
   0x403d71 <_pbcB_register_fields+225>:    mov    0x8(%rsp),%rcx
   0x403d76 <_pbcB_register_fields+230>:    jmp    0x403d0a <_pbcB_register_fields+122>
   0x403d78 <_pbcB_register_fields+232>:    nopl   0x0(%rax,%rax,1)
(gdb)
NicoleG25 commented 4 years ago

Assigned CVE-2018-12918