Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1668669 > unrolled thread

[PATCH] selinux: Assign proper class to PF_UNIX/SOCK_RAW sockets

Started byLuis Ressel <aranea@aixah.de>
First post2017-06-19 00:30 +0200
Last post2017-06-19 22:10 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] selinux: Assign proper class to PF_UNIX/SOCK_RAW sockets Luis Ressel <aranea@aixah.de> - 2017-06-19 00:30 +0200
    Re: [PATCH] selinux: Assign proper class to PF_UNIX/SOCK_RAW sockets Stephen Smalley <sds@tycho.nsa.gov> - 2017-06-19 22:10 +0200

#1668669 — [PATCH] selinux: Assign proper class to PF_UNIX/SOCK_RAW sockets

FromLuis Ressel <aranea@aixah.de>
Date2017-06-19 00:30 +0200
Subject[PATCH] selinux: Assign proper class to PF_UNIX/SOCK_RAW sockets
Message-ID<tTQRH-2AF-17@gated-at.bofh.it>
For PF_UNIX, SOCK_RAW is synonymous with SOCK_DGRAM (cf.
net/unix/af_unix.c). This is a tad obscure, but libpcap uses it.
---
 security/selinux/hooks.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index 819fd6858b49..1a331fba4a3c 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -1275,6 +1275,7 @@ static inline u16 socket_type_to_security_class(int family, int type, int protoc
 		case SOCK_SEQPACKET:
 			return SECCLASS_UNIX_STREAM_SOCKET;
 		case SOCK_DGRAM:
+		case SOCK_RAW:
 			return SECCLASS_UNIX_DGRAM_SOCKET;
 		}
 		break;
-- 
2.13.1

[toc] | [next] | [standalone]


#1669901

FromStephen Smalley <sds@tycho.nsa.gov>
Date2017-06-19 22:10 +0200
Message-ID<tUb9M-7kQ-21@gated-at.bofh.it>
In reply to#1668669
On Sun, 2017-06-18 at 23:45 +0200, Luis Ressel wrote:
> For PF_UNIX, SOCK_RAW is synonymous with SOCK_DGRAM (cf.
> net/unix/af_unix.c). This is a tad obscure, but libpcap uses it.

No Signed-off-by?

Feel free to add my:
Acked-by: Stephen Smalley <sds@tycho.nsa.gov>

> ---
>  security/selinux/hooks.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
> index 819fd6858b49..1a331fba4a3c 100644
> --- a/security/selinux/hooks.c
> +++ b/security/selinux/hooks.c
> @@ -1275,6 +1275,7 @@ static inline u16
> socket_type_to_security_class(int family, int type, int protoc
>  		case SOCK_SEQPACKET:
>  			return SECCLASS_UNIX_STREAM_SOCKET;
>  		case SOCK_DGRAM:
> +		case SOCK_RAW:
>  			return SECCLASS_UNIX_DGRAM_SOCKET;
>  		}
>  		break;

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web