mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Minor net/core/sock.c security issue?
@ 2001-07-23 22:24 Chris Evans
  2001-07-23 23:14 ` David S. Miller
  0 siblings, 1 reply; 8+ messages in thread
From: Chris Evans @ 2001-07-23 22:24 UTC (permalink / raw)
  To: linux-kernel; +Cc: davem


Hi,

May be nothing, but it looks like SO_*BUF may have signedness issues (have
these been picked up by the Stanford tools and fixed in recent 2.4.x?)

    int val;
...
    case SO_SNDBUF:
      if (val > sysctl_wmem_max)
        val = sysctl_wmem_max;
      sk->sndbuf = max(val*2,2048);

If val is negative, then sk->sndbuf ends up negative. This is because the
arguments to max are passed as _unsigned_ ints. SO_RCVBUF has similar
issues. Maybe a nasty local user could use this to chew up memory?

Cheers
Chris


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2001-07-27 16:44 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-07-23 22:24 Minor net/core/sock.c security issue? Chris Evans
2001-07-23 23:14 ` David S. Miller
2001-07-24  3:02   ` Albert D. Cahalan
2001-07-24  3:41   ` David S. Miller
2001-07-24  4:55     ` Albert D. Cahalan
2001-07-24 22:24   ` Alexey Kuznetsov
2001-07-27  9:56   ` David S. Miller
2001-07-27 16:44     ` kuznet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®