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

Fix heap buffer overflow in UsageMonitor #484

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

serebit
Copy link
Member

@serebit serebit commented Oct 21, 2023

Description

The %ms format specifier, when passed to POSIX scanf, allocates the necessary space for the value that it reads into a char**.

Submitter Checklist

  • Squashed commits with git rebase -i (if needed)
  • Built budgie-desktop and verified that the patch worked (if needed)

@serebit serebit added the bug Something isn't working label Oct 21, 2023
@serebit serebit added this to the 10.8.3 milestone Oct 21, 2023
@serebit serebit requested review from JoshStrobl and a team October 21, 2023 18:09
@EbonJaeger
Copy link
Member

How portable is this? It looks like it's an extension done by GNU C, and I don't see any documentation, at least for OpenBSD that supports %m.

@serebit
Copy link
Member Author

serebit commented Oct 22, 2023

Hm... It's not portable. I'll need to figure out how to preallocate the required space, then.

@serebit serebit marked this pull request as draft October 22, 2023 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

2 participants