[3.13.y-ckt stable] Patch "net: sctp: fix passing wrong parameter header to param_type2af in sctp_process_param" has been added to staging queue

Kamal Mostafa kamal at canonical.com
Tue Mar 31 18:45:14 UTC 2015


This is a note to let you know that I have just added a patch titled

    net: sctp: fix passing wrong parameter header to param_type2af in sctp_process_param

to the linux-3.13.y-queue branch of the 3.13.y-ckt extended stable tree 
which can be found at:

 http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.13.y-queue

This patch is scheduled to be released in version 3.13.11-ckt18.

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.13.y-ckt tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Kamal

------

>From 142ef7906c32992d9ad6a0543be32de38e38d988 Mon Sep 17 00:00:00 2001
From: Saran Maruti Ramanara <saran.neti at telus.com>
Date: Thu, 29 Jan 2015 11:05:58 +0100
Subject: net: sctp: fix passing wrong parameter header to param_type2af in
 sctp_process_param

[ Upstream commit cfbf654efc6d78dc9812e030673b86f235bf677d ]

When making use of RFC5061, section 4.2.4. for setting the primary IP
address, we're passing a wrong parameter header to param_type2af(),
resulting always in NULL being returned.

At this point, param.p points to a sctp_addip_param struct, containing
a sctp_paramhdr (type = 0xc004, length = var), and crr_id as a correlation
id. Followed by that, as also presented in RFC5061 section 4.2.4., comes
the actual sctp_addr_param, which also contains a sctp_paramhdr, but
this time with the correct type SCTP_PARAM_IPV{4,6}_ADDRESS that
param_type2af() can make use of. Since we already hold a pointer to
addr_param from previous line, just reuse it for param_type2af().

Fixes: d6de3097592b ("[SCTP]: Add the handling of "Set Primary IP Address" parameter to INIT")
Signed-off-by: Saran Maruti Ramanara <saran.neti at telus.com>
Signed-off-by: Daniel Borkmann <dborkman at redhat.com>
Acked-by: Vlad Yasevich <vyasevich at gmail.com>
Acked-by: Neil Horman <nhorman at tuxdriver.com>
Signed-off-by: David S. Miller <davem at davemloft.net>
Signed-off-by: Kamal Mostafa <kamal at canonical.com>
---
 net/sctp/sm_make_chunk.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c
index ca22389..72cf5a3 100644
--- a/net/sctp/sm_make_chunk.c
+++ b/net/sctp/sm_make_chunk.c
@@ -2608,7 +2608,7 @@ do_addr_param:

 		addr_param = param.v + sizeof(sctp_addip_param_t);

-		af = sctp_get_af_specific(param_type2af(param.p->type));
+		af = sctp_get_af_specific(param_type2af(addr_param->p.type));
 		if (af == NULL)
 			break;

--
1.9.1





More information about the kernel-team mailing list