Bug 457909

Summary: UAF crash with kinetic scrolling
Product: [Applications] krita Reporter: Alvin Wong <alvin>
Component: GeneralAssignee: Alvin Wong <alvin>
Status: ASSIGNED ---    
Severity: normal    
Priority: NOR    
Version First Reported In: git master (please specify the git hash!)   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: ASAN log

Description Alvin Wong 2022-08-15 11:18:20 UTC
Created attachment 151335 [details]
ASAN log

SUMMARY
Kinetic scroller may cause a crash when the cursor moves into and out of the scrollbars at the wrong time.


STEPS TO REPRODUCE
1. Enable kinetic scrolling with left click
2. Have a recent document with an autosave backup
3. Open this recent document from the recent document list on the welcome widget
4. Quickly move the cursor onto the scrollbar before the autosave restore dialog appears
5. When the autosave restore dialog appears, click on cancel

OBSERVED RESULT
Crash.

EXPECTED RESULT
Nothing weird should happen.

SOFTWARE/OS VERSIONS
Windows: 10

ADDITIONAL INFORMATION
Reproduced on ASAN build of 716923c