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

SystemPacketBuffer reference counter possible overflow #15578

Closed
andyp-apple opened this issue Feb 25, 2022 · 1 comment
Closed

SystemPacketBuffer reference counter possible overflow #15578

andyp-apple opened this issue Feb 25, 2022 · 1 comment
Assignees

Comments

@andyp-apple
Copy link

SystemPacketBuffer refcounts should be checked for overflow before incrementing:

void PacketBuffer::AddRef()
{
#if CHIP_SYSTEM_CONFIG_USE_LWIP
pbuf_ref(this);
#else // !CHIP_SYSTEM_CONFIG_USE_LWIP
LOCK_BUF_POOL();
++this->ref;
UNLOCK_BUF_POOL();
#endif // !CHIP_SYSTEM_CONFIG_USE_LWIP
}

@andyp-apple
Copy link
Author

fix merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants