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
Increase PFCP buffer size and update go-pfcp
#366
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pudelkoM
force-pushed
the
pfcp-read-buf-size
branch
3 times, most recently
from
December 1, 2021 23:06
b8ed5eb
to
e2f03a3
Compare
pudelkoM
commented
Dec 1, 2021
pudelkoM
force-pushed
the
pfcp-read-buf-size
branch
2 times, most recently
from
December 2, 2021 00:07
93a98e9
to
14f75c3
Compare
Managed to reproduce the crash in a small test, see latest commit:
Probably because of a missing range check here: https://github.com/omec-project/upf-epc/blob/a6b6a4e29cc56c902cf7ca03b10a7d01f9cd98ae/pfcpiface/vendor/github.com/wmnsk/go-pfcp/ie/ie.go#L367 I don't think this is fixable here, the library needs to be updated. |
pudelkoM
changed the title
Increase PFCP buffer size and check for message truncation
Increase PFCP buffer size
Dec 2, 2021
pudelkoM
commented
Dec 2, 2021
krsna1729
previously approved these changes
Dec 2, 2021
pudelkoM
force-pushed
the
pfcp-read-buf-size
branch
from
December 2, 2021 03:08
2149f38
to
4d4d591
Compare
pudelkoM
force-pushed
the
pfcp-read-buf-size
branch
from
December 2, 2021 03:08
4d4d591
to
8d58f57
Compare
krsna1729
previously approved these changes
Dec 2, 2021
pudelkoM
changed the title
Increase PFCP buffer size
Increase PFCP buffer size and update Dec 2, 2021
go-pfcp
I got confirmation from QA team that this fix prevents the original crash. |
krsna1729
approved these changes
Dec 3, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We observed a pfcp agent crash when PFCP messages are larger than a certain size. The UDP receive buffer is too small and causes the message to be truncated.
Then, the library code reads beyond the buffer and causes the panic seen below:
The proposed solution is to increase the buffer size to
4096
and check the PFCP header length field. The length check for IE parsing needs to happen inpfcp-go
.