Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In the registration_handleRequest processing flow, there may be an invalid pointer in the contextP->clientList linked list #708

Open
Solstice1993 opened this issue Jun 2, 2023 · 0 comments

Comments

@Solstice1993
Copy link

In lines 1896 and 1901 of the function registration_handleRequest, when the function prv_getLocationString and coap_set_header_location_path fail to check, the function registration_freeClient will be called to release the clientP node, but at this time the clientP node is not removed from contextP->clientList, resulting in subsequent access to invalid pointers.

            if (prv_getLocationString(clientP->internalID, location) == 0)
            {
                registration_freeClient(clientP);
                return COAP_500_INTERNAL_SERVER_ERROR;
            }
            if (coap_set_header_location_path(response, location) == 0)
            {
                registration_freeClient(clientP);
                return COAP_500_INTERNAL_SERVER_ERROR;
            }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant