exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

FreeBSD 7.0 - 7.2 pseudofs NULL Pointer Dereference

FreeBSD 7.0 - 7.2 pseudofs NULL Pointer Dereference
Posted Sep 9, 2010
Authored by Przemyslaw Frasunek

FreeBSD versions 7.0 through 7.2 suffer from a pseudofs NULL pointer dereference vulnerability. Due to a spurious call to pfs_unlock() in pfs_getattr() (as defined in sys/fs/pseudofs/pseudofs_vnops.c), a null pointer is dereferenced after calling extattr_get_attribute() on pseudofs vnode. By allocating a page at address 0x0, an attacker can overwrite an arbitrarily chosen portion of kernel memory, leading to a crash or local root escalation.

tags | advisory, kernel, local, root
systems | freebsd
SHA-256 | a855fffa300b7f55f74d0715f967bca60e0020b4c7e86448ff0dcbf6e9626f3c

FreeBSD 7.0 - 7.2 pseudofs NULL Pointer Dereference

Change Mirror Download
FreeBSD 7.0 - 7.2 pseudofs null pointer dereference
Disclosed by: Przemyslaw Frasunek
18/08/2010

1. Synopsis

Starting from FreeBSD 5.0, the system supports POSIX extended attributes,
allowing to store metadata associated with file. Those attributes can be
manipulated using extattr_* syscalls.

One of the filesystems supporting extended attributes is pseudofs, on which
procfs and linprocfs are based.

2. Attack vector

Due to spurious call to pfs_unlock() in pfs_getattr() (as defined in
sys/fs/pseudofs/pseudofs_vnops.c), null pointer is dereferenced after calling
extattr_get_attribute() on pseudofs vnode.

By allocating page at address 0x0, attacker can overwrite arbitrarly chosen
portion of kernel memory, leading to crash or local root escalation.

3. Workaround

Procfs and linprocfs are not mounted in default FreeBSD install.

By setting sysctl security.bsd.map_at_zero to 0 (which is default in 8.x
branch), the vulnerability can be exploited to cause system crash, not privilege
escalation.

4. Patch

The bug was fixed in following commit:

http://svn.freebsd.org/viewvc/base?view=revision&revision=196689

Nevertheless it was not recognized as security vulnerability. The following
versions are vulnerable:

7.0-RELEASE
7.1-RELEASE
7.2-RELEASE
8.0-RELEASE (system crash only)

Not vulnerable versions:

6.x-RELEASE
7.3-RELEASE
8.1-RELEASE
7-STABLE and 8-STABLE after 05/09/2009

5. Exploit code

There is a working exploit, allowing to gain local root privileges. It will be
released after 14 days from this advisory.

Login or Register to add favorites

File Archive:

September 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Sep 1st
    261 Files
  • 2
    Sep 2nd
    17 Files
  • 3
    Sep 3rd
    38 Files
  • 4
    Sep 4th
    52 Files
  • 5
    Sep 5th
    23 Files
  • 6
    Sep 6th
    27 Files
  • 7
    Sep 7th
    0 Files
  • 8
    Sep 8th
    1 Files
  • 9
    Sep 9th
    16 Files
  • 10
    Sep 10th
    38 Files
  • 11
    Sep 11th
    21 Files
  • 12
    Sep 12th
    40 Files
  • 13
    Sep 13th
    18 Files
  • 14
    Sep 14th
    0 Files
  • 15
    Sep 15th
    0 Files
  • 16
    Sep 16th
    21 Files
  • 17
    Sep 17th
    51 Files
  • 18
    Sep 18th
    23 Files
  • 19
    Sep 19th
    48 Files
  • 20
    Sep 20th
    36 Files
  • 21
    Sep 21st
    0 Files
  • 22
    Sep 22nd
    0 Files
  • 23
    Sep 23rd
    0 Files
  • 24
    Sep 24th
    0 Files
  • 25
    Sep 25th
    0 Files
  • 26
    Sep 26th
    0 Files
  • 27
    Sep 27th
    0 Files
  • 28
    Sep 28th
    0 Files
  • 29
    Sep 29th
    0 Files
  • 30
    Sep 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close