From patchwork Sun Sep 23 09:16:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jann Horn via Selinux X-Patchwork-Id: 10612391 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DDFEE14BD for ; Mon, 24 Sep 2018 12:32:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CD54829EB4 for ; Mon, 24 Sep 2018 12:32:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C082429EB9; Mon, 24 Sep 2018 12:32:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from UCOL19PA11.eemsg.mail.mil (ucol19pa11.eemsg.mail.mil [214.24.24.84]) (using TLSv1.2 with cipher DHE-RSA-AES256-SHA256 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4F63829EB4 for ; Mon, 24 Sep 2018 12:32:24 +0000 (UTC) X-EEMSG-check-008: 592937183|UCOL19PA11_EEMSG_MP9.csd.disa.mil X-IronPort-AV: E=Sophos;i="5.54,297,1534809600"; d="scan'208";a="592937183" Received: from emsm-gh1-uea10.ncsc.mil ([214.29.60.2]) by UCOL19PA11.eemsg.mail.mil with ESMTP/TLS/DHE-RSA-AES256-SHA256; 24 Sep 2018 12:32:23 +0000 X-IronPort-AV: E=Sophos;i="5.54,297,1534809600"; d="scan'208";a="16142425" IronPort-PHdr: 9a23:Oor5PBYMOBrkeXKa2LmW3oL/LSx+4OfEezUN459isYplN5qZosm6Y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IohnCoY7K5Q3AgQCBAUCBQ8hOGk4ZHErChgpDzsxBnwagR+CJReNYjhtegEBAYl9gj0BAQ Received: from tarius.tycho.ncsc.mil ([144.51.242.1]) by EMSM-GH1-UEA10.NCSC.MIL with ESMTP; 24 Sep 2018 12:32:22 +0000 Received: from prometheus.infosec.tycho.ncsc.mil (prometheus.infosec.tycho.ncsc.mil [192.168.25.40]) by tarius.tycho.ncsc.mil (8.14.4/8.14.4) with ESMTP id w8OCWKru031545; Mon, 24 Sep 2018 08:32:21 -0400 Received: from tarius.tycho.ncsc.mil (tarius.infosec.tycho.ncsc.mil [144.51.242.1]) by prometheus.infosec.tycho.ncsc.mil (8.15.2/8.15.2) with ESMTP id w8N9GZ8d014457 for ; Sun, 23 Sep 2018 05:16:35 -0400 Received: from goalie.tycho.ncsc.mil (goalie.infosec.tycho.ncsc.mil [144.51.242.250]) by tarius.tycho.ncsc.mil (8.14.4/8.14.4) with ESMTP id w8N9GVQn027132; Sun, 23 Sep 2018 05:16:31 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A1A+AACwWKdbly0YGNZaHgEGBwaBUYILgWcog3SIdItKinmNYxSBZgssiAghNBgBAwEBAQEBAQIUAQEBAQEGGAZMhW4EGQE5AxIfAiYCNgEFASMSgyGBaQEDFQMBlmM8iwt7M4J2BYEFAYJfCj8NgQyBPQIGEnmFV4QWF4IAgRKFaIIRgxiCVwKITZQoCgmQHiKIZwqGOyuUNwIEAgQFAgUPIYEhgg00PBVsgjuCGQwOCYNGihw4bXqLdAEB X-IPAS-Result: A1A+AACwWKdbly0YGNZaHgEGBwaBUYILgWcog3SIdItKinmNYxSBZgssiAghNBgBAwEBAQEBAQIUAQEBAQEGGAZMhW4EGQE5AxIfAiYCNgEFASMSgyGBaQEDFQMBlmM8iwt7M4J2BYEFAYJfCj8NgQyBPQIGEnmFV4QWF4IAgRKFaIIRgxiCVwKITZQoCgmQHiKIZwqGOyuUNwIEAgQFAgUPIYEhgg00PBVsgjuCGQwOCYNGihw4bXqLdAEB X-IronPort-AV: E=Sophos;i="5.54,293,1534824000"; d="scan'208";a="376212" Received: from emsm-gh1-uea11.ncsc.mil ([214.29.60.35]) by goalie.tycho.ncsc.mil with ESMTP; 23 Sep 2018 05:16:30 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0A+AAD7WKdbly0YGNZaHgEGBwaBUYILgWcog3SIdItKinmNYxSBZgssiAghNBgBAwEBAQEBAQIBEwEBAQEBBhgGTAyCNSKDCwQZATkDEh8CJgI2AQUBIxKDIYFpAQMVAwGWZjyLC3szgnYFgQUBgl8KPw2BDIE9AgYSeYVXhBYXggCBEoVoghGDGIJXAohNlCgKCZAeIohnCoY7K5Q3AgQCBAUCBQ8hgSGCDTQ8FWyCO4IZDA4Jg0aKHDhteot0AQE X-IPAS-Result: A0A+AAD7WKdbly0YGNZaHgEGBwaBUYILgWcog3SIdItKinmNYxSBZgssiAghNBgBAwEBAQEBAQIBEwEBAQEBBhgGTAyCNSKDCwQZATkDEh8CJgI2AQUBIxKDIYFpAQMVAwGWZjyLC3szgnYFgQUBgl8KPw2BDIE9AgYSeYVXhBYXggCBEoVoghGDGIJXAohNlCgKCZAeIohnCoY7K5Q3AgQCBAUCBQ8hgSGCDTQ8FWyCO4IZDA4Jg0aKHDhteot0AQE X-IronPort-AV: E=Sophos;i="5.54,293,1534809600"; d="scan'208";a="18558294" X-IronPort-Outbreak-Status: No, level 0, Unknown - Unknown Received: from ucol3cpa07.eemsg.mail.mil ([214.24.24.45]) by emsm-gh1-uea11.NCSC.MIL with ESMTP; 23 Sep 2018 09:16:30 +0000 X-EEMSG-check-005: 0 X-EEMSG-check-006: 000-001;1907cbb3-96af-4d96-a190-a0374b2cce73 X-EEMSG-check-008: 63167347|UCOL3CPA09_EEMSG_MP24.csd.disa.mil X-EEMSG-SBRS: 2.7 X-EEMSG-ORIG-IP: 209.85.221.66 X-EEMSG-check-002: true X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0ByAABoWadbf0LdVdFaHgEGBwaBUYQag3SIdItKinmNYxSBZgsFJ4gIGQcBBDAYAQMBAQEBAQEBAQETAQEJCwsIGwwlDII1IoMLBAsBDQE5AxIfAiYCNgEFASMSgyGBaQEDFQSWZzyLC3szgnYFgQUBgl8KPw2BDIE9AgYJAQh5hVeEFheCAIEShWiCEYMYglcCiE2UKAoJkB4iiGcKhjsrlDcCBAIEBQIFDyGBIYINNDwVbII7ghkMF4NGihw4bXqLdAEB X-IPAS-Result: A0ByAABoWadbf0LdVdFaHgEGBwaBUYQag3SIdItKinmNYxSBZgsFJ4gIGQcBBDAYAQMBAQEBAQEBAQETAQEJCwsIGwwlDII1IoMLBAsBDQE5AxIfAiYCNgEFASMSgyGBaQEDFQSWZzyLC3szgnYFgQUBgl8KPw2BDIE9AgYJAQh5hVeEFheCAIEShWiCEYMYglcCiE2UKAoJkB4iiGcKhjsrlDcCBAIEBQIFDyGBIYINNDwVbII7ghkMF4NGihw4bXqLdAEB Received: from mail-wr1-f66.google.com ([209.85.221.66]) by UCOL3CPA09.eemsg.mail.mil with ESMTP/TLS/AES128-SHA; 23 Sep 2018 09:16:26 +0000 Received: by mail-wr1-f66.google.com with SMTP id b11-v6so536185wru.9; Sun, 23 Sep 2018 02:16:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=wluegA9G0mQsc00qdkhXnSZHdeUAa9MHd8gbxoTToGU=; b=AMrugu+KsTpYOjRAeIB8C0HdK5s8iAbmlpCL/j1u2ZmJZX+ckHpgzJAuZLe3EXirQK qsTlQlJrd27jihf94yDDPtMKsO2thYCU+NQj6vVF4eZS9/myxS4EfzWJDIcUNhPIZ+NF AuL211HWi+Z9y5EbC7JRZpLglGe9+fl9f2POHE+8HOJ1RrhhQrtQa5+wqoRlmTezf6ni MuitxrdNHYyrVRlfLWj0JsEviqMin616kBgWxKQq713wY6Sq13cW9zb5HQIzZIrpyYSl KU9tgProkfEKI+dSTH4O8EEHbZy7+kDfDDjGNazlNbqqqIqcE0sM7bDtbMFOAaTNvDPA XmoQ== X-Gm-Message-State: ABuFfojKRlBC/hu1398oqNbGk2h8zhDcDjojDd3hOiwPk8/OHELvO3Q7 fTFc27XK7R6T3HYqtpQLb61sJvUzu1k= X-Google-Smtp-Source: ACcGV60eAEtkerqWJxCiE1r0wA+L7IgQKjDPk+dB//ebcuqFAvpd1zyAJxvV1/0YOTRqQAwhiYS54g== X-Received: by 2002:adf:d149:: with SMTP id b9-v6mr4555889wri.17.1537694185488; Sun, 23 Sep 2018 02:16:25 -0700 (PDT) Received: from desktopdebian.localdomain (x4dbb2f17.dyn.telefonica.de. [77.187.47.23]) by smtp.gmail.com with ESMTPSA id m68-v6sm20865759wmb.10.2018.09.23.02.16.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 23 Sep 2018 02:16:25 -0700 (PDT) X-EEMSG-check-009: 444-444 To: pablo@netfilter.org, kadlec@blackhole.kfki.hu, fw@strlen.de, davem@davemloft.net, netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, paul@paul-moore.com, sds@tycho.nsa.gov, eparis@parisplace.org, jmorris@namei.org, serge@hallyn.com, selinux@tycho.nsa.gov, linux-security-module@vger.kernel.org Date: Sun, 23 Sep 2018 11:16:10 +0200 Message-Id: <20180923091611.19815-1-cgzones@googlemail.com> X-Mailer: git-send-email 2.19.0 MIME-Version: 1.0 X-MIME-Autoconverted: from quoted-printable to 8bit by prometheus.infosec.tycho.ncsc.mil id w8N9GZ8d014457 X-Mailman-Approved-At: Mon, 24 Sep 2018 08:26:06 -0400 Subject: [PATCH v2 1/2] netfilter: nf_tables: add SECMARK support X-BeenThere: selinux@tycho.nsa.gov X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Security-Enhanced Linux \(SELinux\) mailing list" List-Post: List-Help: From: =?utf-8?q?Christian_G=C3=B6ttsche?= via Selinux Reply-To: =?utf-8?q?Christian_G=C3=B6ttsche?= Errors-To: selinux-bounces@tycho.nsa.gov Sender: "Selinux" X-Virus-Scanned: ClamAV using ClamSMTP Add the ability to set the security context of packets within the nf_tables framework. Add a nft_object for holding security contexts in the kernel and manipulating packets on the wire. Convert the security context strings at rule addition time to security identifiers. This is the same behavior like in xt_SECMARK and offers better performance than computing it per packet. Set the maximum security context length to 256. Signed-off-by: Christian Göttsche Acked-by: Florian Westphal --- v2: convert security context strings to ids on rule addition time Based on nf-next Tested with v4.18.8 include/net/netfilter/nf_tables_core.h | 4 + include/uapi/linux/netfilter/nf_tables.h | 18 +++- net/netfilter/nf_tables_core.c | 28 ++++++- net/netfilter/nft_meta.c | 101 +++++++++++++++++++++++ 4 files changed, 146 insertions(+), 5 deletions(-) diff --git a/include/net/netfilter/nf_tables_core.h b/include/net/netfilter/nf_tables_core.h index 8da837d2a..2046d104f 100644 --- a/include/net/netfilter/nf_tables_core.h +++ b/include/net/netfilter/nf_tables_core.h @@ -16,6 +16,10 @@ extern struct nft_expr_type nft_meta_type; extern struct nft_expr_type nft_rt_type; extern struct nft_expr_type nft_exthdr_type; +#ifdef CONFIG_NETWORK_SECMARK +extern struct nft_object_type nft_secmark_obj_type; +#endif + int nf_tables_core_module_init(void); void nf_tables_core_module_exit(void); diff --git a/include/uapi/linux/netfilter/nf_tables.h b/include/uapi/linux/netfilter/nf_tables.h index 702e4f0be..5444e7687 100644 --- a/include/uapi/linux/netfilter/nf_tables.h +++ b/include/uapi/linux/netfilter/nf_tables.h @@ -1176,6 +1176,21 @@ enum nft_quota_attributes { }; #define NFTA_QUOTA_MAX (__NFTA_QUOTA_MAX - 1) +/** + * enum nft_secmark_attributes - nf_tables secmark object netlink attributes + * + * @NFTA_SECMARK_CTX: security context (NLA_STRING) + */ +enum nft_secmark_attributes { + NFTA_SECMARK_UNSPEC, + NFTA_SECMARK_CTX, + __NFTA_SECMARK_MAX, +}; +#define NFTA_SECMARK_MAX (__NFTA_SECMARK_MAX - 1) + +/* Max security context length */ +#define NFT_SECMARK_CTX_MAXLEN 256 + /** * enum nft_reject_types - nf_tables reject expression reject types * @@ -1432,7 +1447,8 @@ enum nft_ct_timeout_timeout_attributes { #define NFT_OBJECT_CONNLIMIT 5 #define NFT_OBJECT_TUNNEL 6 #define NFT_OBJECT_CT_TIMEOUT 7 -#define __NFT_OBJECT_MAX 8 +#define NFT_OBJECT_SECMARK 8 +#define __NFT_OBJECT_MAX 9 #define NFT_OBJECT_MAX (__NFT_OBJECT_MAX - 1) /** diff --git a/net/netfilter/nf_tables_core.c b/net/netfilter/nf_tables_core.c index ffd5c0f94..3fbce3b9c 100644 --- a/net/netfilter/nf_tables_core.c +++ b/net/netfilter/nf_tables_core.c @@ -249,12 +249,24 @@ static struct nft_expr_type *nft_basic_types[] = { &nft_exthdr_type, }; +static struct nft_object_type *nft_basic_objects[] = { +#ifdef CONFIG_NETWORK_SECMARK + &nft_secmark_obj_type, +#endif +}; + int __init nf_tables_core_module_init(void) { - int err, i; + int err, i, j = 0; + + for (i = 0; i < ARRAY_SIZE(nft_basic_objects); i++) { + err = nft_register_obj(nft_basic_objects[i]); + if (err) + goto err; + } - for (i = 0; i < ARRAY_SIZE(nft_basic_types); i++) { - err = nft_register_expr(nft_basic_types[i]); + for (j = 0; j < ARRAY_SIZE(nft_basic_types); j++) { + err = nft_register_expr(nft_basic_types[j]); if (err) goto err; } @@ -262,8 +274,12 @@ int __init nf_tables_core_module_init(void) return 0; err: + while (j-- > 0) + nft_unregister_expr(nft_basic_types[j]); + while (i-- > 0) - nft_unregister_expr(nft_basic_types[i]); + nft_unregister_obj(nft_basic_objects[i]); + return err; } @@ -274,4 +290,8 @@ void nf_tables_core_module_exit(void) i = ARRAY_SIZE(nft_basic_types); while (i-- > 0) nft_unregister_expr(nft_basic_types[i]); + + i = ARRAY_SIZE(nft_basic_objects); + while (i-- > 0) + nft_unregister_obj(nft_basic_objects[i]); } diff --git a/net/netfilter/nft_meta.c b/net/netfilter/nft_meta.c index 297fe7d97..ac5df9508 100644 --- a/net/netfilter/nft_meta.c +++ b/net/netfilter/nft_meta.c @@ -543,3 +543,104 @@ struct nft_expr_type nft_meta_type __read_mostly = { .maxattr = NFTA_META_MAX, .owner = THIS_MODULE, }; + +#ifdef CONFIG_NETWORK_SECMARK + +struct nft_secmark { + char ctx[NFT_SECMARK_CTX_MAXLEN]; + int len; + u32 secid; +}; + +static const struct nla_policy nft_secmark_policy[NFTA_SECMARK_MAX + 1] = { + [NFTA_SECMARK_CTX] = { .type = NLA_STRING, .len = NFT_SECMARK_CTX_MAXLEN }, +}; + +static int nft_secmark_secconversion(struct nft_secmark *priv) +{ + int err; + u32 tmp_secid = 0; + + err = security_secctx_to_secid(priv->ctx, priv->len, &tmp_secid); + if (err) + return err; + + if (!tmp_secid) + return -ENOENT; + + err = security_secmark_relabel_packet(tmp_secid); + if (err) + return err; + + priv->secid = tmp_secid; + return 0; +} + +static void nft_secmark_obj_eval(struct nft_object *obj, struct nft_regs *regs, const struct nft_pktinfo *pkt) +{ + const struct nft_secmark *priv = nft_obj_data(obj); + struct sk_buff *skb = pkt->skb; + + skb->secmark = priv->secid; +} + + +static int nft_secmark_obj_init(const struct nft_ctx *ctx, const struct nlattr * const tb[], struct nft_object *obj) +{ + int err; + struct nft_secmark *priv = nft_obj_data(obj); + + if (tb[NFTA_SECMARK_CTX] == NULL) + return -EINVAL; + + nla_strlcpy(priv->ctx, tb[NFTA_SECMARK_CTX], NFT_SECMARK_CTX_MAXLEN); + priv->len = strlen(priv->ctx); + + err = nft_secmark_secconversion(priv); + if (err) + return err; + + security_secmark_refcount_inc(); + + return 0; +} + +static int nft_secmark_obj_dump(struct sk_buff *skb, struct nft_object *obj, bool reset) +{ + int err; + struct nft_secmark *priv = nft_obj_data(obj); + + if (nla_put_string(skb, NFTA_SECMARK_CTX, priv->ctx)) + return -1; + + if (reset) { + err = nft_secmark_secconversion(priv); + if (err) + return err; + } + + return 0; +} + +static void nft_secmark_obj_destroy(const struct nft_ctx *ctx, struct nft_object *obj) +{ + security_secmark_refcount_dec(); +} + +static const struct nft_object_ops nft_secmark_obj_ops = { + .type = &nft_secmark_obj_type, + .size = sizeof(struct nft_secmark), + .init = nft_secmark_obj_init, + .eval = nft_secmark_obj_eval, + .dump = nft_secmark_obj_dump, + .destroy = nft_secmark_obj_destroy, +}; +struct nft_object_type nft_secmark_obj_type __read_mostly = { + .type = NFT_OBJECT_SECMARK, + .ops = &nft_secmark_obj_ops, + .maxattr = NFTA_SECMARK_MAX, + .policy = nft_secmark_policy, + .owner = THIS_MODULE, +}; + +#endif /* CONFIG_NETWORK_SECMARK */ From patchwork Sun Sep 23 09:16:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jann Horn via Selinux X-Patchwork-Id: 10612395 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5DC05913 for ; Mon, 24 Sep 2018 12:32:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4BAE829EBD for ; Mon, 24 Sep 2018 12:32:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3E10E29EC0; Mon, 24 Sep 2018 12:32:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from usfb19pa16.eemsg.mail.mil (uphb19pa13.eemsg.mail.mil [214.24.26.87]) (using TLSv1.2 with cipher DHE-RSA-AES256-SHA256 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8297329EC1 for ; Mon, 24 Sep 2018 12:32:49 +0000 (UTC) X-EEMSG-check-008: 129808289|USFB19PA16_EEMSG_MP12.csd.disa.mil Received: from emsm-gh1-uea11.ncsc.mil ([214.29.60.3]) by usfb19pa16.eemsg.mail.mil with ESMTP; 24 Sep 2018 12:32:27 +0000 X-IronPort-AV: E=Sophos;i="5.54,297,1534809600"; d="scan'208";a="18575704" IronPort-PHdr: 9a23:qtG+5RAp0p8FHoSSE/TjUyQJP3N1i/DPJgcQr6AfoPdwSPn+p8SwAkXT6L1XgUPTWs2DsrQY07WQ6/iocFdDyK7JiGoFfp1IWk1NouQttCtkPvS4D1bmJuXhdS0wEZcKflZk+3amLRodQ56mNBXdrXKo8DEdBAj0OxZrKeTpAI7SiNm82/yv95HJbAhEmDiwbaluIBmqsA7cqtQYjYx+J6gr1xDHuGFIe+NYxWNpIVKcgRPx7dqu8ZBg7ipdpesv+9ZPXqvmcas4S6dYDCk9PGAu+MLrrxjDQhCR6XYaT24bjwBHAwnB7BH9Q5fxri73vfdz1SWGIcH7S60/Vjq476dvVRTmliEJOTAk+23Tk8B8kb5XrBenqhdiwYDbfZuVOeJgcK3Tft0UQmhOXsheWCNbH428d4kCA/cPMOhYtYnyu1QAogWlBQS3GOPg0SVFimPs0KEm0eksFxzN0gw6H9IJtXTZtMv4NKcIUeC016nI0TTDYOlQ2Tzg6YbQdAwhoe2XXb1sccre11QkFx3EjlqKtIfrIi2a1uAMs2id8uphWv+khmk8qw5vpjivx8EsipTGh48O1lDF9Tl2wIYyJdGiTk57esSrHIFftyGdKYt7W8UvSHxrtiYi0rAKpJG2cScQxJkn2hLTceKLfoeW7h75SeqdOTV1iXB/dL6ihBu/81Ksx+L+W8WuzlpHoCxImcTWuH8XzRzc8M2HR+N4/kemxDmAyRje6vpBIUAojarbLIMhwqIompoTr0vDGij2lV3qjKCMbEUk+/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9PipLzAdzJ1V1/uGXOMotqvRXc5vZydPfldN93PUtePBqPikwv9cSnsRo7ozCg+mQdhSE5ZboJMrJo/GeS9JB01gxcWFXGqQYaEvO6oE7OMMpE+nIEL9YuwkMLbQrS5wmcWHq/ed7Kx0lIV2ZX6i9nsS//rHDXZBTvXKDqwtoIQ== X-IPAS-Result: A2DWAQB72Khb/wHyM5BaHAEBAQQBAQcEAQGBUoFjKoEIXCiDdIh0i0mFHJNAFAyBURQYEwGEWYNBITUXAQMBAQEBAQECAWwogjUkgmADAwECIAQNGiAOAwkBASQCIgQCAgIBAS0DAQUBAwEHARAHBwsFGASCQT+BagEBARUDAZZQPIsLezOEAAFnghkEChgNgQyBRRJ5hVeEFg4JggCGeoF1ARIBgyCCVwKcdQoJkB4iiGcKhjsrlDcCBAIEBQIFDyE4awI0ZHErChgpDzsxBnwagR+CJReNYjhtegEBAYl9gj0BAQ Received: from tarius.tycho.ncsc.mil ([144.51.242.1]) by emsm-gh1-uea11.NCSC.MIL with ESMTP; 24 Sep 2018 12:32:26 +0000 Received: from prometheus.infosec.tycho.ncsc.mil (prometheus.infosec.tycho.ncsc.mil [192.168.25.40]) by tarius.tycho.ncsc.mil (8.14.4/8.14.4) with ESMTP id w8OCWO8d031562; Mon, 24 Sep 2018 08:32:25 -0400 Received: from tarius.tycho.ncsc.mil (tarius.infosec.tycho.ncsc.mil [144.51.242.1]) by prometheus.infosec.tycho.ncsc.mil (8.15.2/8.15.2) with ESMTP id w8N9GZ04014460 for ; Sun, 23 Sep 2018 05:16:35 -0400 Received: from goalie.tycho.ncsc.mil (goalie.infosec.tycho.ncsc.mil [144.51.242.250]) by tarius.tycho.ncsc.mil (8.14.4/8.14.4) with ESMTP id w8N9GVQo027132; Sun, 23 Sep 2018 05:16:33 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A1A1AACwWKdblywbGNZaHQEBBQEHBQGBUYILgWcog3SIFV+LSop5jWOBegsshEACg0YhNBgBAwEBAQEBAQIUAQEBAQEGGAZMhUUDAyMEGQE5AwwGHwImAgI0AQUBHAcSgyGBaQEDFQMBlmM8iwt7M4J2BYEFAYJfCj8NgQyBPQIGEnmFV4QWF4IAhnqFKYJXApx1CgmQHiKIZwqGOyuUNwIEAgQFAgUPIYEhgg00PBVsgjuCGQwOCRGDNYocOG16i3QBAQ X-IPAS-Result: A1A1AACwWKdblywbGNZaHQEBBQEHBQGBUYILgWcog3SIFV+LSop5jWOBegsshEACg0YhNBgBAwEBAQEBAQIUAQEBAQEGGAZMhUUDAyMEGQE5AwwGHwImAgI0AQUBHAcSgyGBaQEDFQMBlmM8iwt7M4J2BYEFAYJfCj8NgQyBPQIGEnmFV4QWF4IAhnqFKYJXApx1CgmQHiKIZwqGOyuUNwIEAgQFAgUPIYEhgg00PBVsgjuCGQwOCRGDNYocOG16i3QBAQ X-IronPort-AV: E=Sophos;i="5.54,293,1534824000"; d="scan'208";a="376213" Received: from emsm-gh1-uea10.ncsc.mil ([214.29.60.34]) by goalie.tycho.ncsc.mil with ESMTP; 23 Sep 2018 05:16:32 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0A2AACwWKdblywbGNZaHQEBBQEHBQGBUYILgWcog3SIFV+LSop5jWOBegsshEACg0YhNBgBAwEBAQEBAQIBEwEBAQEBBhgGTAyCNSKCYgMDIwQZATkDDAYfAiYCAjQBBQEcBxKDIYFpAQMVAwGWYzyLC3szgnYFgQUBgl8KPw2BDIE9AgYSeYVXhBYXggCGeoUpglcCnHUKCZAeIohnCoY7K5Q3AgQCBAUCBQ8hgSGCDTQ8FWyCO4IZDA4JEYM1ihw4bXqLdAEB X-IPAS-Result: A0A2AACwWKdblywbGNZaHQEBBQEHBQGBUYILgWcog3SIFV+LSop5jWOBegsshEACg0YhNBgBAwEBAQEBAQIBEwEBAQEBBhgGTAyCNSKCYgMDIwQZATkDDAYfAiYCAjQBBQEcBxKDIYFpAQMVAwGWYzyLC3szgnYFgQUBgl8KPw2BDIE9AgYSeYVXhBYXggCGeoUpglcCnHUKCZAeIohnCoY7K5Q3AgQCBAUCBQ8hgSGCDTQ8FWyCO4IZDA4JEYM1ihw4bXqLdAEB X-IronPort-AV: E=Sophos;i="5.54,293,1534809600"; d="scan'208";a="16129740" X-IronPort-Outbreak-Status: No, level 0, Unknown - Unknown Received: from updc3cpa05.eemsg.mail.mil ([214.24.27.44]) by EMSM-GH1-UEA10.NCSC.MIL with ESMTP; 23 Sep 2018 09:16:31 +0000 X-EEMSG-check-005: 0 X-EEMSG-check-006: 000-001;cc496ba2-4ea2-4233-8089-276862f69c8b X-EEMSG-check-008: 45534822|UPDC3CPA08_EEMSG_MP24.csd.disa.mil X-EEMSG-SBRS: 2.7 X-EEMSG-ORIG-IP: 209.85.221.68 X-EEMSG-check-002: true X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0BiAAAyWadbf0TdVdFaHQEBBQEHBQGBUYQag3SIFV+LSop5jWOBegsshEACg0YZBwEEMBgBAwEBAQEBAQEBARMBAQkLCwgbDCUMgjUigmIDAyMECwENATkDDAYfAiYCAjQBBQEcBxKDIYFpAQMVBJZoPIsLezOCdgWBBQGCXwo/DYEMgT0CBgkBCHmFV4QWF4IAhnqFKYJXApx1CgmQHiKIZwqGOyuUNwIEAgQFAgUPIYEhgg00PBVsgjuCGQwXg0aKHDhteot0AQE X-IPAS-Result: A0BiAAAyWadbf0TdVdFaHQEBBQEHBQGBUYQag3SIFV+LSop5jWOBegsshEACg0YZBwEEMBgBAwEBAQEBAQEBARMBAQkLCwgbDCUMgjUigmIDAyMECwENATkDDAYfAiYCAjQBBQEcBxKDIYFpAQMVBJZoPIsLezOCdgWBBQGCXwo/DYEMgT0CBgkBCHmFV4QWF4IAhnqFKYJXApx1CgmQHiKIZwqGOyuUNwIEAgQFAgUPIYEhgg00PBVsgjuCGQwXg0aKHDhteot0AQE Received: from mail-wr1-f68.google.com ([209.85.221.68]) by UPDC3CPA08.eemsg.mail.mil with ESMTP/TLS/AES128-SHA; 23 Sep 2018 09:16:27 +0000 Received: by mail-wr1-f68.google.com with SMTP id k5-v6so16712679wre.10; Sun, 23 Sep 2018 02:16:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=mgTHSkW4YsUxUx1zKtiHWDUN6r3Nwhwqj9hrE/x7CNo=; b=ftvXKET/EZuTXjE79XwF+zgEsAJmCTUmBPmn9QwzbennIRKyNxnI23W2Iyv2wmfQUV q18jzCajTqc/FQFkx0t3eyOU0P4luG4Hc8B1UCTHByF9jxOdSNQeYDbHYr1sAW3sIogc u1gh8Ov7IBqc/1g0Pnsr1C4D+rlPWN4YZ4fiZ+C2EgNBIXgodRLKvNJQ+ISeIqXSRouv Ms2/+C3ioLwWu+Q101c80AKrilq5WIJyr7E0LEv74/i6A8zgykDXRVIZjDOA/9WphYUB qGbnP9UaYDtMdEtZNYJavLfYHE6vihdrpE1JruVKbltsYQhmylMXJ/+D3YoPXur4DclW 6y1g== X-Gm-Message-State: ABuFfoj2/tyMGrusaU8BRGHWRkWXnyEB2JjWmywOl83VPIoNyU6p6+EC JO3IU/u0R+prLHDD6/Xlg40= X-Google-Smtp-Source: ACcGV62H6fugQK5nnM9SfOD3sNjgMMW/Kg3GFWrvHuUZlWjaNYq9Z9LHjFnZ4M406TRFuDriIl6ung== X-Received: by 2002:adf:cc8d:: with SMTP id p13-v6mr4517294wrj.67.1537694186446; Sun, 23 Sep 2018 02:16:26 -0700 (PDT) Received: from desktopdebian.localdomain (x4dbb2f17.dyn.telefonica.de. [77.187.47.23]) by smtp.gmail.com with ESMTPSA id m68-v6sm20865759wmb.10.2018.09.23.02.16.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 23 Sep 2018 02:16:25 -0700 (PDT) X-EEMSG-check-009: 444-444 To: pablo@netfilter.org, kadlec@blackhole.kfki.hu, fw@strlen.de, davem@davemloft.net, netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, paul@paul-moore.com, sds@tycho.nsa.gov, eparis@parisplace.org, jmorris@namei.org, serge@hallyn.com, selinux@tycho.nsa.gov, linux-security-module@vger.kernel.org Date: Sun, 23 Sep 2018 11:16:11 +0200 Message-Id: <20180923091611.19815-2-cgzones@googlemail.com> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180923091611.19815-1-cgzones@googlemail.com> References: <20180923091611.19815-1-cgzones@googlemail.com> MIME-Version: 1.0 X-MIME-Autoconverted: from quoted-printable to 8bit by prometheus.infosec.tycho.ncsc.mil id w8N9GZ04014460 X-Mailman-Approved-At: Mon, 24 Sep 2018 08:26:06 -0400 Subject: [PATCH 2/2] netfilter: nf_tables: add requirements for connsecmark support X-BeenThere: selinux@tycho.nsa.gov X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Security-Enhanced Linux \(SELinux\) mailing list" List-Post: List-Help: From: =?utf-8?q?Christian_G=C3=B6ttsche?= via Selinux Reply-To: =?utf-8?q?Christian_G=C3=B6ttsche?= Errors-To: selinux-bounces@tycho.nsa.gov Sender: "Selinux" X-Virus-Scanned: ClamAV using ClamSMTP Add ability to set the connection tracking secmark value. Add ability to set the meta secmark value. Signed-off-by: Christian Göttsche --- Based on nf-next Tested with v4.18.8 net/netfilter/nft_ct.c | 15 +++++++++++++++ net/netfilter/nft_meta.c | 8 ++++++++ 2 files changed, 23 insertions(+) diff --git a/net/netfilter/nft_ct.c b/net/netfilter/nft_ct.c index d74afa707..dcc451c20 100644 --- a/net/netfilter/nft_ct.c +++ b/net/netfilter/nft_ct.c @@ -298,6 +298,14 @@ static void nft_ct_set_eval(const struct nft_expr *expr, } break; #endif +#ifdef CONFIG_NF_CONNTRACK_SECMARK + case NFT_CT_SECMARK: + if (ct->secmark != value) { + ct->secmark = value; + nf_conntrack_event_cache(IPCT_SECMARK, ct); + } + break; +#endif #ifdef CONFIG_NF_CONNTRACK_LABELS case NFT_CT_LABELS: nf_connlabels_replace(ct, @@ -564,6 +572,13 @@ static int nft_ct_set_init(const struct nft_ctx *ctx, return -EINVAL; len = sizeof(u32); break; +#endif +#ifdef CONFIG_NF_CONNTRACK_SECMARK + case NFT_CT_SECMARK: + if (tb[NFTA_CT_DIRECTION]) + return -EINVAL; + len = sizeof(u32); + break; #endif default: return -EOPNOTSUPP; diff --git a/net/netfilter/nft_meta.c b/net/netfilter/nft_meta.c index ac5df9508..555fcd66b 100644 --- a/net/netfilter/nft_meta.c +++ b/net/netfilter/nft_meta.c @@ -284,6 +284,11 @@ static void nft_meta_set_eval(const struct nft_expr *expr, skb->nf_trace = !!value8; break; +#ifdef CONFIG_NETWORK_SECMARK + case NFT_META_SECMARK: + skb->secmark = value; + break; +#endif default: WARN_ON(1); } @@ -436,6 +441,9 @@ static int nft_meta_set_init(const struct nft_ctx *ctx, switch (priv->key) { case NFT_META_MARK: case NFT_META_PRIORITY: +#ifdef CONFIG_NETWORK_SECMARK + case NFT_META_SECMARK: +#endif len = sizeof(u32); break; case NFT_META_NFTRACE: