From patchwork Mon Apr 22 16:43:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Peter_M=C3=BCller?= X-Patchwork-Id: 7752 Return-Path: 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) server-digest SHA384 client-signature ECDSA (secp384r1) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4VNWJy6Lhgz3wvs for ; Mon, 22 Apr 2024 16:43:14 +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 server-signature ECDSA (secp384r1) client-signature ECDSA (secp384r1)) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4VNWJw702Rz13J; Mon, 22 Apr 2024 16:43:12 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4VNWJw4jcFz32v9; Mon, 22 Apr 2024 16:43:12 +0000 (UTC) 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) server-digest SHA384 client-signature ECDSA (secp384r1) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4VNWJt2tRZz32v0 for ; Mon, 22 Apr 2024 16:43:10 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4VNWJr43vYzFV for ; Mon, 22 Apr 2024 16:43:08 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1713804189; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yk6o/2Ra+YPxIRNIKgSIK4+JoPxdeE97arHW5myNzaE=; b=7KnQfgVy6s5ly4sVyvTco28uD8KthOHHHwEFaxkXOmdg3HqST3s3Hz86eMMSFtk9FwTu0D v4KIS3GFe2BkSoAA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1713804189; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yk6o/2Ra+YPxIRNIKgSIK4+JoPxdeE97arHW5myNzaE=; b=YTwdysaNDnqJqNS15rsUCOrM+aoMSzA8G+gTHw/1qjy3vVI8uZrykOdm1r+hVgZfWpvo1d OZ9TgcWlTDz7olE6muYkDQYDxgC+Y0bSlZMvg46A6H4nX45enX5TjVjlAN/62hgr6PZmRj iPA8CbBCv2StH6UM7TtEx0VXBIeEB6DmpI6rwHK1PfkuMJdC2PGw5skBVDCFUf6g9B9H65 FotUzMKZsF1rXy57NRaqyaF1FmVm3DWJJ+BwradqiisB9/91cleohEoG4NzeSo6NEcj6IW qWHTCy2oSNV1uWuiS9b9q/dtP3sx/YDv5k51et0MNw9XDy/onTaSSs0Rb5Y8fA== Message-ID: Date: Mon, 22 Apr 2024 16:43:00 +0000 MIME-Version: 1.0 To: "IPFire: Development" From: =?utf-8?q?Peter_M=C3=BCller?= Subject: [PATCH 1/3] linux: Properly load Landlock module Message-ID-Hash: CRZ5LW6NDYTUZPU3DBJB2THDSSKJDPWJ X-Message-ID-Hash: CRZ5LW6NDYTUZPU3DBJB2THDSSKJDPWJ X-MailFrom: peter.mueller@ipfire.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: IPFire development talk Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Fixes: #13645 Tested-by: Peter Müller Signed-off-by: Peter Müller --- config/kernel/kernel.config.aarch64-ipfire | 2 +- config/kernel/kernel.config.riscv64-ipfire | 2 +- config/kernel/kernel.config.x86_64-ipfire | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/kernel/kernel.config.aarch64-ipfire b/config/kernel/kernel.config.aarch64-ipfire index b85d7add9..af8aae163 100644 --- a/config/kernel/kernel.config.aarch64-ipfire +++ b/config/kernel/kernel.config.aarch64-ipfire @@ -8066,7 +8066,7 @@ CONFIG_INTEGRITY=y # CONFIG_IMA_SECURE_AND_OR_TRUSTED_BOOT is not set # CONFIG_EVM is not set CONFIG_DEFAULT_SECURITY_DAC=y -CONFIG_LSM="lockdown,yama,loadpin,safesetid,integrity,bpf" +CONFIG_LSM="landlock,lockdown,yama,loadpin,safesetid,integrity,bpf" # # Kernel hardening options diff --git a/config/kernel/kernel.config.riscv64-ipfire b/config/kernel/kernel.config.riscv64-ipfire index 2bd39e7de..ca603ad93 100644 --- a/config/kernel/kernel.config.riscv64-ipfire +++ b/config/kernel/kernel.config.riscv64-ipfire @@ -6745,7 +6745,7 @@ CONFIG_INTEGRITY=y # CONFIG_IMA is not set # CONFIG_EVM is not set CONFIG_DEFAULT_SECURITY_DAC=y -CONFIG_LSM="lockdown,yama,loadpin,safesetid,integrity,bpf" +CONFIG_LSM="landlock,lockdown,yama,loadpin,safesetid,integrity,bpf" # # Kernel hardening options diff --git a/config/kernel/kernel.config.x86_64-ipfire b/config/kernel/kernel.config.x86_64-ipfire index 8ce66cb4f..fa943a2bb 100644 --- a/config/kernel/kernel.config.x86_64-ipfire +++ b/config/kernel/kernel.config.x86_64-ipfire @@ -7252,7 +7252,7 @@ CONFIG_INTEGRITY=y # CONFIG_IMA_SECURE_AND_OR_TRUSTED_BOOT is not set # CONFIG_EVM is not set CONFIG_DEFAULT_SECURITY_DAC=y -CONFIG_LSM="lockdown,yama,loadpin,safesetid,integrity,bpf" +CONFIG_LSM="landlock,lockdown,yama,loadpin,safesetid,integrity,bpf" # # Kernel hardening options From patchwork Mon Apr 22 16:43:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Peter_M=C3=BCller?= X-Patchwork-Id: 7753 Return-Path: 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) client-signature ECDSA (secp384r1)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4VNWKR1kzQz3wvs for ; Mon, 22 Apr 2024 16:43:39 +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 server-signature ECDSA (secp384r1) client-signature ECDSA (secp384r1)) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4VNWKQ6mnWzvx; Mon, 22 Apr 2024 16:43:38 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4VNWKQ6J07z32wK; Mon, 22 Apr 2024 16:43:38 +0000 (UTC) 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) client-signature ECDSA (secp384r1)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4VNWKN6vPRz32v0 for ; Mon, 22 Apr 2024 16:43:36 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4VNWKM5Y5szFV for ; Mon, 22 Apr 2024 16:43:35 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1713804216; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=k+ElSTFf0+LuJK4ubwskrkW0yKTY++frGCnsZWo+lcc=; b=1w8Fxop/sUSxoLUw2QR+e2T38qJXDmMWg/7dTJdPYDuRmS5eaiFhRF6Xtwf5MR0JIZqmO7 NoC6A+1AvXF+/eCQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1713804216; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=k+ElSTFf0+LuJK4ubwskrkW0yKTY++frGCnsZWo+lcc=; b=ajPR1dy3g1JA0w1h1SQ/6BHf7a9E2ITKd+yiPURqXemcqQpqg5hlgLNix0T8FsQXehto3+ uwL84iwEwDxPUsBnb6KPKlxe022itXd1To405tEBseTCk5aOPTZWOvlC0HKtUxBm483iwt Jo/3JHB8qn1JrUDrTWej/4OIfAfkxwOfyX5JhCP0i/DFHeUJrgN9hViIQTnJd8NMhy7yck aFtiHSovZ0ECuHNkq0ClzJDQnf8Isvtapx5e+ujf6XR/S88V0WnoXYqnTZ4jhxS2kU3u4L mK9nRrSy8hx+zApeYXXY93G2RZeNc+EowfXEp5cM/x+jkSiaPox8rXujaYx6iw== Message-ID: <0a12ec92-7119-4c7f-aafc-9257cbec1ff8@ipfire.org> Date: Mon, 22 Apr 2024 16:43:00 +0000 MIME-Version: 1.0 Subject: [PATCH 2/3] Revert "suricata: Disable Landlock support" To: development@lists.ipfire.org References: From: =?utf-8?q?Peter_M=C3=BCller?= In-Reply-To: Message-ID-Hash: YDE3YO3JAP762ZNGUSVSOK44GWHCEQKR X-Message-ID-Hash: YDE3YO3JAP762ZNGUSVSOK44GWHCEQKR X-MailFrom: peter.mueller@ipfire.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: IPFire development talk Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: This reverts commit b7da97fd59f010ea8fa7bca845d18e52ca89bc5a. --- config/suricata/suricata.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/suricata/suricata.yaml b/config/suricata/suricata.yaml index 041082b04..b57a1d9d4 100644 --- a/config/suricata/suricata.yaml +++ b/config/suricata/suricata.yaml @@ -768,7 +768,7 @@ security: limit-noproc: true # Use landlock security module under Linux landlock: - enabled: no + enabled: yes directories: write: - /run From patchwork Mon Apr 22 16:44:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Peter_M=C3=BCller?= X-Patchwork-Id: 7754 Return-Path: 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) client-signature ECDSA (secp384r1)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4VNWL50PDNz3wvs for ; Mon, 22 Apr 2024 16:44:13 +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 server-signature ECDSA (secp384r1) client-signature ECDSA (secp384r1)) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4VNWL41DcFzvx; Mon, 22 Apr 2024 16:44:12 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4VNWL40lDsz32wK; Mon, 22 Apr 2024 16:44:12 +0000 (UTC) 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) client-signature ECDSA (secp384r1)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4VNWL23LGgz32t8 for ; Mon, 22 Apr 2024 16:44:10 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4VNWL05hT7zXy for ; Mon, 22 Apr 2024 16:44:08 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1713804249; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WhSuNhQmJDHq4+rzvTRuzkU763856R3E6dCdUZR7KxU=; b=oP5DISxlHM7sResscPd60ndX+1RVq1ll1JRlldlQ9V4s0fXmlVI2UVdLipyk/5WPEd2KZF 7Las1IT3w6coWvBg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1713804249; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WhSuNhQmJDHq4+rzvTRuzkU763856R3E6dCdUZR7KxU=; b=wtXRFBwtgpKL7u0KzhU075aYXjLNUaX1hz4nrMt5EtM189IBSoj15/gM9cKN9RBU+Lt7q4 TVnQRtF167CzBj8hAx5qtkRaZRGrAez3+bZ0ZzeqXSSiWfWHdChNlqGmqkSaSO+RjR/NjB sKapgvQ4JE19dFA5G0/yLo2eKNYtnkyD9ZOwHYL4ba62jB798VsktYgEEg0PMvE35HptZ5 0l/ObQ3lnCQ8NerZLrrK2MFtLjf85o7WHja6sjLd9fjPvb2UaCpBXyFV8aVwaEHChzpEW9 cMPhfOkcomh86LrS0iiBaUzhVJ9JR68gn2ik5fL7MLPRgHdiZrELDe03tlj0fg== Message-ID: <323d35e9-a5ea-4967-8e98-9299aebff868@ipfire.org> Date: Mon, 22 Apr 2024 16:44:00 +0000 MIME-Version: 1.0 Subject: [PATCH 3/3] suricata.yaml: Fix Landlock path settings To: development@lists.ipfire.org References: <0a12ec92-7119-4c7f-aafc-9257cbec1ff8@ipfire.org> From: =?utf-8?q?Peter_M=C3=BCller?= In-Reply-To: <0a12ec92-7119-4c7f-aafc-9257cbec1ff8@ipfire.org> Message-ID-Hash: CQNJ3QWICD3OAIKLZSPYJ2Y32BDGHSZ7 X-Message-ID-Hash: CQNJ3QWICD3OAIKLZSPYJ2Y32BDGHSZ7 X-MailFrom: peter.mueller@ipfire.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: IPFire development talk Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Suricata will complain if it cannot read its own configuration file, hence read-only access to /etc/suricata must be allowed. Since the list applies to directories, rather than files, restricting read access to only /usr/share/misc/magic.mgc is not possible; reading /usr/share/misc must be allowed instead. Fixes: #13645 Tested-by: Peter Müller Signed-off-by: Peter Müller --- config/suricata/suricata.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config/suricata/suricata.yaml b/config/suricata/suricata.yaml index b57a1d9d4..faa1aa71d 100644 --- a/config/suricata/suricata.yaml +++ b/config/suricata/suricata.yaml @@ -775,7 +775,8 @@ security: # /usr and /etc folders are added to read list to allow # file magic to be used. read: - - /usr/share/misc/magic.mgc + - /etc/suricata + - /usr/share/misc - /usr/share/suricata - /var/ipfire/suricata - /var/lib/suricata