BF Specification of CVE-2017-17833 SLPD Double Free in OpenSLP in v1.0.2 and v1.1.0

../../../../BF/images/BFCVE/CVE-2017-17833(simple)-0.png
Missing reposition of the 'result' pointer leads to a dangling pointer due to reallocation of the same object via 'sendbuf', which, when used to resize (second reallocation) the object leads to a Double Deallocate -- aka double free. If exploited, this can lead to a denial of service or an arbitrary (remote) code execution.

vendor:product: openslp:openslp:1.0.2


Bug Report


Code with Bug


Code with Fix
Code with Fix1


NVD Entry

ClassDefinition
MADMemory Addressing (MAD) class – The pointer to an object is initialized, repositioned, or reassigned to an improper memory address.
MMNMemory Management (MMN) class – An object is allocated, deallocated, or resized improperly.
OperationDefinition
RepositionReposition operation – Change the pointer to another position inside its object.
Reallocate-ExtendReallocate-Extend operation – Reserve a new larger piece of memory for an object at a new address, copy the object content there, reassign its pointer, and deallocate the previous piece of memory.
Cause/ConsequenceDefinition
Code BugCode Bug type – Defect in the implementation of the operation – proper operands over an improper operation. A first cause for the chain of weaknesses underlying a software security vulnerability. Must be fixed to resolve the vulnerability.
   Missing CodeMissing Code bug - The operation is entirely absent.
Address Error/FaultAddress Fault/Error type – The object address in use is wrong.
   Dangling PointerDangling Pointer fault/error – Still holds the address of its successfully deallocated object (e.g., pointer to a freed heap object or with a returned by a function stack object address).
Memory Corruption/Disclosure Final ErrorMemory Corruption/Disclosure exploitable error type – An exploitable or undefined system behavior caused by memory addressing, allocation, use, and deallocation bugs.
   Double DeallocateDouble Deallocate exploitable error – An attempt to deallocate a deallocated (freed) object or via an uninitialized pointer.
Operation AttributeDefinition
MechanismMechanism operation attribute type – Shows how the buggy/faulty operation code is performed.
   SequentialSequential operation attribute – The operation is via iterating over the object elements.
   ExplicitExplicit operation attribute – The operation is via a function/method call.
Source CodeSource Code operation attribute type – Shows where the operation with the bug or a faulty operand is in the program – in what kind of software.
   Third-PartyThird-Party operation attribute – The operation code is in a third-party software.
Execution SpaceExecution Space operation attribute type – Shows where the buggy/faulty operation code is running or with what privilege level.
   UserlandUserland operation attribute – The bugged code runs in an environment with privilege levels, but in unprivileged mode (e.g., ring 3 in x86 architecture).
Operand AttributeDefinition
Address StateAddress State operand attribute type - State operand attribute type – Shows where the address is in the memory layout.
   HeapHeap operand attribute – The object is a dynamically allocated data structure (e.g., via malloc() and new).
Size KindSize Kind operand attribute type – Shows what the limit for traversal of the object is.
   UsedUsed operand attribute – A supplied size for an object.