mirror of
https://github.com/winfsp/winfsp.git
synced 2025-04-22 16:33:02 -05:00
sys: FspVolumeTransactFsext:
- only allow ControlCodes with 0xC00 bits set in Function
This commit is contained in:
parent
f5fde4c0bb
commit
804bcc3354
@ -94,12 +94,13 @@ static NTSTATUS FspFsctlFileSystemControl(
|
||||
if (0 != IrpSp->FileObject->FsContext2)
|
||||
Result = FspVolumeStop(FsctlDeviceObject, Irp, IrpSp);
|
||||
break;
|
||||
case 0:
|
||||
/* ensure that 0 != IrpSp->Parameters.FileSystemControl.FsControlCode in default: case */
|
||||
break;
|
||||
default:
|
||||
if (0 != IrpSp->FileObject->FsContext2)
|
||||
Result = FspVolumeTransactFsext(FsctlDeviceObject, Irp, IrpSp);
|
||||
if (CTL_CODE(0, 0xC00, 0, 0) ==
|
||||
(IrpSp->Parameters.FileSystemControl.FsControlCode & CTL_CODE(0, 0xC00, 0, 0)))
|
||||
{
|
||||
if (0 != IrpSp->FileObject->FsContext2)
|
||||
Result = FspVolumeTransactFsext(FsctlDeviceObject, Irp, IrpSp);
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
@ -924,6 +924,8 @@ NTSTATUS FspVolumeTransactFsext(
|
||||
|
||||
ASSERT(IRP_MJ_FILE_SYSTEM_CONTROL == IrpSp->MajorFunction);
|
||||
ASSERT(IRP_MN_USER_FS_REQUEST == IrpSp->MinorFunction);
|
||||
ASSERT(CTL_CODE(0, 0xC00, 0, 0) ==
|
||||
(IrpSp->Parameters.FileSystemControl.FsControlCode & CTL_CODE(0, 0xC00, 0, 0)));
|
||||
ASSERT(0 != IrpSp->FileObject->FsContext2);
|
||||
|
||||
PDEVICE_OBJECT FsvolDeviceObject = IrpSp->FileObject->FsContext2;
|
||||
|
Loading…
x
Reference in New Issue
Block a user