dccp: handle invalid feature options length
authorDan Rosenberg <drosenberg@vsecurity.com>
Fri, 6 May 2011 03:27:18 +0000 (03:27 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sat, 21 May 2011 22:13:09 +0000 (15:13 -0700)
commita7d9222022375081576a7909167869a0bf1ed44c
tree80fdb484dd6f80a2d0b2bc386143e3edce4a5b17
parent10bb564c39e90bb0a23bd925490e8cf1a7af9372
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