[PATCH] SCTP: Respect the real chunk length when walking parameters (CVE-2006-1858)
commit0eca2317be1345e056fb75d256099a04c97f7021
authorVladislav Yasevich <vladislav.yasevich@hp.com>
Fri, 19 May 2006 18:52:20 +0000 (19 11:52 -0700)
committerChris Wright <chrisw@sous-sol.org>
Sat, 20 May 2006 22:00:34 +0000 (20 15:00 -0700)
tree11bc55f826aeeada51a7e40a51418d202ea35901
parentf91962f90eb89684ecbfb3f6b8578b3ebd6937df
[PATCH] SCTP: Respect the real chunk length when walking parameters (CVE-2006-1858)

When performing bound checks during the parameter processing, we
want to use the real chunk and paramter lengths for bounds instead
of the rounded ones.  This prevents us from potentially walking of
the end if the chunk length was miscalculated.  We still use rounded
lengths when advancing the pointer. This was found during a
conformance test that changed the chunk length without modifying
parameters.

(Vlad noted elsewhere: the most you'd overflow is 3 bytes, so problem
is parameter dependent).

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
include/net/sctp/sctp.h