Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.kernel > #63990

Bug#928362: Enable some kernel hardening by default

Path csiph.com!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod
From "john.pseudonym1" <john.pseudonym1@protonmail.com>
Newsgroups linux.debian.bugs.dist, linux.debian.kernel
Subject Bug#928362: Enable some kernel hardening by default
Date Thu, 02 May 2019 23:40:02 +0200
Message-ID <xTrAS-6Li-13@gated-at.bofh.it> (permalink)
X-Mailbox-Line From debian-bugs-dist-request@lists.debian.org Thu May 2 21:36:09 2019
Old-Return-Path <debbugs@buxtehude.debian.org>
X-Spam-Flag NO
X-Spam-Score -3.551
Reply-To "john.pseudonym1" <john.pseudonym1@protonmail.com>, 928362@bugs.debian.org
Resent-To debian-bugs-dist@lists.debian.org
Resent-Cc Debian Kernel Team <debian-kernel@lists.debian.org>
X-Debian-Pr-Message report 928362
X-Debian-Pr-Package linux-image-amd64
X-Debian-Pr-Source linux-latest, linux-latest-2.6
X-Spam-Bayes score:0.0000 Tokens: new, 29; hammy, 133; neutral, 61; spammy, 6. spammytokens:0.969-+--1, 0.951-+--H*r:bugs.debian.org, 0.936-+--benefits, 0.918-+--effectiveness, 0.918-+--offer hammytokens:0.000-+--systemdlogind, 0.000-+--systemd-logind, 0.000-+--sysctl, 0.000-+--Severity, 0.000-+--H*r:185.70.40
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=default; t=1556832778; bh=GgogvzAUVSh34M3BOmPM9q+c9aBU4U40SzW+pIa8T8A=; h=Date:To:From:Reply-To:Subject:Feedback-ID:From; b=MntPfMnIfaxZe/HrKX7ebEG9XdOco7izjWK12yAT8emtYdClq4o1bsGTHRca+aum0 /n3M+nOJJ8w2W1n8R90ZOnGSVpCJx46TYiFtkxcr6ZuDB11dzQwTk/gFYsDXKf6vjA 3OQUTu0Y/8zY+Wgz5eHFe19BCaEmEBrVdn819Qik=
Feedback-ID 6jcocjFrCovBgYGFO8Xgi-_AY_U5lXcnBJHGvOFgE1Pt1QaUj72qG3Mq6VFMUHUx5CJM4qfw8sj9w8KNayubMg==:Ext:ProtonMail
MIME-Version 1.0
Content-Type multipart/alternative; boundary="b1_c08f5fc26c0d0e3575fc4b40cd4bc8d0"
X-Debian-Message from BTS
X-Mailing-List <debian-bugs-dist@lists.debian.org> archive/latest/1535901
List-ID <debian-bugs-dist.lists.debian.org>
List-URL <https://lists.debian.org/debian-bugs-dist/>
Approved robomod@news.nic.it
Lines 85
Organization linux.* mail to news gateway
Sender robomod@news.nic.it
X-Original-Date Thu, 02 May 2019 21:32:52 +0000
X-Original-Message-ID <dFd3xkEUeOyHc7ymfHW3vbkKRCkI5igdQZudNN8Urf-b_vfBojROTCHI79kbNs3qvjHLBC7Kq_qsgepJua92RZwodO__h_W9xwDtaY1FeB0=@protonmail.com>
Xref csiph.com linux.debian.bugs.dist:956884 linux.debian.kernel:63990

Cross-posted to 2 groups.

Show key headers only | View raw


[Multipart message — attachments visible in raw view] - view raw

Package: linux-image-amd64
Version: 4.19+104
Severity: important

Hi,

It would be great if Debian included some kernel hardening by default. These settings would offer great security benefits and no or very minimal performance decrease.

Setting “kernel.kptr_restrict=1” with sysctl makes kernel symbols in /proc/kallsyms only accessible to root which can make it more difficult for a kernel exploit to resolve addresses/symbols. Setting it to 2 hides the symbols regardless of privileges.

Setting “kernel.dmesg_restrict=1” with sysctl restricts access to the kernel logs which can give an attacker less information on what they can do.

Setting “kernel.unprivileged_bpf_disabled=1” and “net.core.bpf_jit_harden=2” with sysctl hardens the BPF JIT compiler and restricts it to root. It comes with a performance drop on systems that use the JIT compiler a lot but this should only really effect servers.

Setting “vm.mmap_rnd_bits=32” and “vm.mmap_rnd_compat_bits=16” with sysctl improves KASLR effectiveness for mmap. This might break some things but I haven't had anything break on me yet.

Adding “slab_nomerge” as a boot parameter may also be useful. slab_nomerge disables the merging of slabs of similar sizes. Sometimes a slab can be used in a vulnerable way which an attacker can exploit. This may have a slight increase in memory usage.

Mounting /proc with hidepid=2 in /etc/fstab will hide other users’ processes from unprivileged users. This makes it a lot harder for an attacker to get information about other running processes. Some processes (like systemd-logind) will break but you can add exceptions for them.

If Debian could include any of these by default then that would be great.

Best Regards.

Back to linux.debian.kernel | Previous | Next | Find similar | Unroll thread


Thread

Bug#928362: Enable some kernel hardening by default "john.pseudonym1" <john.pseudonym1@protonmail.com> - 2019-05-02 23:40 +0200

csiph-web