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: <13ab95079875febb3985b32d0fdaf587c6de1973.1440410850.git.lucien.xin@gmail.com>
Date:	Mon, 24 Aug 2015 18:07:30 +0800
From:	Xin Long <lucien.xin@...il.com>
To:	network dev <netdev@...r.kernel.org>
Cc:	mleitner@...hat.com, davem@...emloft.net
Subject: [PATCH net] sctp: asconf process should treat multiple address parameter as unrecognized parameter

currently, we sctp_walk_params(), if we encounter the address parameter, we will
skip them, we do not care about how many addr params are there.

but the params of ASCONF chunk should consist of one *Address Parameter* and one
or more *ASCONF Parameters*.

so we will process multiple address parameters as unrecognized parameter and
send error cause to peer.

Signed-off-by: Xin Long <lucien.xin@...il.com>
---
 net/sctp/sm_make_chunk.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c
index 06320c8..0ee5ca7 100644
--- a/net/sctp/sm_make_chunk.c
+++ b/net/sctp/sm_make_chunk.c
@@ -3217,10 +3217,18 @@ struct sctp_chunk *sctp_process_asconf(struct sctp_association *asoc,
 
 	/* Process the TLVs contained within the ASCONF chunk. */
 	sctp_walk_params(param, addip, addip_hdr.params) {
-		/* Skip preceeding address parameters. */
+		/* Skip preceeding address parameters.
+		 * process multi-addrparam as unrecognized parameters
+		 */
 		if (param.p->type == SCTP_PARAM_IPV4_ADDRESS ||
-		    param.p->type == SCTP_PARAM_IPV6_ADDRESS)
+		    param.p->type == SCTP_PARAM_IPV6_ADDRESS) {
+			if(param.addr != addr_param) {
+				all_param_pass = false;
+				sctp_add_asconf_response(asconf_ack, 0,
+					SCTP_ERROR_UNKNOWN_PARAM, param.v);
+			}
 			continue;
+		}
 
 		err_code = sctp_process_asconf_param(asoc, asconf,
 						     param.addip);
-- 
2.1.0

--
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