]> 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:15:45 +0000 (11:15 +0100)
commitd8930f132b54a3abf0d12d506e9e9204ce23abb8
tree2751b1692771196fdf039bb579522018e2ad7294
parent502319ce91249e578323190ee7332c8b43ca9202
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