| Message ID | 20261112140526.3332669-1-antonio@mandelbit.com |
|---|---|
| State | New |
| Headers |
Return-Path: <development+bounces-3159-patchwork=ipfire.org@lists.ipfire.org> Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (secp384r1 raw public key) server-digest SHA384 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mail01.haj.ipfire.org", Issuer "YR1" (not verified)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4jQMc13Trqz3wbB for <patchwork@web04.haj.ipfire.org>; Thu, 12 Nov 2026 14:05:37 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (Client CN "mail02.haj.ipfire.org", Issuer "YE2" (not verified)) by mail01.ipfire.org (Postfix) with ESMTPS id 4jQMc05gLgz6VV for <patchwork@ipfire.org>; Thu, 12 Nov 2026 14:05:36 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [IPv6:::1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4jQMc04rVVz2yJG for <patchwork@ipfire.org>; Thu, 12 Nov 2026 14:05:36 +0000 (UTC) X-Original-To: development@lists.ipfire.org Received: from mail01.ipfire.org (mail01.haj.ipfire.org [IPv6:2001:678:b28::25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (secp384r1 raw public key) server-digest SHA384 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mail01.haj.ipfire.org", Issuer "YR1" (not verified)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4jQMby0k4Mz2xKx for <development@lists.ipfire.org>; Thu, 12 Nov 2026 14:05:34 +0000 (UTC) Received: from mout-b-107.mailbox.org (mout-b-107.mailbox.org [IPv6:2001:67c:2050:102:465::107]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (4096 bit raw public key) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "*.mailbox.org", Issuer "Thawte TLS RSA CA G1" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4jQMbw1187z2V for <development@lists.ipfire.org>; Thu, 12 Nov 2026 14:05:32 +0000 (UTC) Authentication-Results: mail01.ipfire.org; dkim=pass header.d=mandelbit.com header.s=MBO0001 header.b=KTX9pYUc; spf=pass (mail01.ipfire.org: domain of antonio@mandelbit.com designates 2001:67c:2050:102:465::107 as permitted sender) smtp.mailfrom=antonio@mandelbit.com; dmarc=none ARC-Seal: i=1; a=rsa-sha256; d=lists.ipfire.org; s=202003rsa; cv=none; t=1794492332; b=vRTJrwJqvvnVJJecBat+1Wk++ykkW0Qfmzg2eRtS0tT7+kdDUQaVAyZbkxNGM3h30mgSNo DEisNV0ulf4I7hVS/ai0ESzCeBOKzges+4k0dB14KcTzNQsEUbhYwwzGhj6ZZLcsPNBwcg pvenJ4XfsvK/ae0x/7uvnPZMIdUqATve8wU3M397uecl5u8rF/ly/laPI956Hl5pkA+bk+ lIXlK8YoJ+Xgv+EPA/U2ZQK4KhVOIyzrIcivCnHTdlX6mB3eV2LaOtqsk6PrgFSYdXHjLV nYSaVv2Bd2f1rdRPXxzkCp5VmozUiezNrd9/eHlHaHrK+QUJvj9U41vCF7Nh8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=lists.ipfire.org; s=202003rsa; t=1794492332; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:dkim-signature; bh=A67ApwO9g4BQbIuYi5qN+EWbvAWvaVH0117Qovu3OeA=; b=LcDVG60/Y1GPMPRmLJInJO6KROZOKQXyLQm4SSIPsPfH9XCKUSEY+2QbJ+lyorWs00cLm5 EgieTF3BlzL6fciIQip2g5VxxR5MVm3kyhCUAR1PqjhioLJ4a/QfoBNrQid1PoZx/UZboq 86UhG6m9IBUHglEOHVAa0jGdYVCYD5tdoA2LMpJqKTktibj+73gHuOZp2hiDBmUjlW+rA/ dspultlchaXq5kZHeL08cLeq7Oy/QZ1f4OaUjjD3NLO3ZUVw4xJPNLrJpr6xmc+MjACDuI LMydnhYipQFOG51b5ag5nyVgsnOa09pgThqdiJ5TDj8pjhqQWdTxwZ8vKJZyQA== ARC-Authentication-Results: i=1; mail01.ipfire.org; dkim=pass header.d=mandelbit.com header.s=MBO0001 header.b=KTX9pYUc; spf=pass (mail01.ipfire.org: domain of antonio@mandelbit.com designates 2001:67c:2050:102:465::107 as permitted sender) smtp.mailfrom=antonio@mandelbit.com; dmarc=none Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:b231:465::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519MLKEM768 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-b-107.mailbox.org (Postfix) with ESMTPS id 4jQMbt0z0pz3y7D; Thu, 12 Nov 2026 15:05:30 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mandelbit.com; s=MBO0001; t=1794492330; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=A67ApwO9g4BQbIuYi5qN+EWbvAWvaVH0117Qovu3OeA=; b=KTX9pYUcDum0bzu1uRE6nD2KLGSF+zJtIX/JWlYu1Y8YOpa+BTtRgGUsW0B4JcxjJ+F7Gs V/JPJqmne+UEnJNI1fZBnOVyyL/n4AXHbi7p05qa14IY/vv6d6rkyOHTlR0+s/YZjcTWSc WK4lcDB2TBkxKE/BqSdi7UV/LBMDXA0zSt/l4I+PxRqWHLHXy1bSovOGpQEhRFJWOFOQVr uvhLKVr09s+GCyH03kt2R0+OqkYOYuy2kKu3aqNQnUu1Dfwp7NKWt1HQrCNwRoDcvfI2XW RR6kO7qPcH9jlfMWtWs/tYQ3HQpxGad69epdILtGsI6aSiMODhQDiEO6udw1Mw== From: Antonio Quartulli <antonio@mandelbit.com> To: development@lists.ipfire.org Cc: Antonio Quartulli <antonio@mandelbit.com> Subject: [PATCH] mountkernfs: Mount securityfs Date: Thu, 12 Nov 2026 15:05:26 +0100 Message-ID: <20261112140526.3332669-1-antonio@mandelbit.com> X-Mailer: git-send-email 2.56.0 Precedence: list List-Id: <development.lists.ipfire.org> List-Subscribe: <https://lists.ipfire.org/>, <mailto:development+subscribe@lists.ipfire.org?subject=subscribe> List-Unsubscribe: <https://lists.ipfire.org/>, <mailto:development+unsubscribe@lists.ipfire.org?subject=unsubscribe> List-Post: <mailto:development@lists.ipfire.org> List-Help: <mailto:development+help@lists.ipfire.org?subject=help> Sender: <development@lists.ipfire.org> Mail-Followup-To: <development@lists.ipfire.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spamd-Result: default: False [-8.23 / 11.00]; NEURAL_HAM(-3.00)[-1.000]; BAYES_HAM(-3.00)[100.00%]; R_DKIM_ALLOW(-1.47)[mandelbit.com:s=MBO0001]; MID_CONTAINS_FROM(1.00)[]; SPF_REPUTATION_HAM(-0.83)[-0.8341809689909]; DKIM_REPUTATION(-0.83)[-0.8341809689909]; R_MISSING_CHARSET(0.50)[]; R_SPF_ALLOW(-0.20)[+ip6:2001:67c:2050::/48]; R_DKIM_ALIGNED(-0.10)[strict]; RCVD_IN_DNSWL_LOW(-0.10)[2001:67c:2050:b231:465::2:received]; MX_GOOD(-0.10)[mxext3.mailbox.org]; MIME_GOOD(-0.10)[text/plain]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_NA(0.00)[mandelbit.com]; IP_REPUTATION_HAM(0.00)[asn: 199118(-0.34), country: DE(-0.01), ip: 2001:67c:2050:102::(0.00)]; DKIM_TRACE(0.00)[mandelbit.com:+]; ARC_SIGNED(0.00)[lists.ipfire.org:s=202003rsa:i=1]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_COUNT_ONE(0.00)[1]; ASN(0.00)[asn:199118, ipnet:2001:67c:2050::/48, country:DE]; FROM_HAS_DN(0.00)[] X-Rspamd-Server: mail01.haj.ipfire.org X-Rspamd-Queue-Id: 4jQMbw1187z2V X-Rspamd-Action: no action |
| Series |
mountkernfs: Mount securityfs
|
|
Commit Message
Antonio Quartulli
12 Nov 2026, 2:05 p.m. UTC
Without securityfs, /sys/kernel/security/lsm and the lockdown state are
not available, so there is no easy way to check which security modules
(e.g. Landlock) are active. This led to the wrong conclusion in #13782
that Landlock is not initialised.
Signed-off-by: Antonio Quartulli <antonio@mandelbit.com>
---
Notes:
- /etc/rc.d/init.d/mountkernfs needs to be shipped with the next Core
Update; I left the filelists to you.
- Landlock itself works: on Core 189 and 205 a Landlock-restricted
process gets EACCES, /sys/kernel/security/lsm lists landlock, and
Suricata is confined (a rule reload of a yaml outside its sandbox
fails with "Permission denied"). Details are in #13782.
src/initscripts/system/mountkernfs | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/initscripts/system/mountkernfs b/src/initscripts/system/mountkernfs index b660083ec..73e9ad03b 100644 --- a/src/initscripts/system/mountkernfs +++ b/src/initscripts/system/mountkernfs @@ -51,6 +51,11 @@ case "${1}" in mount -t efivarfs efivarfs /sys/firmware/efi/efivars || failed=1 fi + if ! mountpoint /sys/kernel/security &>/dev/null && [ -d "/sys/kernel/security" ]; then + boot_mesg -n " /sys/kernel/security" ${NORMAL} + mount -n -t securityfs -o nosuid,nodev,noexec securityfs /sys/kernel/security || failed=1 + fi + # create folder for dhcpcd changeroot mkdir -p /run/dhcpcd/chroot chown dhcpcd:dhcpcd /run/dhcpcd/chroot