Kernel-hardening archive mirror
 help / color / mirror / Atom feed
From: Peter Gerber <peter@arbtirary.ch>
To: kernel-hardening@lists.openwall.com
Cc: linux-hardening@vger.kernel.org
Subject: Kernel Self Protection Project: slub_debug=ZF
Date: Sun, 10 Apr 2022 21:34:17 +0200	[thread overview]
Message-ID: <6b039403-b46e-e186-63d0-91362dfe18a1@arbtirary.ch> (raw)

Hello,

The Kernel Self Protection Project, on their Recommended Settings [1] 
page, suggests the following:

# Enable SLUB redzoning and sanity checking (slow; requires 
CONFIG_SLUB_DEBUG=y above).
slub_debug=ZF

On recent kernels, I see the following in dmesg when this option is set:

**********************************************************
**   NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE   **
**                                                      **
** This system shows unhashed kernel memory addresses   **
** via the console, logs, and other interfaces. This    **
** might reduce the security of your system.            **
**                                                      **
** If you see this message and you are not debugging    **
** the kernel, report this immediately to your system   **
** administrator!                                       **
**                                                      **
**   NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE   **
**********************************************************

A bit of digging tells me that this is caused by "slub: force on 
no_hash_pointers when slub_debug is enabled" [2]. Assuming the 
performance impact is acceptable, is this option still recommend? Should 
there perhaps be a way to explicitly disable no_hash_pointers (e.g. via 
no_hash_pointers=off)?

Regards,

Peter

[1]: 
https://kernsec.org/wiki/index.php/Kernel_Self_Protection_Project/Recommended_Settings
[2]: 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=792702911f581f7793962fbeb99d5c3a1b28f4c3

             reply	other threads:[~2022-04-10 21:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-10 19:34 Peter Gerber [this message]
2022-04-13  0:16 ` Kernel Self Protection Project: slub_debug=ZF Kees Cook

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=6b039403-b46e-e186-63d0-91362dfe18a1@arbtirary.ch \
    --to=peter@arbtirary.ch \
    --cc=kernel-hardening@lists.openwall.com \
    --cc=linux-hardening@vger.kernel.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).