microsoft / microsoft/PixEvents

PIX event decoder attempts to modify constant memory

Open
#4 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
104
Forks
14
PR merge metrics
No merged PRs in 30d

Description

Describe the bug
The PIX event decoder attempts to modify constant memory.

To Reproduce
See https://github.com/microsoft/PixEvents/blob/3a7e70dde7bf54f02f9d2e9dd6d3350c6cfb962f/decoder/lib/EventReading.cpp#L218

Expected behavior
When this code needs to make a not-null-terminated string into a null-terminated string, it needs to copy the input into a buffer that is explicitly allocated as modifiable, and is guaranteed to be large enough to include the null terminator.

Actual behavior
If a static const pointer to a not-null-terminated string is passed into the decoder API, the decoder can crash.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at decoder/lib/EventReading.cpp line 218 and inspect how a non-null-terminated string is handled. Reproduce the issue with a static const input, then verify that the decoder uses writable storage large enough for the null terminator and no longer crashes.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.