Not enough space for the new segment in the file header

Hello,

I use the VMProtect demo (v3.2) to test before I buy.

With an exe, then a dll, everything works ! :slight_smile:

But I encounter an error with a WinDDK driver : “Not enough space for the new segment in the file header”.

The error persists even if I change the “DRIVER_ALIGNMENT” value in the sources before recompiling (= 0x1200).

This is my current setup :

Memory Protection : Yes
Import Protection : Yes
Debugger : User-mode + Kernel-mode
Virtualization Tools : No
Strip Debug Information : Yes
Key Pair Algorithm : RSA 4096

Do you have any idea, please ?

Thank you

The error persists even if I change the “DRIVER_ALIGNMENT” value in the sources before recompiling (= 0x1200).

why you change this from 0x1000 to 0x1200 what reason?

also I think you should use your protection based on hwid inside not use VMP for drivers.

anyway just my opinion, admin is one that solve problems here.

Hello ovid,

why you change this from 0x1000 to 0x1200 what reason?

Only for test :wink:

also I think you should use your protection based on hwid inside not use VMP for drivers.

Why please ?

Thank you

Have same issue(not enough space for the new segment in the file header) when trying to protect linux so in ultimate windows version(spirt****@pm.me) and with linux x64 trial too

file example: share.riseup.net (cannot attach here cuz “Invalid file extension: libLLVM-3.9.so”)

Does VMP 3.2 support elf64 so shared libs?

VMProtect supports elf64 binaries.

Nice, but what should i do with this compilation error? Where is the root? May be i should use another gcc flags? Will this error fixed?

Do you use our SDK?

No i dont, should i?
I’m trying to protect free as in freedom binary(GitHub - LWSS/Fuzion: Fuzion is a free-as-in-freedom CSGO cheat for linux · GitHub)

In this case there is not enough free space in the file header.

Yes, but is there way for protection this project? After ur question I’ve tried to include vmprotectsdk.h and set up markers for some functions, but result is the same.

You can use the following trick with SDK name: “./././././././././././././libVMProtectSDK.so” (many many /./.). This string is placed in the file header and after protection the place of this string will be used for creation of a new segment(s).

how to perform it? could u provide an example?

Try this:
gcc -L././././././././././

set(CMAKE_SHARED_LINKER_FLAGS “${CMAKE_SHARED_LINKER_FLAGS} -L ./././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././src/libVMProtectSDK64.so”)
didnt work

Please read help about “-L” more carefully.

yeah, sorry for whong -L usage, but i still cannot fix this issue

Try add -headerpad 0x500 for ld:
http://www.vmpsoft.com/forumhttps://forum.vmpsoft.com/viewtopic.php?f=2&t=5008#p10521

The GNU linker(ld) hasnt -headerpad flag(or same): https://linux.die.net/man/1/ld
lld(llvm linker), too. Mac OS using own linker also called “ld” with another flags: ld(1) osx man page | unix.com (and only it has headerpad)

Could you send us a test example (original binary) that shows your problem?

Yes, here is the example: https://0x0.st/s3Pf.so