]> git.hungrycats.org Git - linux/commit
fixup: sctp: verify size of a new chunk in _sctp_make_chunk()
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 13 Mar 2018 09:56:00 +0000 (10:56 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 18 Mar 2018 10:17:54 +0000 (11:17 +0100)
commit7b822932c14328844f31a610e986ff2ebd19fb9e
tree2df26f8da909a47250b9b9ae963fbf8d8bdbf16b
parent7954c6dc4c80e53d26e2279dc3401f1f16dc779e
fixup: sctp: verify size of a new chunk in _sctp_make_chunk()

Ben writes:
> > + int chunklen;
> > +
> > + chunklen = sizeof(*chunk_hdr) + paylen;
>
> I think this length still needs to be rounded up (with WORD_ROUND here,
> instead of SCTP_PAD4 upstream).

So here's a fix for this problem.

Reported-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/sctp/sm_make_chunk.c