fix: resolve heap-use-after-free in NoteListView on exit (#732)#772
Open
bomlinux92-byte wants to merge 1 commit into
Open
fix: resolve heap-use-after-free in NoteListView on exit (#732)#772bomlinux92-byte wants to merge 1 commit into
bomlinux92-byte wants to merge 1 commit into
Conversation
Root cause: - NoteListDelegateEditor destructor calls unsetEditorWidget(m_id, nullptr) - unsetEditorWidget was accessing m_openedEditor using operator[] which can cause detachment and re-allocation during destruction - closeAllEditor() was called after model() might already be destroyed Fix: - Skip nullptr removal in unsetEditorWidget (no-op anyway) - Use iterator-based access instead of operator[] to avoid detachment - Add model() validity check in closeAllEditor() before iterating - Clear m_openedEditor early if model is already destroyed
Collaborator
|
Did you run it with asan to verify it's fixed? |
Collaborator
|
Also what's this? 😆
There's also no bug bounty attached to this issue. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix for [BUG BOUNTY] heap-use-after-free in NoteListView on exit — Issue #732
Root cause
When the application exits, destructor calls . The problem:
Fix
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT since removing from a list is always a no-op
Verification
Closes #732