Open
Conversation
openslp has a heap overflow vulnerability that when exploited may result in memory corruption and a crash of slpd or in remote code execution. CVE-2019-5544 has been assigned to this issue. VMware would like to thank the 360Vulcan team working with the 2019 Tianfu Cup Pwn Contest for reporting this issue to us. VMware Security Response Center Signed-off-by: Andrés MANELLI <amanelli@forssea-robotics.fr>
urbasus
reviewed
Jan 5, 2026
Signed-off-by: Andrés MANELLI <amanelli@forssea-robotics.fr>
urbasus
reviewed
Jan 5, 2026
openslp/slpd/slpd_process.c
Outdated
| /* urlentry is the url from the db result */ | ||
| urlentry = db->urlarray[i]; | ||
| if (urlentry->opaque != NULL) { | ||
| const int64_t newsize = size + urlentry->opaquelen; |
Contributor
There was a problem hiding this comment.
Addition may overflow should size_t be uint32_t (e.g. x86).
To detect size_t overflow:
if (size > SIZE_MAX - urlentry->opaquelen)
{
// overflow
}
else
{
// no overflow
}
Alternatively:
const size_t newsize = size + urlentry->opaquelen;
if (size < newsize) { /* overflow */ }
HOWEVER, I'm not sure why the next line proposed compares newsize against INT_MAX. I could be missing something important. Overall I find it hard to review code for absence of overflow issues.
Author
There was a problem hiding this comment.
I think this should be ok?
urlentry = db->urlarray[i];
if (urlentry->opaque != NULL) {
- const int64_t newsize = size + urlentry->opaquelen;
- if (urlentry->opaquelen <= 0 || newsize > INT_MAX)
+ if (urlentry->opaquelen == 0 || (size > SIZE_MAX - urlentry->opaquelen))
{
SLPDLog("Invalid opaquelen %zu or size of opaque url is too big, size=%zu\n",Signed-off-by: Andrés MANELLI <amanelli@forssea-robotics.fr>
urbasus
reviewed
Jan 6, 2026
Contributor
urbasus
left a comment
There was a problem hiding this comment.
I've got no more review remarks.
I cannot afford to test it at the moment and therefore cannot formally approve it at this time. Wish you luck finding someone who does.
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR has as intention to land the patch posted here (as reported in this comment).
Fixes #16
cc @jcalcote @urbasus
I'm not really sure if the
Signed-off-bymention is correct in this context, I'd be happy to change that to whatever is more appropriate.