mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2025-11-11 11:08:02 -06:00
Windows Driver: Protect captured subject context during processing of user access token.
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user