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  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Fri, 11 Jul 2008 12:48:49 +0100
From:	Gerrit Renker <gerrit@....abdn.ac.uk>
To:	Tomasz Grobelny <tomasz@...belny.oswiecenia.net>
Cc:	Arnaldo Carvalho de Melo <acme@...hat.com>, dccp@...r.kernel.org,
	netdev@...r.kernel.org
Subject: Re: [PATCH 1/1] [DCCP][QPOLICY]: More strict controlling of
	supplied parameters v2

| Ensure that cmsg->cmsg_type value is valid for qpolicy that is currently in use.
| Slightly revised version after comments from Gerrit.
| 
Thanks, this looks good and compiles cleanly. It is currently uploaded to
	git://eden-feed.erg.abdn.ac.uk/dccp_exp 	(subtree `qpolicy')
but I would like to add it to the test tree soon, with changes as below.

Are there any objections in reserving the first 16 bits for qpolicy -- I
think this should be enough to get a good number of policies started.

--- a/include/linux/dccp.h
+++ b/include/linux/dccp.h
@@ -198,6 +198,8 @@ enum dccp_feature_numbers {
 /* DCCP socket control message types for cmsg */
 enum dccp_cmsg_type {
 	DCCP_SCM_PRIORITY = 1,
+	DCCP_SCM_QPOLICY_MAX = 0xFFFF,
+	/* Up to here reserved exclusively for qpolicy parameters */
 	DCCP_SCM_MAX
 };
 
--- a/net/dccp/proto.c
+++ b/net/dccp/proto.c
@@ -730,7 +730,8 @@ static int dccp_msghdr_parse(struct msgh
 		if (cmsg->cmsg_level != SOL_DCCP)
 			continue;
 
-		if (!dccp_qpolicy_param_ok(skb->sk, cmsg->cmsg_type))
+		if (cmsg->cmsg_type <= DCCP_SCM_QPOLICY_MAX &&
+		    !dccp_qpolicy_param_ok(skb->sk, cmsg->cmsg_type))
 			return -EINVAL;
 
 		switch (cmsg->cmsg_type) {
	
--
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