This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours

Bug 841290

Summary: pcp: __pmDecodeLogControl vulnerabilities
Product: [Fedora] Fedora Reporter: Florian Weimer <fweimer>
Component: pcpAssignee: Mark Goodwin <mgoodwin>
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-20 00:00:49 EDT Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Bug Depends On:    
Bug Blocks: 840765, 841698    
Attachments:
Description Flags
Resolve issues in decoding PCP logcontrol PDUs
none
Updated patch to address PCP logcontrol PDU decoding issues none

Description Florian Weimer 2012-07-18 11:04:32 EDT

    
Comment 1 Tomas Hoger 2012-07-18 11:11:17 EDT
Moving text form Environment field to proper comment:

__pmDecodeLogControl does not check the c_numpmid and v_numval fields against the size of the PDU.  Due to the way the sizes passed to malloc are calculated, heap objects could be allocated which are too small, leading to a heap-based buffer overflow.

This seems to be exposed through pmlogger, but not through pmcd.
Comment 2 Nathan Scott 2012-07-27 02:41:46 EDT
Created attachment 600705 [details]
Resolve issues in decoding PCP logcontrol PDUs
Comment 3 Florian Weimer 2012-07-27 11:31:53 EDT
(In reply to comment #2)
> Created attachment 600705 [details]
> Resolve issues in decoding PCP logcontrol PDUs

I think this is fine, thanks.  You can remove

	    if (nv >= (INT_MAX - sizeof(vlist_t) - sizeof(__pmValue_PDU)) / sizeof(__pmValue_PDU))
		goto corrupt;

from the nv == 0 branch.
Comment 4 Nathan Scott 2012-07-28 21:37:11 EDT
Created attachment 600969 [details]
Updated patch to address PCP logcontrol PDU decoding issues

Incorporate Florian's review comments.
Comment 5 Florian Weimer 2012-07-30 08:21:10 EDT
(In reply to comment #4)
> Created attachment 600969 [details]
> Updated patch to address PCP logcontrol PDU decoding issues
> 
> Incorporate Florian's review comments.

Still looks okay.
Comment 6 Huzaifa S. Sidhpurwala 2012-08-16 00:00:55 EDT
Upstream patch:

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

This issue has been addressed in pcp-3.6.5