-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[Winlogbeat] Don't trust returned bufferUsed in FormatEventString #34005
Conversation
A panic was observed on Windows 2022 after using the returned bufferUsed value to index into the buffer allocated on the Winlogbeat side. The returned value was larger than the buffer. We saw a similar issue previously on elastic#32469 and we the fix here is similar. I have also done some refactoring to remove the usage of the "render buffer". Instead of requiring callers to pass in a buffer we will use a buffer obtained from a sync.Pool.
7bc897e
to
65b28c3
Compare
This pull request does not have a backport label.
To fixup this pull request, you need to add the backport labels for the needed
|
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
💔 Tests Failed
Expand to view the summary
Build stats
Test stats 🧪
Test errorsExpand to view the tests failures> Show only the first 10 test failures
|
This pull request is now in conflicts. Could you fix it? 🙏
|
What does this PR do?
A panic was observed on Windows 2022 after using the returned bufferUsed value to index into the buffer allocated on the Winlogbeat side. The returned value was larger than the buffer. We saw a similar issue previously on #32469 and we the fix here is similar.
I have also done some refactoring to remove the usage of the "render buffer". Instead of requiring callers to pass in a buffer we will use a buffer obtained from a sync.Pool.
Why is it important?
Fixes a panic. Makes the code simpler.
Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.Related issues