public inbox for development@lists.ipfire.org
 help / color / mirror / Atom feed
From: "Peter Müller" <peter.mueller@ipfire.org>
To: development@lists.ipfire.org
Subject: Re: [PATCH] sysctl: improve KASLR effectiveness for mmap
Date: Thu, 04 Jul 2019 19:28:00 +0000	[thread overview]
Message-ID: <6844e46c-3368-84bc-d116-905c1e883dc6@ipfire.org> (raw)
In-Reply-To: <BB6C185B-2022-4D35-97C6-CB800F08BBB2@ipfire.org>

[-- Attachment #1: Type: text/plain, Size: 1465 bytes --]

Hello Michael,

> Hi,
> 
> LOL. “Effectiveness” of the KASLR. Do we even have this enabled?
Yes. Words failed me here - and 8 Bits do not leave _that_ much possibilities...

Thanks, and best regards,
Peter Müller
> 
> -Michael
> 
>> On 4 Jul 2019, at 20:15, Peter Müller <peter.mueller(a)ipfire.org> wrote:
>>
>> By feeding more random bits into mmap allocation, the
>> effectiveness of KASLR will be improved, making attacks
>> trying to bypass address randomisation more difficult.
>>
>> Changed sysctl values are:
>>
>> vm.mmap_rnd_bits = 32 (default: 28)
>> vm.mmap_rnd_compat_bits = 16 (default: 8)
>>
>> Signed-off-by: Peter Müller <peter.mueller(a)ipfire.org>
>> ---
>> config/etc/sysctl.conf | 4 ++++
>> 1 file changed, 4 insertions(+)
>>
>> diff --git a/config/etc/sysctl.conf b/config/etc/sysctl.conf
>> index 9a943fffa..5a67f1795 100644
>> --- a/config/etc/sysctl.conf
>> +++ b/config/etc/sysctl.conf
>> @@ -45,6 +45,10 @@ kernel.kptr_restrict = 2
>> # Avoid kernel memory address exposures via dmesg.
>> kernel.dmesg_restrict = 1
>>
>> +# Improve KASLR effectiveness for mmap
>> +vm.mmap_rnd_bits = 32
>> +vm.mmap_rnd_compat_bits = 16
>> +
>> # Minimal preemption granularity for CPU-bound tasks:
>> # (default: 1 msec#  (1 + ilog(ncpus)), units: nanoseconds)
>> kernel.sched_min_granularity_ns = 10000000
>> -- 
>> 2.16.4
>>
> 

-- 
The road to Hades is easy to travel.
	-- Bion of Borysthenes

  reply	other threads:[~2019-07-04 19:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-04 19:15 Peter Müller
2019-07-04 19:17 ` Michael Tremer
2019-07-04 19:28   ` Peter Müller [this message]
2019-07-06  9:38 Peter Müller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6844e46c-3368-84bc-d116-905c1e883dc6@ipfire.org \
    --to=peter.mueller@ipfire.org \
    --cc=development@lists.ipfire.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox