lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1319518038-28679-1-git-send-email-zenczykowski@gmail.com>
Date:	Mon, 24 Oct 2011 21:47:18 -0700
From:	Maciej Żenczykowski <zenczykowski@...il.com>
To:	Maciej Żenczykowski <maze@...gle.com>
Cc:	netdev@...r.kernel.org,
	Maciej Żenczykowski <maze@...gle.com>
Subject: [PATCH] net: allow CAP_NET_RAW to setsockopt SO_PRIORITY

From: Maciej Żenczykowski <maze@...gle.com>

It is my belief that CAP_NET_ADMIN is and should continue to be about
configuring the system as a whole, not about configuring per-socket
or per-packet parameters.

Sending and receiving raw packets is what CAP_NET_RAW is all about.
Hence it makes sense to allow a CAP_NET_RAW process to set the
priority of sockets and thus packets it sends.

Signed-off-by: Maciej Żenczykowski <maze@...gle.com>
---
 net/core/sock.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/net/core/sock.c b/net/core/sock.c
index 5a08762..3d163b6 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -612,7 +612,8 @@ set_rcvbuf:
 		break;
 
 	case SO_PRIORITY:
-		if ((val >= 0 && val <= 6) || capable(CAP_NET_ADMIN))
+		if ((val >= 0 && val <= 6)
+		    || capable(CAP_NET_ADMIN) || capable(CAP_NET_RAW))
 			sk->sk_priority = val;
 		else
 			ret = -EPERM;
-- 
1.7.3.1

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ