]> git.baikalelectronics.ru Git - kernel.git/commit
[DCCP] getsockopt: Fix DCCP_SOCKOPT_[SEND,RECV]_CSCOV
authorArnaldo Carvalho de Melo <acme@ghostprotocols.net>
Wed, 28 Mar 2007 18:54:32 +0000 (11:54 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 28 Mar 2007 18:54:32 +0000 (11:54 -0700)
commit3b9fca27bbf073481102d217a8e160969ecdd1c8
treea6afca93101b9142523d6814db12ec09d73e58ef
parent7474d7ddcddece491596417e3c97556ec63baaa4
[DCCP] getsockopt: Fix DCCP_SOCKOPT_[SEND,RECV]_CSCOV

We were only checking if there was enough space to put the int, but
left len as specified by the (malicious) user, sigh, fix it by setting
len to sizeof(val) and transfering just one int worth of data, the one
asked for.

Also check for negative len values.

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dccp/proto.c