Wei Yongjun wrote: > George Cheimonidis wrote: >> Hi Vlad! >> >> I have recompiled the 2.6.33 kernel with your debug patch. I have also >> enabled SCTP debugging with with CONFIG_SCTP_DBG_MSG=y. >> You can find the log messages in the attached file. Hope it helps! >> >> Best regards > Hi George > > With your description, I can reproduct this problem now. > can your check whether this PATCH can fix this BUG? Good catch Wei. How did you reproduce this? Looks like there are other parameters that need this as well. - supported address family parameter (if only 1 address family, the size doesn't account for padding) - supported extensions (depending on the extensions, we might be unaligned) We just happen to luck out with the other parameters. This also needs to be fixed in make_init_ack(). -vlad > > [PATCH] sctp: fix to calc the init chunk length correctly > > When calc the init chunk length, we should not only calc > the length of parameters, but also plus the parameters > zero padding length, such as AUTH HMACS parameter and > CHUNKS parameter. Without the parameters zero padding > length will cause oops. > > Reported-by: George Cheimonidis <gchimon@xxxxxxxxx> > Signed-off-by: Wei Yongjun <yjwei@xxxxxxxxxxxxxx> > --- > net/sctp/sm_make_chunk.c | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c > index 9e73291..c199cc8 100644 > --- a/net/sctp/sm_make_chunk.c > +++ b/net/sctp/sm_make_chunk.c > @@ -237,14 +237,14 @@ struct sctp_chunk *sctp_make_init(const struct sctp_association *asoc, > /* Add HMACS parameter length if any were defined */ > auth_hmacs = (sctp_paramhdr_t *)asoc->c.auth_hmacs; > if (auth_hmacs->length) > - chunksize += ntohs(auth_hmacs->length); > + chunksize += WORD_ROUND(ntohs(auth_hmacs->length)); > else > auth_hmacs = NULL; > > /* Add CHUNKS parameter length */ > auth_chunks = (sctp_paramhdr_t *)asoc->c.auth_chunks; > if (auth_chunks->length) > - chunksize += ntohs(auth_chunks->length); > + chunksize += WORD_ROUND(ntohs(auth_chunks->length)); > else > auth_chunks = NULL; > -- To unsubscribe from this list: send the line "unsubscribe linux-sctp" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html