how to set pie_base to randomize

Alain De Vos

Daemon

Reaction score: 545
Messages: 1,888

sysctl.conf
Code:
#adres map randomization
kern.elf32.aslr.pie_enable=1
kern.elf32.aslr.enable=1
kern.elf64.aslr.pie_enable=1
kern.elf64.aslr.enable=1

I don't know the status of it related to zfs or firefox.
 
OP
R

Raffeale

Active Member

Reaction score: 34
Messages: 216

This is ASLR address, I mean that I want to change pie base address to be randomize.
 
OP
R

Raffeale

Active Member

Reaction score: 34
Messages: 216

What i found was : gcc -fpie -pie. (use correct case)
This is compile parameters, it can't change pie base address, I have to change it with sysctl kern.elf64.pie_base to change it. It is not convenient.
 

Alain De Vos

Daemon

Reaction score: 545
Messages: 1,888

Lets be reasonable.
There is an address.
Someone has to decide.
Or the compiler, so you give a flag.
Or the O.S. , and there is not much choise for telling the O.S. what to do.
 
OP
R

Raffeale

Active Member

Reaction score: 34
Messages: 216

I think the pie base is program load address, it's a base address, that mean the program could be loaded by this address, if the program is compiled with pie, that means the programs could be loaded any address I think. Is it right? If this is right, I want to the pie base address changed automatically every time when a program is loading. that's I want it.
 
OP
R

Raffeale

Active Member

Reaction score: 34
Messages: 216

yes ,i know that make program load random address .
does the alsr is base on pie_base address to load a program?
i have just checked the libc.so is random address in freebsd 13.
 
Top