-
Notifications
You must be signed in to change notification settings - Fork 15.7k
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: crash parsing CLSID in shell.readShortcutLink #45195
base: main
Are you sure you want to change the base?
Conversation
💖 Thanks for opening this pull request! 💖 Semantic PR titlesWe use semantic commit messages to streamline the release process. Before your pull request can be merged, you should update your pull request title to start with a semantic prefix. Examples of commit messages with semantic prefixes:
Commit signingThis repo enforces commit signatures for all incoming PRs. PR tipsThings that will help get your PR across the finish line:
We get a lot of pull requests on this repo, so please be patient and we will get back to you as soon as we can. |
Here is an upstream CL: https://chromium-review.googlesource.com/c/chromium/src/+/6172220 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hi @dlon - could you please describe the fix in the PR body as well?
@codebytere done! |
7fdf303
to
7fed754
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks familiar but I can't find the PR this reminds me of. 🤔 @dlon, is this a new iteration of another change?
Approving since the change LGTM. Also I appreciate that you're submitting the change upstream too. The best way to fix this in Electron is for the fix to land in Chromium and we pick it up automatically + cherry-pick the Chromium fix to older versions of Electron
patches/chromium/parse_pkey_appusermodel_toastactivatorclsid_as_string_uuid.patch
Outdated
Show resolved
Hide resolved
It seems like upstream maintainers are reluctant to accept the patch, since they don't intend this to be a generic shortcut parser. Maybe it must remain a patch? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given we prefer to hew to upstream where possible - I don't think this passes the bar to be an indefinitely floated patch per our patch policy. It looks like upstream is willing to mitigate the crash, so adding that patch here would be fine by me but beyond that I think we should look to either document the issue or attempt mitigation within Electron's own codebase.
The suggested upstream fix (suppressing As far as mitigating this within Electron, can it be done? One possible way is to implement the parser in Electron instead of using chromium for this. |
@dlon yes - as of now i think it's fine for us to mitigate the crash at cost of |
7fed754
to
e947752
Compare
I've pushed the smaller upstream "fix". Also a check to prevent it from reading garbage as the field isn't zero-initialized. |
Description of Change
Close #45166.
Shortcuts may store the
PKEY_AppUserModel_ToastActivatorCLSID
property as a string CLSID/UUID as opposed toVT_CLSID
(i.e., bytes), resulting inNOTREACHED
being hit. This PR adds support forVT_BSTR
andVT_LPWSTR
, and handles cases with and without braces around the ID.Upstream CL: https://chromium-review.googlesource.com/c/chromium/src/+/6172220
Checklist
npm test
passesRelease Notes
Notes: fixed a crash caused by some
PKEY_AppUserModel_ToastActivatorCLSID
being represented by a string uuid rather than bytes