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

Packet data size can be larger than packet size #5

Open
eepp opened this issue Mar 26, 2016 · 0 comments
Open

Packet data size can be larger than packet size #5

eepp opened this issue Mar 26, 2016 · 0 comments
Labels

Comments

@eepp
Copy link
Member

eepp commented Mar 26, 2016

The packet size is not checked before writing the initial packet header and packet context data. This can lead to a buffer overflow if the total initial packet data is larger than the given packet size.

The event's two-phase reserve/serialize logic should also be applied to the stream packet opening function. The PREFIX_STREAM_open_packet() function could leave the packet_is_open flag set to 0 in the stream context when it fails to reserve space, which would then be checked by _reserve_event_space(): if the packet is not open after calling cbs.open_packet(), then we discard this event. The next trace event function should try to open it again, again discarding the event if it still cannot be opened.

@eepp eepp added the bug label Mar 26, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant