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

[release/8.0-staging] Workaround bug in EvtFormatMessage #105762

Merged

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Jul 31, 2024

Backport of #105636 to release/8.0-staging

/cc @ericstj

Customer Impact

  • Customer reported
  • Found internally

Customer reading EventLog records encounters a crash. No way to predict the crash or workaround it (it's an AV, not a managed exception).

Root cause is a misbehaving windows API that writes \0 to a buffer even when it's NULL and zero length. We'll workaround this by giving the API a small buffer to write a single character to.

Regression

  • Yes
  • No

Regressed in 6.0 with #61990. That change removed the use of StringBuilder, which was previously providing a default buffer of length 16, even when we told the API it was 0 length.

Testing

Manually verified with customer provided data.

Risk

Low - we're adding back a small buffer to receive a copied null value. Should Windows fix this bug in a future version, we'll still be OK with the workaround we've added.

@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Jul 31, 2024
@ericstj ericstj added Servicing-consider Issue for next servicing release review area-System.Diagnostics.EventLog and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Jul 31, 2024
@rbhanda rbhanda added this to the 8.0.9 milestone Aug 1, 2024
@rbhanda rbhanda added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Aug 1, 2024
@carlossanlop carlossanlop merged commit 9de0921 into release/8.0-staging Aug 12, 2024
88 of 115 checks passed
@carlossanlop carlossanlop deleted the backport/pr-105636-to-release/8.0-staging branch August 12, 2024 23:15
@github-actions github-actions bot locked and limited conversation to collaborators Sep 12, 2024
@rbhanda rbhanda modified the milestones: 8.0.9, 8.0.10 Oct 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants