DynamoRIO / DynamoRIO/dynamorio

CRASH: seg fault during initialization with the private loader

Open
#539 8 comments 0 reactions 0 assignees View on GitHub
Migrated OpSys-Linux Priority-Medium
Dominant language
C
Stars
3.2k
Forks
629
Avg merge
2d 15h
Merged PRs (30d)
31

Description

_From [netfo...@google.com](https://code.google.com/u/114002107187779063565/) on August 17, 2011 13:20:03_

For several proprietary apps, with the private loader,
DR gets SIGSEGV signal while it's initializing vm areas.
It doesn't happen with -no_private_loader option. I have
tested a few non-proprietary programs, but couldn't find
one that shows similar behavior. I'll add it if I can
find one later.

The callstack, register, and disassemble information is
as follows. I obfuscated some paths.

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff70eae16 in _IO_vfscanf_internal () from /-/lib64/libc.so.6
(gdb) bt
#0 0x00007ffff70eae16 in _IO_vfscanf_internal () from /-/lib64/libc.so.6
#1 0x00007ffff7103d35 in vsscanf () from /-/lib64/libc.so.6
#2 0x00000000711e4371 in our_sscanf (str=0x7158c120 "00400000-00605000 r-xp 00000000 fc:01 18875407", ' ' , "/-/tool",
fmt=0x7131dbe0 "%016lx-%016lx %s %016lx %*s %lu %4096s") at /-/dynamorio/core/io.c:657
#3 0x000000007128c640 in maps_iterator_next (iter=0x7fffffffd620) at /-/dynamorio/core/linux/os.c:6554
#4 0x000000007128dd21 in find_executable_vm_areas () at /-/dynamorio/core/linux/os.c:7307
#5 0x00000000711a8359 in vm_areas_init () at /-/dynamorio/core/vmareas.c:1615
#6 0x0000000071082926 in dynamorio_app_init () at /-/dynamorio/core/dynamo.c:582
#7 0x00007ffff7bd3b02 in _init () at /-/dynamorio/core/linux/preload.c:186

(gdb) info reg
rax 0xffffffffffffef60 -4256
rbx 0x7fffffffd370 140737488343920
rcx 0x7fffffffd4a0 140737488344224
rdx 0x7fffffffd4a0 140737488344224
rsi 0x7131dbe0 1899092960
rdi 0x7fffffffd370 140737488343920
rbp 0x7fffffffd360 0x7fffffffd360
rsp 0x7fffffffcfd0 0x7fffffffcfd0 r8 0x0 0 r9 0x7fffffffd638 140737488344632 r10 0x7158c120 1901642016 r11 0x246 582 r12 0x7131dbe0 1899092960 r13 0x7158c120 1901642016 r14 0x7fffffffdd38 140737488346424 r15 0x2 2
rip 0x7ffff70eae16 0x7ffff70eae16 <_IO_vfscanf_internal+54>
eflags 0x10202 [ IF RF ]
cs 0x33 51
ss 0x2b 43
ds 0x0 0
es 0x0 0
fs 0x63 99
gs 0x6b 107

(gdb) disas _IO_vfscanf_internal
Dump of assembler code for function _IO_vfscanf_internal:
0x00007ffff70eade0 <+0>: push %rbp
0x00007ffff70eade1 <+1>: mov %rsp,%rbp
0x00007ffff70eade4 <+4>: push % r15 0x00007ffff70eade6 <+6>: push % r14 0x00007ffff70eade8 <+8>: push % r13 0x00007ffff70eadea <+10>: push % r12 0x00007ffff70eadec <+12>: mov %rsi,% r12 0x00007ffff70eadef <+15>: push %rbx
0x00007ffff70eadf0 <+16>: mov %rdi,%rbx
0x00007ffff70eadf3 <+19>: sub $0x368,%rsp
0x00007ffff70eadfa <+26>: mov 0x32d157(%rip),%rax # 0x7ffff7417f58
0x00007ffff70eae01 <+33>: mov %rdx,-0x2b0(%rbp)
0x00007ffff70eae08 <+40>: mov %rcx,-0x2e8(%rbp)
0x00007ffff70eae0f <+47>: mov -0x2b0(%rbp),%rcx
=> 0x00007ffff70eae16 <+54>: mov %fs:(%rax),%rax

Thank you.

_Original issue: http://code.google.com/p/dynamorio/issues/detail?id=539_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.