# Paxtest: No Main executable randomization

## tomas_m

Hi,

I'm using the the grsecurity-patched kernel.

My current kernel:

```
4.8.17-hardened-r2
```

My profile

```
 [14]  hardened/linux/amd64 *
```

When I run paxtest, this is the result:

```
Test results:

/usr/bin/paxtest: line 69: /usr/lib64/paxtest/x86_64-pc-linux-gnu-gcc: No such file or directory

Executable anonymous mapping             : Killed

Executable bss                           : Killed

Executable data                          : Killed

Executable heap                          : Killed

Executable stack                         : Killed

Executable shared library bss            : Killed

Executable shared library data           : Killed

Executable anonymous mapping (mprotect)  : Killed

Executable bss (mprotect)                : Killed

Executable data (mprotect)               : Killed

Executable heap (mprotect)               : Killed

Executable stack (mprotect)              : Killed

Executable shared library bss (mprotect) : Killed

Executable shared library data (mprotect): Killed

Writable text segments                   : Killed

Anonymous mapping randomization test     : 28 quality bits (guessed)

Heap randomization test (ET_EXEC)        : 22 quality bits (guessed)

Heap randomization test (PIE)            : 35 quality bits (guessed)

Main executable randomization (ET_EXEC)  : No randomization

Main executable randomization (PIE)      : 27 quality bits (guessed)

Shared library randomization test        : 28 quality bits (guessed)

VDSO randomization test                  : 28 quality bits (guessed)

Stack randomization test (SEGMEXEC)      : 35 quality bits (guessed)

Stack randomization test (PAGEEXEC)      : 35 quality bits (guessed)

Arg/env randomization test (SEGMEXEC)    : 39 quality bits (guessed)

Arg/env randomization test (PAGEEXEC)    : 39 quality bits (guessed)

Offset to library randomisation (ET_EXEC): 28 quality bits (guessed)

Offset to library randomisation (ET_DYN) : 27 quality bits (guessed)

Randomization under memory exhaustion @~0: 28 bits (guessed)

Randomization under memory exhaustion @0 : 28 bits (guessed)

Return to function (strcpy)              : paxtest: return address contains a NULL byte.

Return to function (memcpy)              : Vulnerable

Return to function (strcpy, PIE)         : paxtest: return address contains a NULL byte.

Return to function (memcpy, PIE)         : Vulnerable

```

From what I understand, Return to function (memcpy): Vulnerable is expected.

But what about 

```
Main executable randomization (ET_EXEC)  : No randomization
```

I could swear I had randomization on previous installs.

----------

## spidark

Hi tomas_m

Could it be possible that your missing a file

```
Test results:

/usr/bin/paxtest: line 69: /usr/lib64/paxtest/x86_64-pc-linux-gnu-gcc: No such file or directory 
```

```
/usr/lib64/paxtest/randmain1

Main executable randomization (ET_EXEC)  : 27 quality bits (guessed)
```

```
for i in x86_64-pc-linux-gnu-gcc anonmap execbss execdata execheap execstack shlibbss shlibdata mprotanon mprotbss mprotdata mprotheap mprotstack mprotshbss mprotshdata writetext randamap randheap1 randheap2 randmain1 randmain2 randshlib randvdso randstack1 randstack2 randarg1 randarg2 randshlibdelta1 randshlibdelta2 randexhaust1 randexhaust2 rettofunc1 rettofunc2 rettofunc1x rettofunc2x

do

        /usr/lib64/paxtest/$i || echo

done 2>&1 | tee -a $LOG

```

```
/usr/lib64/paxtest/randmain1

Main executable randomization (ET_EXEC)  : 27 quality bits (guessed)
```

----------

