Skip to content
This repository was archived by the owner on May 24, 2025. It is now read-only.
This repository was archived by the owner on May 24, 2025. It is now read-only.

stack-buffer-overflow in metric_len  #502

@nandedkarhrishi

Description

@nandedkarhrishi

Context:

Stack buffer overflow may be triggered while writing to a variable metric_len, which is defined as unsigned short (ref: https://github.com/openthread/wpantund/blob/master/src/ncp-spinel/SpinelNCPInstance.cpp#L2180) but is considered as unsigned int (ref: https://github.com/openthread/wpantund/blob/master/third_party/openthread/src/ncp/spinel.c#L597).

Expected behavior and actual behavior:

Expected Behavior: Trigger an exception, because size of buffer needed, is not available.

Actual Behavior: The metric_len variable triggers stack buffer overflow.

Version Details:

The issue was first found in wpantund: 4ae4619

Affected commits: 4ae4619 to bf45115

CVE

CVE-2021-33889 (Reserved)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions