mirror of
https://github.com/veracrypt/VeraCrypt
synced 2024-11-28 14:03:29 +01:00
Windows Driver: Protect captured subject context during processing of user access token.
This commit is contained in:
parent
2f2cb6b7ae
commit
dc6c279339
@ -2653,6 +2653,7 @@ NTSTATUS MountDevice (PDEVICE_OBJECT DeviceObject, MOUNT_STRUCT *mount)
|
||||
PACCESS_TOKEN accessToken;
|
||||
|
||||
SeCaptureSubjectContext (&subContext);
|
||||
SeLockSubjectContext(&subContext);
|
||||
accessToken = SeQuerySubjectContextToken (&subContext);
|
||||
|
||||
if (!accessToken)
|
||||
@ -2678,6 +2679,7 @@ NTSTATUS MountDevice (PDEVICE_OBJECT DeviceObject, MOUNT_STRUCT *mount)
|
||||
}
|
||||
}
|
||||
|
||||
SeUnlockSubjectContext(&subContext);
|
||||
SeReleaseSubjectContext (&subContext);
|
||||
|
||||
if (NT_SUCCESS (ntStatus))
|
||||
|
Loading…
Reference in New Issue
Block a user