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.0 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 102BDC43381 for ; Thu, 21 Mar 2019 18:29:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C079E21902 for ; Thu, 21 Mar 2019 18:29:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=tresys.onmicrosoft.com header.i=@tresys.onmicrosoft.com header.b="mkNT/ADf" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728682AbfCUS33 (ORCPT ); Thu, 21 Mar 2019 14:29:29 -0400 Received: from mail-eopbgr820135.outbound.protection.outlook.com ([40.107.82.135]:26496 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728587AbfCUS33 (ORCPT ); Thu, 21 Mar 2019 14:29:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tresys.onmicrosoft.com; s=selector1-tresys-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=cgkHgf6wZQbdtXWqJdwhqlLgk8F5RAk4sv4O5rdaT4w=; b=mkNT/ADfvowtSiFg7NQLm1T3m3mu42z4vy6PQU5bgiJG1KleSM3XUPSbtRYsJ/iBY8WANeo04KKreOEDQGqKVXMw2teS9be4YvaVmRVjC9nQ26zDY7NQMI8H5jRMd6lqgdeDoLiWlCEu915TGfekpLEVlZhOhLrf92sa4Dmy9fg= Received: from BN6PR15MB1507.namprd15.prod.outlook.com (10.172.151.147) by BN6PR15MB1634.namprd15.prod.outlook.com (10.175.127.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1709.14; Thu, 21 Mar 2019 18:29:27 +0000 Received: from BN6PR15MB1507.namprd15.prod.outlook.com ([fe80::ec41:1dc7:5fd4:a07a]) by BN6PR15MB1507.namprd15.prod.outlook.com ([fe80::ec41:1dc7:5fd4:a07a%8]) with mapi id 15.20.1709.015; Thu, 21 Mar 2019 18:29:27 +0000 From: "Sugar, David" To: "selinux-refpolicy@vger.kernel.org" Subject: [PATCH 1/1] Resolve denial about logging to journal from chkpwd Thread-Topic: [PATCH 1/1] Resolve denial about logging to journal from chkpwd Thread-Index: AQHU4BQDcOUuKx2hIkOsDBBZ4reU/A== Date: Thu, 21 Mar 2019 18:29:26 +0000 Message-ID: <20190321182844.27557-1-dsugar@tresys.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [96.244.17.66] x-clientproxiedby: MN2PR16CA0030.namprd16.prod.outlook.com (2603:10b6:208:134::43) To BN6PR15MB1507.namprd15.prod.outlook.com (2603:10b6:404:c6::19) authentication-results: spf=none (sender IP is ) smtp.mailfrom=dsugar@tresys.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.20.1 x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 48c5bf24-c234-42f8-92c8-08d6ae2b25fe x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(7021145)(8989299)(4534185)(7022145)(4603075)(4627221)(201702281549075)(8990200)(7048125)(7024125)(7027125)(7023125)(5600127)(711020)(4605104)(2017052603328)(7153060)(7193020);SRVR:BN6PR15MB1634; x-ms-traffictypediagnostic: BN6PR15MB1634: x-microsoft-antispam-prvs: x-forefront-prvs: 0983EAD6B2 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(136003)(396003)(376002)(366004)(39840400004)(346002)(199004)(189003)(2351001)(106356001)(50226002)(102836004)(4744005)(8936002)(386003)(86362001)(26005)(52116002)(1076003)(2616005)(186003)(14454004)(81166006)(7736002)(53936002)(99286004)(486006)(305945005)(6506007)(6436002)(81156014)(2501003)(256004)(476003)(71190400001)(8676002)(6486002)(5660300002)(3846002)(2906002)(6916009)(25786009)(508600001)(97736004)(71200400001)(5640700003)(36756003)(6116002)(6512007)(316002)(105586002)(66066001)(68736007)(17423001)(156123004);DIR:OUT;SFP:1102;SCL:1;SRVR:BN6PR15MB1634;H:BN6PR15MB1507.namprd15.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: tresys.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: Asx3lfasgDv0936SYXhtrYWj1TEtuADWSn1/FR9Y7FrDZQMbBA08VNI92lPfi4wRvo/MDEiL4cYH3Er1vSss8ADNTdfeYm6lpxWs2pwXfAfggOC/mcHjnua9d8bF44zyDGHgZHPrwHiU0fWbKDbOPy4gDWTYiK+eBIIfnKwCUoL6XbAItzZJLpzohf7IC+GNqDgAwAMpjrvbsm7PLgkz7J7G3l2ds7yBK1Au0hYYzck0Cr2D0e/nWHMa8t7/35D8Kc9/UuauaaVFrwszFizqXQ/nLjfDm2y8QrIyXz0E9icLcileqAmjpXk/gKd2+PHwSu18YPWMk+NoYNDUrDWxQu5eDOkzts+6yQf+9iipxQBDOWWestOXM9s6Pox2yxHk5J4BDxx3eNXRi/G3+AHmsKjqdGHuhh8L2B05MQCyXIE= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: tresys.com X-MS-Exchange-CrossTenant-Network-Message-Id: 48c5bf24-c234-42f8-92c8-08d6ae2b25fe X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Mar 2019 18:29:27.0266 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a0d45667-6c07-4e88-868f-4ac9af95c7ed X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR15MB1634 Sender: selinux-refpolicy-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: selinux-refpolicy@vger.kernel.org type=3DAVC msg=3Daudit(1553029357.588:513): avc: denied { sendto } for p= id=3D7577 comm=3D"unix_chkpwd" path=3D"/dev/log" scontext=3Dtoor_u:staff_r:= chkpwd_t:s0 tcontext=3Dsystem_u:system_r:kernel_t:s0 tclass=3Dunix_dgram_so= cket permissive=3D0 Signed-off-by: Dave Sugar --- policy/modules/system/authlogin.te | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/policy/modules/system/authlogin.te b/policy/modules/system/aut= hlogin.te index 2b7586a2..d0c71285 100644 --- a/policy/modules/system/authlogin.te +++ b/policy/modules/system/authlogin.te @@ -144,6 +144,11 @@ ifdef(`distro_ubuntu',` ') ') =20 +ifdef(`init_systemd',` + # for journald /dev/log + kernel_dgram_send(chkpwd_t) +') + optional_policy(` # apache leaks file descriptors apache_dontaudit_rw_tcp_sockets(chkpwd_t) --=20 2.20.1