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

Dangling AVP references in readerBufferPool #164

Open
jefftt opened this issue Nov 28, 2021 · 0 comments · May be fixed by #165
Open

Dangling AVP references in readerBufferPool #164

jefftt opened this issue Nov 28, 2021 · 0 comments · May be fixed by #165

Comments

@jefftt
Copy link

jefftt commented Nov 28, 2021

It is possible for AVPs to be overwritten or their memory dropped while still being processed, if the underlying readerBuffer is reused or the underlying sync.Pool removes it respectively. This is because for some avp datatypes are references into the original buffer, and the original buffer is reset and put back into the readerBufferPool right after the message is decoded [ref].

Affected datatypes are:

  • Address
  • Grouped
  • Ipv4
  • Ipv6
  • Unknown

Quick fix would be just to copy out of the original read buffers for these types

@jefftt jefftt linked a pull request Nov 29, 2021 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant