VMP Protection causing Segfault

Issues related to VMProtect
Post Reply
brucee
Posts: 7
Joined: Sat Sep 28, 2024 3:09 pm

VMP Protection causing Segfault

Post by brucee »

Out of the blue i started getting segfault whenever i run a version of my program wich i protected with VMP. I was not having this problem before.
If i run my program without protecting it with VMP it works just normal.
I already tried removing all function protections, removing packing, creating a fresh new vmp project, and the crash still happens.

I'm using C++ CMake at ubuntu 20.04.
And protecting it with VMProtect Ultimate v3.9.4


backtrace:

Reading symbols from protected_program...
BFD: /home/protected_program(.rela.dyn): relocation 76 has invalid symbol index 4294967295
BFD: /home/protected_program(.rela.dyn): relocation 77 has invalid symbol index 4294967295
BFD: /home/protected_program(.rela.dyn): relocation 78 has invalid symbol index 4294967295
BFD: /home/protected_program(.rela.dyn): relocation 79 has invalid symbol index 4294967295
(gdb) run
Starting program: /home/protected_program

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7fdd002 in elf_dynamic_do_Rela (skip_ifunc=<optimized out>, lazy=<optimized out>, nrelative=<optimized out>,
relsize=<optimized out>, reladdr=<optimized out>, map=0x7ffff7ffe190) at do-rel.h:147
147 do-rel.h: No such file or directory.
(gdb) bt
#0 0x00007ffff7fdd002 in elf_dynamic_do_Rela (skip_ifunc=<optimized out>, lazy=<optimized out>, nrelative=<optimized out>,
relsize=<optimized out>, reladdr=<optimized out>, map=0x7ffff7ffe190) at do-rel.h:147
#1 _dl_relocate_object (l=l@entry=0x7ffff7ffe190, scope=<optimized out>, reloc_mode=<optimized out>, consider_profiling=<optimized out>,
consider_profiling@entry=0) at dl-reloc.c:255
#2 0x00007ffff7fd353a in dl_main (phdr=<optimized out>, phnum=<optimized out>, user_entry=<optimized out>, auxv=<optimized out>)
at rtld.c:2265
#3 0x00007ffff7febc4b in _dl_sysdep_start (start_argptr=start_argptr@entry=0x7fffffffdb80, dl_main=dl_main@entry=0x7ffff7fd15e0 <dl_main>)
at ../elf/dl-sysdep.c:252
#4 0x00007ffff7fd104c in _dl_start_final (arg=0x7fffffffdb80) at rtld.c:449
#5 _dl_start (arg=0x7fffffffdb80) at rtld.c:539
#6 0x00007ffff7fd0108 in _start () from /lib64/ld-linux-x86-64.so.2
#7 0x0000000000000001 in ?? ()
#8 0x00007fffffffde61 in ?? ()
#9 0x0000000000000000 in ?? ()
Last edited by brucee on Fri Aug 08, 2025 8:06 am, edited 1 time in total.
Admin
Site Admin
Posts: 2729
Joined: Mon Aug 21, 2006 8:19 pm
Location: Russia, E-burg
Contact:

Re: VMP Protection causing Segfault

Post by Admin »

Please try the latest version of VMProtect:
https://vmpsoft.com/uploads/VMProtectDemo.tar.gz
brucee
Posts: 7
Joined: Sat Sep 28, 2024 3:09 pm

Re: VMP Protection causing Segfault

Post by brucee »

Same problem with demo version, i have no idea of what to do anymore
Admin
Site Admin
Posts: 2729
Joined: Mon Aug 21, 2006 8:19 pm
Location: Russia, E-burg
Contact:

Re: VMP Protection causing Segfault

Post by Admin »

Please send us a test example (original binary + VMP files) that shows your problem.
brucee
Posts: 7
Joined: Sat Sep 28, 2024 3:09 pm

Re: VMP Protection causing Segfault

Post by brucee »

Never mind, after EXTENSIVE testing I found that the issue was caused by a specific .cpp file I was linking.
It was using static Hyperscan + static PCRE, and apparently the TLS/relocations generated by these libraries were fine normally, but after protecting the binary with VMProtect they were always getting corrupted.. Causing the program to crash before main function even gets called.
After replacing Hyperscan + PCRE with an equivalent, the problem disappeared completely.
Admin
Site Admin
Posts: 2729
Joined: Mon Aug 21, 2006 8:19 pm
Location: Russia, E-burg
Contact:

Re: VMP Protection causing Segfault

Post by Admin »

Please send us a test example (original binary + VMP files) that shows your problem.
Post Reply