OSDN Git Service

memory leak when socket is release()d before PPPIOCGCHAN has been called on it
authordann frazier <dannf@debian.org>
Tue, 22 Jan 2008 06:10:51 +0000 (23:10 -0700)
committerWilly Tarreau <w@1wt.eu>
Sun, 3 Feb 2008 15:37:46 +0000 (16:37 +0100)
commitf1e981303d0f4ccbf3dcd64af41bbf85c62a7122
treee71503d4417217d97ad7bddf72ce1a3555f6a9a3
parent38d832aa48ab51df8192511ffdcaea031a2cc0d1
memory leak when socket is release()d before PPPIOCGCHAN has been called on it

This is a 2.4 backport of a linux-2.6 change by Florian Zumbiehl.
(commit 202a03acf9994076055df40ae093a5c5474ad0bd)

CVE-2007-2525 was assigned for this issue - compile-tested only.

Commit log from 2.6 follows.

  below you find a patch that fixes a memory leak when a PPPoE socket is
  release()d after it has been connect()ed, but before the PPPIOCGCHAN ioctl
  ever has been called on it.

  This is somewhat of a security problem, too, since PPPoE sockets can be
  created by any user, so any user can easily allocate all the machine's
  RAM to non-swappable address space and thus DoS the system.

  Is there any specific reason for PPPoE sockets being available to any
  unprivileged process, BTW? After all, you need a packet socket for the
  discovery stage anyway, so it's unlikely that any unprivileged process
  will ever need to create a PPPoE socket, no? Allocating all session IDs
  for a known AC is a kind of DoS, too, after all - with Juniper ERXes,
  this is really easy, actually, since they don't ever assign session ids
  above 8000 ...
drivers/net/pppox.c