[Winlogbeat] Don't trust returned bufferUsed in FormatEventString#34005
[Winlogbeat] Don't trust returned bufferUsed in FormatEventString#34005andrewkroh wants to merge 1 commit intoelastic:mainfrom
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!
|
💔 Tests Failed
Expand to view the summary
Build stats
Test stats 🧪
Test errors
Expand 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.asciidocorCHANGELOG-developer.next.asciidoc.Related issues