Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 600699 Details for
Bug 841112
__pmDecodeIDList lacks check against PDU size
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Resolve issues in decoding PCP namespace idlist PDUs
pcp_idlist (text/plain), 1.14 KB, created by
Nathan Scott
on 2012-07-27 06:27:26 UTC
(
hide
)
Description:
Resolve issues in decoding PCP namespace idlist PDUs
Filename:
MIME Type:
Creator:
Nathan Scott
Created:
2012-07-27 06:27:26 UTC
Size:
1.14 KB
patch
obsolete
>Index: secure-pcp/src/libpcp/src/p_pmns.c >=================================================================== >--- secure-pcp.orig/src/libpcp/src/p_pmns.c 2012-07-25 16:52:20.999948029 +1000 >+++ secure-pcp/src/libpcp/src/p_pmns.c 2012-07-25 16:53:17.175947801 +1000 >@@ -85,14 +85,26 @@ int > __pmDecodeIDList(__pmPDU *pdubuf, int numids, pmID idlist[], int *sts) > { > idlist_t *idlist_pdu; >+ char *pdu_end; >+ int nids; > int j; > > idlist_pdu = (idlist_t *)pdubuf; >+ pdu_end = (char *)pdubuf + idlist_pdu->hdr.len; > >+ if (pdu_end - (char *)pdubuf < sizeof(idlist_t) - sizeof(pmID)) >+ return PM_ERR_IPC; > *sts = ntohl(idlist_pdu->sts); >- for (j = 0; j < numids; j++) { >+ nids = ntohl(idlist_pdu->numids); >+ if (nids <= 0 || nids != numids || nids > idlist_pdu->hdr.len) >+ return PM_ERR_IPC; >+ if (nids >= (INT_MAX - sizeof(idlist_t)) / sizeof(pmID)) >+ return PM_ERR_IPC; >+ if (sizeof(idlist_t) + (sizeof(pmID) * (nids-1)) > (size_t)(pdu_end - (char *)pdubuf)) >+ return PM_ERR_IPC; >+ >+ for (j = 0; j < numids; j++) > idlist[j] = __ntohpmID(idlist_pdu->idlist[j]); >- } > > #ifdef PCP_DEBUG > if (pmDebug & DBG_TRACE_PMNS) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 841112
: 600699