The posted code makes no sense and should not even compile because you are using
REPLY_MESSAGE_STRUCT
variables before they have been declared at both sides.
The size calculation is also wrong because you are adding the size of the whole reply structure instead that of the components:
ULONG replySize = ((ULONG)sizeof(replyBuffer.header)) + ((ULONG)sizeof(replyBuffer));
It must be
ULONG replySize = sizeof(replyBuffer.header) + sizeof(replyBuffer.passFlag);
or
ULONG replySize = sizeof(FILTER_REPLY_HEADER) + sizeof(int);
You should also always initialise all required fields of structures:
replyMessage.header.Status = 0;
replyMessage.header.MessageId = messageFromKernel.header.MessageId;
replyMessage.passFlag = 1;
This might still not solve your problem but will avoid at least other problems that arise later.
I have not used such filters so far. So I can't help more. But you should read the Microsoft documentation about these filters and the used functions. It might be also helpful for searching the web for example code to see how other's have it done.