-
Notifications
You must be signed in to change notification settings - Fork 4.9k
[release/3.1] Fix Windows AccessViolationException in FileSystemWatcher when monitoring network share for changes #42989
[release/3.1] Fix Windows AccessViolationException in FileSystemWatcher when monitoring network share for changes #42989
Conversation
I have address all the suggestions received in the master PR dotnet/runtime#42419 |
CI failures:
Failure in one System.Runtime.Caching test
|
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 was approved in email on 2020-09-17 and PR feedback has been addressed. The failing check and the remaining check timeouts are unrelated.
@jeffhandley, @carlossanlop Hi Jeff, Carlos, Do you know if it will be in the .Net Core 3.1.9 release that "should" be out in October ? |
@Rayzbam Yes, this fix should be included in the October release. |
@Rayzbam perhaps you could post back here in Oct to confirm it works for you? So we can be sure we are done here. |
@danmosemsft Sure. |
Customer impact
This issue was reported for 3.1 twice:
When monitoring a network share with
FileSystemWatcher
, if there are network issues that could cause the data to arrive malformed, then after casting the byte array to aFILE_NOTIFY_INFORMATION
, attempts to access the struct fields can throw an AV.The 6.0 (master) PR: dotnet/runtime#42419
The 5.0 backport PR: dotnet/runtime#42420
Testing
The issue was also reported internally by one of the customers. Our CSS partner was able to reproduce it locally.
I provided him a private binary of System.IO.FileSystem.Watcher.dll with the changes in this fix, and he confirmed the AV no longer happens.
Risk
Low. We are introducing boundary checks after casting data data coming from a P/Invoke, with the explicit purpose of removing an unexpected AV exception.