Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results

Sept/Oct 2019 Issue of The NT Insider available


Download PDF here: http://insider.osr.com/2019/ntinsider_2019_01.pdf

It’s a particularly BIG issue, too: 40 pages of technical goodness, ranging from WDF to Minifilters. Check it out.
Before Posting...
Please check out the Community Guidelines in the Announcements and Administration Category.

corruption in Save as tif LZW image file to jpeg file

m_sldm_sld Member - All Emails Posts: 25
edited August 3 in NTFSD

Hi,
I want to save as a tif LZW file to jpg file via mspaint application. In case we have small image file or tiff file without LZW compress method, there isn't any problem.
I use STATUS_REPARSE in my driver code to create reparsed file per sensitive original file(sensitive file detected via it's signature) and when i get SetRenameInformation request over reparsed file, I get ACCESS_DENIED. Then save as result is a dialog with error message ("Paint cannot save this file. Save was interrupted.")
In fact when i load my driver in file system, save as tif lzw to jpg, creates multiple .TMP files in Temp location of windows, then try to rename between them and rename to reparsed file(reparsed file is a fake file of original file that created by irp-create on original file. fake file has a handle of original file).
without driver there is only one .TMP file in temp of windows.

what's your solution about this bug?

there is two flags in FILE_RENAME_INFORMATION structure:
-FILE_RENAME_REPLACE_IF_EXISTS
-FILE_RENAME_POSIX_SEMANTICS
that covers this problem in win10:
https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/content/ntifs/ns-ntifs-_file_rename_information

there is same solution for windows 8.1 x64?

Post edited by m_sld on
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Upcoming OSR Seminars
Writing WDF Drivers 21 Oct 2019 OSR Seminar Space & ONLINE
Internals & Software Drivers 18 Nov 2019 Dulles, VA
Kernel Debugging 30 Mar 2020 OSR Seminar Space
Developing Minifilters 27 Apr 2020 OSR Seminar Space & ONLINE