-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
heap-buffer-overflow in FeedbackPsRembPacket() constructor #246
Comments
@jmillan may I understand this auto* data = reinterpret_cast<uint8_t*>(commonHeader + 1); UPDATE: Ok, it seems to make Wouldn't it be better like this?: auto* data = reinterpret_cast<uint8_t*>(commonHeader) + sizeof(CommonHeader); |
Also, can be rewrite this: if (len != sizeof(CommonHeader) + sizeof(FeedbackPacket::Header) + sizeof(Header) + (numSsrcs * sizeof(uint32_t))) to this? if (len != sizeof(CommonHeader) + sizeof(FeedbackPacket::Header) + sizeof(FeedbackPacket::Header) + (numSsrcs * sizeof(uint32_t))) Well, honestly no idea what the initial |
What I see is that size_t len = static_cast<size_t>(ntohs(commonHeader->length) + 1) * 4; However, it's never tested whether such a |
Well, I think I may have fixed it. |
…rse() matches the total REMB packet len
The issue is that the code is reading memory out of the given buffer. However it's hard to figure out how to fix it since the constructor does not receive any
len
argument, so no idea how to check it.For you @jmillan.
The text was updated successfully, but these errors were encountered: