lkml.org 
[lkml]   [2000]   [Mar]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Fw: Local Denial-of-Service attack against Linux
Alexey Kuznetosv wrote:
> > The code is really weird:
> >
> > * sk->sndbuf is initialized to wmem_default, but sock_setsockopt() sets
> > sk->sndbuf to 2*the user supplied number.
>
> Yes. What is strange here?
>

1) setsockopt(SO_SNDBUF,x);
y=getsockopt(SO_SNDBUF);

now y=2*x

2) or
x = get_wmem_default_with_sysctl();
setsockopt(SO_SNDBUF,x);

Doesn't restore the original send buffer, it doubles the send buffer
size.

If we set the internal send buffers to 2* the user space number, then
should do that everywhere.
--
Manfred

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:57    [from the cache]
©2003-2011 Jasper Spaans