From 81a4d8344baf29e18ae21735fde3384c334491a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20S=C5=82abo=C5=84?= Date: Wed, 18 Jun 2025 23:55:27 +0200 Subject: [PATCH] [NTOS:SE] SeValidSecurityDescriptor: Use relative security descriptor header size for length calculation (#8127) Fixes Win2k3 ntfs.sys on x64 --- ntoskrnl/se/sd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ntoskrnl/se/sd.c b/ntoskrnl/se/sd.c index 26f61510482..3c967b1c786 100644 --- a/ntoskrnl/se/sd.c +++ b/ntoskrnl/se/sd.c @@ -1035,7 +1035,7 @@ SeValidSecurityDescriptor( if (Length < SECURITY_DESCRIPTOR_MIN_LENGTH) { - DPRINT1("Invalid Security Descriptor revision\n"); + DPRINT1("Invalid Security Descriptor length\n"); return FALSE; } @@ -1051,7 +1051,7 @@ SeValidSecurityDescriptor( return FALSE; } - SdLength = sizeof(SECURITY_DESCRIPTOR); + SdLength = sizeof(*SecurityDescriptor); /* Check Owner SID */ if (!SecurityDescriptor->Owner)