Giter Club home page Giter Club logo

Comments (2)

zeHibou avatar zeHibou commented on September 22, 2024

It seems the issue lies in FsFilter::FSEntrySetFileName

hr = FltGetDiskDeviceObject(Volume, &devObject);
if (!NT_SUCCESS(hr)) {
	return hr;
}
hr = IoVolumeDeviceToDosName(devObject, &volumeData);

The ntddk doc says: Starting with Windows Vista, you must ensure that APCs are not disabled before calling this routine. The KeAreAllApcsDisabled routine can be used to verify that APCs are not disabled.

Indeed, if I check it like that, it seems to work perfectly:

hr = FltGetDiskDeviceObject(Volume, &devObject);
if (!NT_SUCCESS(hr)) {
	return hr;
}
if (KeAreAllApcsDisabled()) {
	return hr;
}
hr = IoVolumeDeviceToDosName(devObject, &volumeData);

Not sure it's the good way to do it though.

from ransomwatch.

RafWu avatar RafWu commented on September 22, 2024

A better solution would be to store Volume names to associate the volume from which the file was taken, that way there will be no need to check the name for every callback.
READ and WRITE FS callbacks might be called in high IRQL like you witnessed.
The solution you suggested limits the driver ability to detect file changes, some I/O might be ignored because of the high IRQL.

The issue might also occur if the driver didn't call FltDoCompletionProcessingWhenSafe on I/O which needs further validation from the driver after completing the operation (CREATE and READ).

Ensuring that Completion Processing is Performed at Safe IRQL

from ransomwatch.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.