EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Access violation in CBFS with '/' or '\' symbol in wildcard mask

Also by EldoS: CallbackRegistry
A component to monitor and control Windows registry access and create virtual registry keys.
#25525
Posted: 07/03/2013 10:26:20
by Dmitry Novikov (Standard support level)
Joined: 03/11/2013
Posts: 6

Hi!

Executing certain shell commands with '/' or '\' symbol in wildcard mask on mounted CBFS drive leads to access violation exception inside CBFS:

dir "*/"
dir "/*/"
for /R %a in (*/) do echo %a
for /R %a in (/*/) do echo %a
#25532
Posted: 07/04/2013 03:23:14
by Volodymyr Zinin (EldoS Corp.)

Hello Dmitry,

Please specify version of Windows and type of CallbackFS API (.NET, C++, Delphi, or Java) you are using.
And whether the problem is reproducible with the Mapper sample.

Thanks.
#25559
Posted: 07/08/2013 03:49:51
by Dmitry Novikov (Standard support level)
Joined: 03/11/2013
Posts: 6

Hello Vladimir,

It's Windows 7, C++. And we reproduced the problem with the Mapper sample.

Thanks.
#25561
Posted: 07/08/2013 05:06:29
by Volodymyr Zinin (EldoS Corp.)

Still can't reproduce the problem. Sorry, but I forgot to ask what version of CallbackFS are you using (I've checked with the latest 4.0.136 build)?

Thank you.
#25563
Posted: 07/08/2013 05:12:33
by Volodymyr Zinin (EldoS Corp.)

And could you specify a detailed description how to reproduce it? I have done the following, but without success (i.e. I didn't obtain any error):
1. By the use of the unmodified C++ Mapper sample I created a virtual disk with a drive letter "Z:".
2. Ran "cmd.exe".
3. In the cmd console called "Z:" and then the commands you had specified in the first message.
#25590
Posted: 07/09/2013 11:03:29
by Dmitry Novikov (Standard support level)
Joined: 03/11/2013
Posts: 6

Hi Vladimir,

Another guy tried it, I did not have SDK installed. Driver version was 4.0.135.22.

Now I've downloaded version 4.0.136.25 with SDK and doublechecked it.

I still have crash executing "for /R %a in (*/) do echo %a" on a drive mounted by Mapper sample (dir commands work without exceptions for me).

With CBFS sources I see deeper: inside CbFsUcbGetFileAttributes() implementation CbFsUcbGetFileAttrRequestGetUserModeParentFcb() returns NULL which is passed to CbFsIsDirectoryEmptyCB() as the second parameter where it is tried to be dereferenced.

Code
BOOL
CbFsUcbGetFileAttributes(
    IN PCBFSLIB_VCB Vcb,
    IN OUT PUCB_REQUEST_PARAMETERS Params
    )
{
    ...    
    ParentDcb = (PCBFSLIB_FCB) CbFsUcbGetFileAttrRequestGetUserModeParentFcb(Params);
    ...
        LastError = CbFsIsDirectoryEmptyCB( Vcb, ParentDcb );
    ...
}


Worker's stack:

Quote
CbFsIsDirectoryEmptyCB(CBFSLIB_VCB * Vcb=0x033c5e08, CBFSLIB_FCB * Fcb=0x00000000)
CbFsUcbGetFileAttributes(CBFSLIB_VCB * Vcb=0x033c5e08, _UCB_REQUEST_PARAMETERS * Params=0x03396a50)
CbFsUcbRequest(_UCB_WORKER * Worker=0x0338fbd8, void * UserContext=0x033c5e08, _UCB_REQUEST_PARAMETERS * Params=0x03396a50)
UcbWorkerThreadProc(_UCB_WORKER * Worker=0x0338fbd8, _UCB_REQUEST * Request=0x03396a40)
UcbSWorkerThreadProc(void * lpParameter=0x033c4908)


Thank you!
#25605
Posted: 07/10/2013 03:55:47
by Volodymyr Zinin (EldoS Corp.)

Moved to HelpDesk for further investigation.
Also by EldoS: CallbackFilter
A component to monitor and control disk activity, track file and directory operations (create, read, write, rename etc.), alter file data, encrypt files, create virtual files.

Reply

Statistics

Topic viewed 1871 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!