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


Before Posting...

Please check out the Community Guidelines in the Announcements and Administration Category.

More Info on Driver Writing and Debugging

The free OSR Learning Library has more than 50 articles on a wide variety of topics about writing and debugging device drivers and Minifilters. From introductory level to advanced. All the articles have been recently reviewed and updated, and are written using the clear and definitive style you've come to expect from OSR over the years.

Check out The OSR Learning Library at:

Bug in Windows Sandbox? Blue screen crash

Doug_NDoug_N Member - All Emails Posts: 105
edited March 2021 in NTFSD

I'm always suspicious when someone claims a bug in Windows, but as far as I can tell, this code meets all documented requirements. If I'm wrong, please show me.

This minifilter code has worked for many years, but as soon as a Windows 10 computer starts Windows Sandbox, a page fault happens.

PostOperationCallback(PFLT_CALLBACK_DATA Data...)
    case IRP_MJ_CREATE:
            PECP_LIST EcpList = NULL;
            if (KeGetCurrentIrql() <= APC_LEVEL)
                NTSTATUS status = FltGetEcpListFromCallbackData(Filter, Data, &EcpList);
                if((STATUS_SUCCESS == status) && (NULL != EcpList))
                    SRV_OPEN_ECP_CONTEXT* pEcpContext = NULL;
                    ULONG EcpContextSize = 0;
                    status = FltFindExtraCreateParameter(Filter, EcpList, &GUID_ECP_SRV_OPEN, (void*)&pEcpContext, &EcpContextSize);
                    if((STATUS_SUCCESS == status) && (NULL != pEcpContext))
                        if(NULL != pEcpContext->SocketAddress)
                            switch(pEcpContext->SocketAddress->ss_family)   <---- causes page fault

I'm assuming the SocketAddress is paged out in this specific case, but only when Windows Sandbox is running?

Post edited by Scott_Noone_(OSR) on


  • Scott_Noone_(OSR)Scott_Noone_(OSR) Administrator Posts: 3,514

    I edited your post to format the code properly...

    What does the !analyze -v say? Also, the output of:

    ?? pEcpContext

    Would be interesting.


  • Doug_NDoug_N Member - All Emails Posts: 105

    Thanks for the tip Scott.

    ?? pEcpContext
    struct _SRV_OPEN_ECP_CONTEXT * 0xffff818479791158 +0x000 ShareName : 0xffffa28ddeab5658 _UNICODE_STRING "VSMBShare"
    +0x008 SocketAddress : (null)
    +0x010 OplockBlockState : 0 ''
    +0x011 OplockAppState : 0 ''
    +0x012 OplockFinalState : 0 ''

    There is no way that code is crashing with this structure. The customer has to somehow be using the wrong driver because SocketAddress is checked for NULL (there was indeed an earlier bug where it wasn’t checked. Only in the Sandbox have we ever seen it to be null).

    Sorry for the false alarm ☹


    P.S. How did you reformat the code? I couldn't see a way to do it (looked at the Markdown link)

  • Peter_Viscarola_(OSR)Peter_Viscarola_(OSR) Administrator Posts: 9,020

    @Doug_N That link in the forum doesn’t provide much help, does it. Why do they point to something with almost no content? I don’t know.

    ANYhow... formatting code can be done in multiple ways, but most easily with what are called fenced code blocks.

    Hope that helps,


    Peter Viscarola

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. Sign in or register to get started.

Upcoming OSR Seminars
OSR has suspended in-person seminars due to the Covid-19 outbreak. But, don't miss your training! Attend via the internet instead!
Writing WDF Drivers 12 September 2022 Live, Online
Internals & Software Drivers 23 October 2022 Live, Online
Kernel Debugging 14 November 2022 Live, Online
Developing Minifilters 5 December 2022 Live, Online