Page MenuHomeFreeBSD

sanitizers: Improve FreeBSD ASLR detection
ClosedPublic

Authored by emaste on Jan 18 2022, 10:11 PM.
Tags
None
Referenced Files
F106160374: D33933.id101647.diff
Thu, Dec 26, 9:28 AM
F106129729: D33933.diff
Wed, Dec 25, 9:41 PM
Unknown Object (File)
Wed, Dec 4, 10:05 AM
Unknown Object (File)
Nov 22 2024, 1:22 PM
Unknown Object (File)
Nov 16 2024, 8:31 PM
Unknown Object (File)
Nov 15 2024, 8:05 AM
Unknown Object (File)
Nov 15 2024, 1:53 AM
Unknown Object (File)
Nov 15 2024, 1:47 AM
Subscribers

Details

Summary

The kern.elf64.aslr.pie_enable and kern.elf32.aslr.pie_enable sysctls control the default setting for PIE binary address randomization, but it is possible to enable or disable ASLR on a per-process basis. Use procctl(2) to query whether ASLR is enabled.

(Note that with ASLR enabled but sysctl kern.elf64.aslr.pie_enable=0 a PIE binary will in effect have randomization disabled, and be functional with msan. This is not intended as as a user-facing control though. The user can use proccontrol(1) to disable aslr for the process.)

From LLVM 64de0064f315f57044294879d9ff4eacb454d45b

(review for approval to merge to in-tree copy of contrib/llvm-project)

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable