what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

rpc.pcnfsd Syslog Format String

rpc.pcnfsd Syslog Format String
Posted May 22, 2010
Authored by Rodrigo Rubira Branco

rpc.pcnfsd suffers from a syslog related format string vulnerability. IBM AIX versions 6.1.0 and below, IRIX 6.5 and HP-UX versions 11.11, 11.23 and 11.31 are all affected.

tags | advisory
systems | irix, aix, hpux
advisories | CVE-2010-1039
SHA-256 | 78d8496b11da0be50a94a9121549a259d6a954ea9337ad9e3d7cd651348c21b2

rpc.pcnfsd Syslog Format String

Change Mirror Download
Check Point Software Technologies - Vulnerability Discovery Team (VDT)
http://www.checkpoint.com/defense/

rpc.pcnfsd syslog format string vulnerability
CVE-2010-1039

INTRODUCTION

There exists a vulnerability within a log function of the rpc.pcnfsd service
which when properly exploited can lead to remote compromise of the vulnerable
system.
This vulnerability was confirmed in the following versions and operating
systems, other versions and operating systems may be also affected.

IBM AIX 6.1.0 and lower
IRIX 6.5
HP-UX 11.11, 11.23, 11.31

DETAILS

This vulnerability can be triggered by sending a rpc request resulting in an
invalid directory causing the service to call _msgout() function that call
syslog() function to log the error without checking for formatted strings.

This is the vulnerable function (pcnfsd version 1.2 source).

from pcnfsd_print.c

psrstat pr_start2(system, pr, user, fname, opts, id)

...
...

if (rename(pathname, new_pathname))

{
/*

**---------------------------------------------------------------

** Should never happen.

**---------------------------------------------------------------

*/

(void)sprintf(tempstr, "rpc.pcnfsd: spool file rename (%s->%s) failed.\n",
pathname, new_pathname);

msg_out(tempstr); <---- Vuln Function with our input



form pcnfsd_xdr.c

static
_msgout(msg)
char *msg;
{
#ifdef RPC_SVC_FG
if (_rpcpmstart)
syslog(LOG_ERR, msg); <---- Problem here!
else
(void) fprintf(stderr, "%s\n", msg);
#else
syslog(LOG_ERR, msg); <---- Problem here!
#endif
return(0);
}


GDB output:

Program received signal SIGSEGV, Segmentation fault.
0xd01e28cc in _doprnt () from /usr/lib/libc.a(shr.o)
(gdb) bt
#0 0xd01e28cc in _doprnt () from /usr/lib/libc.a(shr.o)
#1 0xd01dd4fc in vfprintf () from /usr/lib/libc.a(shr.o)
#2 0xd024be10 in __syslog_r () from /usr/lib/libc.a(shr.o)
#3 0xd024c400 in syslog () from /usr/lib/libc.a(shr.o)
#4 0x10000d98 in ?? ()



CREDITS

This vulnerability was discovered and exploited by Rodrigo Rubira Branco from Check Point Vulnerability Discovery Team (VDT).
Login or Register to add favorites

File Archive:

May 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    May 1st
    44 Files
  • 2
    May 2nd
    5 Files
  • 3
    May 3rd
    11 Files
  • 4
    May 4th
    0 Files
  • 5
    May 5th
    0 Files
  • 6
    May 6th
    28 Files
  • 7
    May 7th
    3 Files
  • 8
    May 8th
    4 Files
  • 9
    May 9th
    53 Files
  • 10
    May 10th
    12 Files
  • 11
    May 11th
    0 Files
  • 12
    May 12th
    0 Files
  • 13
    May 13th
    0 Files
  • 14
    May 14th
    0 Files
  • 15
    May 15th
    0 Files
  • 16
    May 16th
    0 Files
  • 17
    May 17th
    0 Files
  • 18
    May 18th
    0 Files
  • 19
    May 19th
    0 Files
  • 20
    May 20th
    0 Files
  • 21
    May 21st
    0 Files
  • 22
    May 22nd
    0 Files
  • 23
    May 23rd
    0 Files
  • 24
    May 24th
    0 Files
  • 25
    May 25th
    0 Files
  • 26
    May 26th
    0 Files
  • 27
    May 27th
    0 Files
  • 28
    May 28th
    0 Files
  • 29
    May 29th
    0 Files
  • 30
    May 30th
    0 Files
  • 31
    May 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close