netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] linux 2.9.10-rc1: Fix oops in unix_dgram_sendmsg when using SELinux and SOCK_SEQPACKET
@ 2004-11-14 18:13 Ross Kendall Axe
  2004-11-15 13:31 ` Stephen Smalley
  0 siblings, 1 reply; 36+ messages in thread
From: Ross Kendall Axe @ 2004-11-14 18:13 UTC (permalink / raw)
  To: netdev; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 889 bytes --]

With CONFIG_SECURITY_NETWORK=y and CONFIG_SECURITY_SELINUX=y, using
SOCK_SEQPACKET unix domain sockets causes an oops in the superfluous(?)
call to security_unix_may_send in sock_dgram_sendmsg. This patch avoids
making this call for SOCK_SEQPACKET sockets.


Signed-off-by: Ross Axe <ross.axe@blueyonder.co.uk>


--- linux-2.6.10-rc1/net/unix/af_unix.c.orig	2004-11-13
21:04:53.000000000 +0000
+++ linux-2.6.10-rc1/net/unix/af_unix.c	2004-11-13 21:12:23.000000000 +0000
@@ -1354,9 +1354,11 @@ restart:
  	if (other->sk_shutdown & RCV_SHUTDOWN)
  		goto out_unlock;

-	err = security_unix_may_send(sk->sk_socket, other->sk_socket);
-	if (err)
-		goto out_unlock;
+	if (sk->sk_type != SOCK_SEQPACKET) {
+		err = security_unix_may_send(sk->sk_socket, other->sk_socket);
+		if (err)
+			goto out_unlock;
+	}

  	if (unix_peer(other) != sk &&
  	    (skb_queue_len(&other->sk_receive_queue) >


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 256 bytes --]

^ permalink raw reply	[flat|nested] 36+ messages in thread

end of thread, other threads:[~2004-11-20  7:11 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-14 18:13 [PATCH] linux 2.9.10-rc1: Fix oops in unix_dgram_sendmsg when using SELinux and SOCK_SEQPACKET Ross Kendall Axe
2004-11-15 13:31 ` Stephen Smalley
2004-11-16  8:41   ` Chris Wright
2004-11-17 21:29     ` Ross Kendall Axe
2004-11-18  0:09       ` Ross Kendall Axe
2004-11-18  3:42         ` James Morris
2004-11-18  4:25           ` James Morris
2004-11-18  6:07             ` Chris Wright
2004-11-18  7:25           ` Ross Kendall Axe
2004-11-18  7:59             ` James Morris
2004-11-18  8:27               ` James Morris
2004-11-18 16:44                 ` Chris Wright
2004-11-18 17:01                   ` James Morris
2004-11-18 17:07                     ` Chris Wright
2004-11-18 17:11                       ` James Morris
2004-11-18 17:25                     ` James Morris
2004-11-18 16:58                       ` Alan Cox
2004-11-18 22:34                       ` David S. Miller
2004-11-19  3:23                   ` Ross Kendall Axe
2004-11-19  7:19                     ` Chris Wright
2004-11-19  9:40                       ` Ross Kendall Axe
2004-11-19 13:05                       ` Arnaldo Carvalho de Melo
2004-11-19 13:16                         ` Arnaldo Carvalho de Melo
2004-11-18 16:49                 ` Alan Cox
2004-11-18 18:40                   ` James Morris
2004-11-18 23:39                     ` Alan Cox
2004-11-19  3:12                       ` James Morris
2004-11-19  7:01                         ` Chris Wright
2004-11-19  7:12                           ` James Morris
2004-11-19  7:28                             ` Chris Wright
2004-11-19 11:39                         ` Alan Cox
2004-11-19 16:24                           ` James Morris
2004-11-20  7:11                             ` David S. Miller
2004-11-18 16:45           ` Alan Cox
2004-11-18 18:28             ` James Morris
2004-11-18 18:34             ` Chris Wright

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).