Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.1 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8D075C43387 for ; Sat, 12 Jan 2019 08:03:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6117B205F4 for ; Sat, 12 Jan 2019 08:03:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=perfinion-com.20150623.gappssmtp.com header.i=@perfinion-com.20150623.gappssmtp.com header.b="ZiyXxPHH" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725847AbfALID7 (ORCPT ); Sat, 12 Jan 2019 03:03:59 -0500 Received: from mail-pg1-f169.google.com ([209.85.215.169]:36415 "EHLO mail-pg1-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725372AbfALID7 (ORCPT ); Sat, 12 Jan 2019 03:03:59 -0500 Received: by mail-pg1-f169.google.com with SMTP id n2so7300768pgm.3 for ; Sat, 12 Jan 2019 00:03:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=perfinion-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Flkm13/G06ee2Djb0MqJdK4pabMEXqMABwklGrdWNfY=; b=ZiyXxPHHYeZt3nw5C5X6YYQh/UnusvdzD1lB9wzbHWaGdGmWz/C0SYb30ahTK29jlS axGBxwORv3YXOclUOjQaKQGo1XmjW08NLGDmqu6Vqpw9UOFUxko4dTUUEiAIOwNnTWFU tyb0tq8MG0diFkIkG/H9nat3Kv+BY49yc9zFUKc/dufpTi6aKs/6R2KpxyVBmmsla4LC 9iqeUwbSBvk6y05KWkRkJQqTKcVfvMbm99N6n60D76aNHu0NPshvk4kKwTGsdMjcZdBW Hm84MINrpDu9ycHcU4pNbucHkhZLdP4CBdZ52gwifvKkgYneOEPL2ELp/ulj1tUGF8hq 3gKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Flkm13/G06ee2Djb0MqJdK4pabMEXqMABwklGrdWNfY=; b=ILQkOkbCn0AKk32I3Se6yN/erPWHH1jL/Zq6Rk5W932fc/uCcNk5/pBShiUKsPJrP0 jybMiGeKA4otp9DRSmeFo5SExI/g2VWXM2ctfCFkGhBH8ylb2i2QtvHU5mPkiggW0CqH vCAAkQOZPOnj7wB+FAn24lDDhvCYPzjy19Zx7SO67b7XvcipbQoT/c48EjRwelva0pTH gPF+u1GxLUkuWkcIaUNNRIeWoJHqe3yTc8NfGxdMs8YExJZgTzRQrCCU5Px7ceQX+/x+ g4RJiB3KVFc3dDokinsfnZHfM9sIuC0f8/DKiV8QTrm/gJ0L9amrRopOhKvDSoc7gdEh r8iQ== X-Gm-Message-State: AJcUukcBS8+Tr8aoSeJkVk0BvoVw6JgyQZJzrY7nP9fbj3g/e8IHH9Gt Ddjs6FjokQSEDg0nZfRGZbHkC65ysCY= X-Google-Smtp-Source: ALg8bN6IuDmiCt/GSJ7E3f15bmXtIRahtXwdUAmP5wWtfc72SXhQhMcDY0gpFIV64Nc/bguHjdiSaw== X-Received: by 2002:a62:4886:: with SMTP id q6mr18200744pfi.182.1547280237955; Sat, 12 Jan 2019 00:03:57 -0800 (PST) Received: from localhost ([2406:3003:2002:40c2:7952:f8f0:5b6c:6fa3]) by smtp.gmail.com with ESMTPSA id u87sm164301338pfi.2.2019.01.12.00.03.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 12 Jan 2019 00:03:57 -0800 (PST) From: Jason Zaman To: selinux-refpolicy@vger.kernel.org Cc: Jason Zaman Subject: [PATCH 3/5] kernel: introduce kernel_dontaudit_read_kernel_sysctl Date: Sat, 12 Jan 2019 16:03:42 +0800 Message-Id: <20190112080344.10031-3-jason@perfinion.com> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20190112080344.10031-1-jason@perfinion.com> References: <20190112080344.10031-1-jason@perfinion.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: selinux-refpolicy-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: selinux-refpolicy@vger.kernel.org Signed-off-by: Jason Zaman --- policy/modules/kernel/kernel.if | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/policy/modules/kernel/kernel.if b/policy/modules/kernel/kernel.if index 843b26e3..1ad282aa 100644 --- a/policy/modules/kernel/kernel.if +++ b/policy/modules/kernel/kernel.if @@ -2012,6 +2012,24 @@ interface(`kernel_dontaudit_search_kernel_sysctl',` dontaudit $1 sysctl_kernel_t:dir search; ') +####################################### +## +## Do not audit attempted reading of kernel sysctls +## +## +## +## Domain to not audit accesses from +## +## +# +interface(`kernel_dontaudit_read_kernel_sysctl',` + gen_require(` + type sysctl_kernel_t; + ') + + dontaudit $1 sysctl_kernel_t:file read_file_perms; +') + ######################################## ## ## Read generic crypto sysctls. -- 2.19.2