dccp: handle invalid feature options length
commita49a2ad3766809aa241b4fda9ff54baa70f54421
authorDan Rosenberg <drosenberg@vsecurity.com>
Fri, 6 May 2011 03:27:18 +0000 (6 03:27 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 23 May 2011 18:22:57 +0000 (23 11:22 -0700)
tree4ab990f2f1c5505edde6f16eaef661265c7d138a
parente12f87c3a2414e032610a0ff96402f2526983a76
dccp: handle invalid feature options length

commit a294865978b701e4d0d90135672749531b9a900d upstream.

A length of zero (after subtracting two for the type and len fields) for
the DCCPO_{CHANGE,CONFIRM}_{L,R} options will cause an underflow due to
the subtraction.  The subsequent code may read past the end of the
options value buffer when parsing.  I'm unsure of what the consequences
of this might be, but it's probably not good.

Signed-off-by: Dan Rosenberg <drosenberg@vsecurity.com>
Acked-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
net/dccp/options.c