From patchwork Fri May 20 13:03:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrea Righi X-Patchwork-Id: 1633908 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=QkXetRlq; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4L4RkC6FsZz9sG2 for ; Fri, 20 May 2022 23:03:47 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1ns2I7-0000gx-Pd; Fri, 20 May 2022 13:03:39 +0000 Received: from smtp-relay-internal-0.internal ([10.131.114.225] helo=smtp-relay-internal-0.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1ns2I5-0000gp-RO for kernel-team@lists.ubuntu.com; Fri, 20 May 2022 13:03:37 +0000 Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id 10D513F1B6 for ; Fri, 20 May 2022 13:03:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1653051817; bh=MeuDYW1GgBfmildywVH9JMbKKY9sq5oH9D1nv5QzNsw=; h=Date:From:To:Subject:Message-ID:MIME-Version:Content-Type; b=QkXetRlqeDPCSmezTFqWJxkVC9E7/5T6RWbQLP1zyc0UXMnnK0WWzQeItydqavCRF ui9c6xIKBd2fkPetqMUjoHXdZyHJSXhJ+PJjgkXXcb6Tq7499otM7fK5RAHAqsHZnA VA1yhC4RxWUVf75d9r6jRYlL916u419q8kPVLSKszQR/+ESrk4hixpk53TM6jolLVc Od4Mav2ffd8pw9b6rQoIdwYM9uN9EitBsmodSomBAHXbewpKJBKJXPkOb3VRvuRflx a4EjsbrVK9Wv9E8i6y84WYbDoXH2uN9K0OwN8j5VhEkzB5nX6hns6pNIp03sfcV1t4 5AWAsTxhQE0lw== Received: by mail-ed1-f71.google.com with SMTP id y1-20020a056402170100b0042aa8f679fdso5663219edu.1 for ; Fri, 20 May 2022 06:03:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition; bh=MeuDYW1GgBfmildywVH9JMbKKY9sq5oH9D1nv5QzNsw=; b=zAl3UWZE5jBwj04Mjg11/yHD0VYhgMKnsRpDytX/MV10NQWsjKHnIQD9ouAia+zK5O 0iwfsOmx/CN3w1RehgikAr5Db9P7yQ6p+FZ5KJ/Jd7keBhMCtLeQ42AZRVMLszgxyw8c YvNbcCFz+oYsZ3U/fVEWp0n/RTJq0EQrvYdxkXEE/FvJgc6Io4vWnL649W6RcAJ4+dYl cHAkRuDc8/eRWpshrPElhz4rzOBt6H+f4dC4Ci0Hm6cVH2C0NjlZZTnq18vYRlP5CinE IZODwxykYTqth9henCW/kBZjS3qbLs5G9k15ygTN5l4zLFbuhP0BWqqNfhST+0htaoph xaHQ== X-Gm-Message-State: AOAM533aErnCMLUz6Om6wgsZMLLygIPNSWGOvP8+/Ni1rI+vImEZ8oHi GYfKkk/05Dixj8mbxpkRrzhM8bgD0E1wTQmwI8zXCr7DQf2JNU0GkeZRcsBUAMuRs7VZc60mPfG yfIFXX3+a7KIVkyv/zE1SMKZUdfK6KeEOV6xmuMUHOQ== X-Received: by 2002:a17:907:7781:b0:6fe:4398:47b3 with SMTP id ky1-20020a170907778100b006fe439847b3mr8512237ejc.513.1653051816440; Fri, 20 May 2022 06:03:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx+RbsnZTIwzuU1XUCgKo+N8w7bYlNGxlDwvgT0ycFQYRF0GTvNW2LZtetePo1ZIlyGi4/Ctw== X-Received: by 2002:a17:907:7781:b0:6fe:4398:47b3 with SMTP id ky1-20020a170907778100b006fe439847b3mr8512161ejc.513.1653051815520; Fri, 20 May 2022 06:03:35 -0700 (PDT) Received: from localhost ([2001:67c:1560:8007::aac:c1b6]) by smtp.gmail.com with ESMTPSA id s10-20020a170906778a00b006f3ef214dfesm3163513ejm.100.2022.05.20.06.03.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 May 2022 06:03:35 -0700 (PDT) Date: Fri, 20 May 2022 15:03:33 +0200 From: Andrea Righi To: kernel-team@lists.ubuntu.com Subject: [RFC][K/U][PATCH] UBUNTU: [Config] enable CONFIG_DEVTMPFS_SAFE Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" BugLink: https://bugs.launchpad.net/bugs/1974442 Mount devtmpfs with nosuid,noexec to prevent mmapping special files in /dev with PROT_EXEC or having executables setuid files. This allows to provide a little bit of extra security in the system. This change may potentially break some drivers that require to execute code by mmapping /dev/mem (e.g., non-KSM video drivers). Theoretically we shouldn't break any of the officially supported drivers, because kernel lockdown is already preventing access to /dev/mem. This is just a little more relaxed constraint than kernel lockdown, but it can still provide a reasonable level of extra security in the system also when the kernel is not completely locked down. Signed-off-by: Andrea Righi Acked-by: Thadeu Lima de Souza Cascardo Acked-by: Cengiz Can Acked-by: Cengiz Can --- debian.master/config/annotations | 1 + debian.master/config/config.common.ubuntu | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/debian.master/config/annotations b/debian.master/config/annotations index a0920e0f3fad..5a0e1ea742a8 100644 --- a/debian.master/config/annotations +++ b/debian.master/config/annotations @@ -1970,6 +1970,7 @@ CONFIG_UEVENT_HELPER policy<{'amd64': 'y', 'arm64': ' CONFIG_UEVENT_HELPER_PATH policy<{'amd64': '""', 'arm64': '""', 'armhf': '""', 'ppc64el': '""', 's390x': '""'}> CONFIG_DEVTMPFS policy<{'amd64': 'y', 'arm64': 'y', 'armhf': 'y', 'ppc64el': 'y', 's390x': 'y'}> CONFIG_DEVTMPFS_MOUNT policy<{'amd64': 'y', 'arm64': 'y', 'armhf': 'y', 'ppc64el': 'y', 's390x': 'y'}> +CONFIG_DEVTMPFS_SAFE policy<{'amd64': 'y', 'arm64': 'y', 'armhf': 'y', 'ppc64el': 'y', 's390x': 'y'}> CONFIG_STANDALONE policy<{'amd64': 'n', 'arm64': 'y', 'armhf': 'y', 'ppc64el': 'y', 's390x': 'y'}> CONFIG_PREVENT_FIRMWARE_BUILD policy<{'amd64': 'y', 'arm64': 'y', 'armhf': 'y', 'ppc64el': 'y', 's390x': 'y'}> CONFIG_ALLOW_DEV_COREDUMP policy<{'amd64': 'y', 'arm64': 'y', 'armhf': 'y', 'ppc64el': 'y', 's390x': 'y'}> diff --git a/debian.master/config/config.common.ubuntu b/debian.master/config/config.common.ubuntu index 28b5e855d7da..e6bf6cca79ce 100644 --- a/debian.master/config/config.common.ubuntu +++ b/debian.master/config/config.common.ubuntu @@ -2782,7 +2782,7 @@ CONFIG_DEVMEM=y CONFIG_DEVPORT=y CONFIG_DEVTMPFS=y CONFIG_DEVTMPFS_MOUNT=y -# CONFIG_DEVTMPFS_SAFE is not set +CONFIG_DEVTMPFS_SAFE=y CONFIG_DEV_APPLETALK=m CONFIG_DEV_COREDUMP=y CONFIG_DEV_DAX=m