From: casey@schaufler-ca.com (Casey Schaufler)
To: linux-security-module@vger.kernel.org
Subject: [PATCH v3 RFC] Smack: Inform peer that IPv6 traffic has been blocked
Date: Mon, 23 Jul 2018 13:04:55 -0700 [thread overview]
Message-ID: <60d493f6-633f-e577-9947-cd41e1c762dc@schaufler-ca.com> (raw)
In-Reply-To: <20180719094732eucas1p18ac5bd15693cd06f868238c7a4951aa1~CvBwyJxUf3081230812eucas1p1q@eucas1p1.samsung.com>
On 7/19/2018 2:47 AM, Piotr Sawicki wrote:
> In this patch we're sending an ICMPv6 message to a peer to
> immediately inform it that making a connection is not possible.
> In case of TCP connections, without this change, the peer
> will be waiting until a connection timeout is exceeded.
>
> Signed-off-by: Piotr Sawicki <p.sawicki2@partner.samsung.com>
Added to git://github.com/cschaufler/next-smack.git#smack-for-4.19-a
> ---
> Changes in v2:
> - Add missing Signed-off-by field
> Changes in v3:
> - Fix formatting issues caused by improper email client configuration
> ---
> security/smack/smack_lsm.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c
> index c2282ac..efa81bc 100644
> --- a/security/smack/smack_lsm.c
> +++ b/security/smack/smack_lsm.c
> @@ -28,6 +28,7 @@
> #include <linux/tcp.h>
> #include <linux/udp.h>
> #include <linux/dccp.h>
> +#include <linux/icmpv6.h>
> #include <linux/slab.h>
> #include <linux/mutex.h>
> #include <linux/pipe_fs_i.h>
> @@ -4010,6 +4011,9 @@ static int smack_socket_sock_rcv_skb(struct sock *sk, struct sk_buff *skb)
> #ifdef SMACK_IPV6_PORT_LABELING
> rc = smk_ipv6_port_check(sk, &sadd, SMK_RECEIVING);
> #endif /* SMACK_IPV6_PORT_LABELING */
> + if (rc != 0)
> + icmpv6_send(skb, ICMPV6_DEST_UNREACH,
> + ICMPV6_ADM_PROHIBITED, 0);
> break;
> #endif /* CONFIG_IPV6 */
> }
--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2018-07-23 20:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20180719094732eucas1p18ac5bd15693cd06f868238c7a4951aa1@eucas1p1.samsung.com>
2018-07-19 9:47 ` [PATCH v3 RFC] Smack: Inform peer that IPv6 traffic has been blocked Piotr Sawicki
2018-07-19 22:51 ` Casey Schaufler
2018-07-23 20:04 ` Casey Schaufler [this message]
2019-03-13 22:55 ` Replacing IPv6 port labeling with CALIPSO in Smack Casey Schaufler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=60d493f6-633f-e577-9947-cd41e1c762dc@schaufler-ca.com \
--to=casey@schaufler-ca.com \
--cc=linux-security-module@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox