Bug 841180

Summary: DecodeNameReq buffer overflow
Product: [Fedora] Fedora Reporter: Florian Weimer <fweimer>
Component: pcpAssignee: Nathan Scott <nathans>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 16CC: kenj, mgoodwin, nathans, security-response-team
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: pcp-3.6.5 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-08-19 23:53:54 EDT Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 840765, 841698    
Attachments:
Description Flags
Resolve issues in decoding PCP namereq PDUs
none
Updated patch to address PCP namereq PDU decoding issues none

Description Florian Weimer 2012-07-18 07:00:21 EDT
DecodeNameReq does not check the namelen field against the PDU size.  This can lead to a crash.  DecodeNameReq is exposed by pmcd through PDU_PMNS_CHILD and PDU_PMNS_TRAVERSE processing.  No authentication is required.
Comment 2 Mark Goodwin 2012-07-22 19:44:49 EDT
Nathan requested assignment, thanks Nathan.
Comment 3 Nathan Scott 2012-07-27 02:29:04 EDT
Created attachment 600700 [details]
Resolve issues in decoding PCP namereq PDUs
Comment 4 Florian Weimer 2012-07-27 09:47:46 EDT
namelen+1 >= INT_MAX is always false.  But the comparison appears to be unnecessary in this case.
Comment 5 Nathan Scott 2012-07-28 21:10:12 EDT
Created attachment 600961 [details]
Updated patch to address PCP namereq PDU decoding issues

Incorporate Florian's review comments.
Comment 6 Florian Weimer 2012-07-30 08:24:47 EDT
(In reply to comment #5)
> Created attachment 600961 [details]
> Updated patch to address PCP namereq PDU decoding issues
> 
> Incorporate Florian's review comments.

Looks good to me.
Comment 7 Huzaifa S. Sidhpurwala 2012-08-15 23:52:33 EDT
Upstream patch:

http://oss.sgi.com/cgi-bin/gitweb.cgi?p=pcp/pcp.git;a=commit;h=bfb3ab8c6b3d75b1a6580feee76a7d0925a3633c

This issue has been addressed in pcp-3.6.5