netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fix sctp breakage
@ 2009-03-18  3:14 Al Viro
  2009-03-18  3:25 ` Al Viro
  2009-03-18 12:28 ` Vlad Yasevich
  0 siblings, 2 replies; 4+ messages in thread
From: Al Viro @ 2009-03-18  3:14 UTC (permalink / raw)
  To: David Miller; +Cc: Vlad Yasevich, netdev

broken by commit 5e739d1752aca4e8f3e794d431503bfca3162df4; AFAICS should
be -stable fodder as well...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---
diff --git a/net/sctp/endpointola.c b/net/sctp/endpointola.c
index 4c8d9f4..905fda5 100644
--- a/net/sctp/endpointola.c
+++ b/net/sctp/endpointola.c
@@ -111,7 +111,8 @@ static struct sctp_endpoint *sctp_endpoint_init(struct sctp_endpoint *ep,
 		if (sctp_addip_enable) {
 			auth_chunks->chunks[0] = SCTP_CID_ASCONF;
 			auth_chunks->chunks[1] = SCTP_CID_ASCONF_ACK;
-			auth_chunks->param_hdr.length += htons(2);
+			auth_chunks->param_hdr.length =
+					htons(sizeof(sctp_paramhdr_t) + 2);
 		}
 	}
 

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

* Re: [PATCH] fix sctp breakage
  2009-03-18  3:14 [PATCH] fix sctp breakage Al Viro
@ 2009-03-18  3:25 ` Al Viro
  2009-03-18 12:28 ` Vlad Yasevich
  1 sibling, 0 replies; 4+ messages in thread
From: Al Viro @ 2009-03-18  3:25 UTC (permalink / raw)
  To: David Miller; +Cc: Vlad Yasevich, netdev

On Wed, Mar 18, 2009 at 03:14:05AM +0000, Al Viro wrote:
> broken by commit 5e739d1752aca4e8f3e794d431503bfca3162df4; AFAICS should
> be -stable fodder as well...

PS: existing code *DOES* produce correct value; sizeof in question is
4, and htons(4) + htons(2) happens to be equal to htons(6) (no carryover).
So before anyone starts moaning about coverups again, no, this is not
a roothole fix we are trying to get past grsec tossers.

It needs fixing, though, accidentally correct value or not.

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

* Re: [PATCH] fix sctp breakage
  2009-03-18  3:14 [PATCH] fix sctp breakage Al Viro
  2009-03-18  3:25 ` Al Viro
@ 2009-03-18 12:28 ` Vlad Yasevich
  2009-03-19  2:13   ` David Miller
  1 sibling, 1 reply; 4+ messages in thread
From: Vlad Yasevich @ 2009-03-18 12:28 UTC (permalink / raw)
  To: Al Viro; +Cc: David Miller, netdev

Al Viro wrote:
> broken by commit 5e739d1752aca4e8f3e794d431503bfca3162df4; AFAICS should
> be -stable fodder as well...
> 
> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
> ---
> diff --git a/net/sctp/endpointola.c b/net/sctp/endpointola.c
> index 4c8d9f4..905fda5 100644
> --- a/net/sctp/endpointola.c
> +++ b/net/sctp/endpointola.c
> @@ -111,7 +111,8 @@ static struct sctp_endpoint *sctp_endpoint_init(struct sctp_endpoint *ep,
>  		if (sctp_addip_enable) {
>  			auth_chunks->chunks[0] = SCTP_CID_ASCONF;
>  			auth_chunks->chunks[1] = SCTP_CID_ASCONF_ACK;
> -			auth_chunks->param_hdr.length += htons(2);
> +			auth_chunks->param_hdr.length =
> +					htons(sizeof(sctp_paramhdr_t) + 2);
>  		}
>  	}
>  

ACK.  That wasn't a good way to write that increment.  I should have thought more
about it, but at the time it seemed like a good idea...

Thanks
-vlad

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


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

* Re: [PATCH] fix sctp breakage
  2009-03-18 12:28 ` Vlad Yasevich
@ 2009-03-19  2:13   ` David Miller
  0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2009-03-19  2:13 UTC (permalink / raw)
  To: vladislav.yasevich; +Cc: viro, netdev

From: Vlad Yasevich <vladislav.yasevich@hp.com>
Date: Wed, 18 Mar 2009 08:28:44 -0400

> Al Viro wrote:
> > broken by commit 5e739d1752aca4e8f3e794d431503bfca3162df4; AFAICS should
> > be -stable fodder as well...
> > 
> > Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
 ...
> ACK.  That wasn't a good way to write that increment.  I should have thought more
> about it, but at the time it seemed like a good idea...

Applied, thanks.

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

end of thread, other threads:[~2009-03-19  2:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-18  3:14 [PATCH] fix sctp breakage Al Viro
2009-03-18  3:25 ` Al Viro
2009-03-18 12:28 ` Vlad Yasevich
2009-03-19  2:13   ` David Miller

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