]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
gkdi.idl: Verify magic numbers of pulled GKDI structures
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Tue, 12 Dec 2023 05:27:46 +0000 (18:27 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 21 Dec 2023 20:21:34 +0000 (20:21 +0000)
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
librpc/idl/gkdi.idl

index 29769919d466b2ebc4cccd2951823c1a25571d03..e57e95b6c6e22d84f1e07dacbf53901cc97baf6e 100644 (file)
@@ -36,7 +36,7 @@ interface gkdi
         */
        typedef [public] struct {
                uint32 version;
-               [value(0x4b53444b)] uint32 magic; /* ‘KDSK’ */
+               [value(0x4b53444b), range(0x4b53444b, 0x4b53444b)] uint32 magic; /* ‘KDSK’ */
                EnvelopeFlags flags;
                uint32 l0_index;
                [range(0, 31)] uint32 l1_index;
@@ -57,7 +57,7 @@ interface gkdi
 
        typedef [public] struct {
                uint32 version; /* The version (msKds-Version) of the root key ADM element. */
-               [value(0x4b53444b)] uint32 magic; /* ‘KDSK’ */
+               [value(0x4b53444b), range(0x4b53444b, 0x4b53444b)] uint32 magic; /* ‘KDSK’ */
                EnvelopeFlags flags;
                uint32 l0_index;
                [range(0, 31)] uint32 l1_index;
@@ -98,7 +98,7 @@ interface gkdi
                 * ‘key_length’ bytes each.
                 */
                [value(12 + 2 * key_length)] uint32 length;
-               [value(0x4d504844)] uint32 magic; /* ‘DHPM’ */
+               [value(0x4d504844), range(0x4d504844, 0x4d504844)] uint32 magic; /* ‘DHPM’ */
                uint32 key_length;
                uint8 field_order[key_length];
                uint8 generator[key_length];