Skip to content

Commit 918f61e

Browse files
Updated C6248 (#4436)
* Updated C6248 Matched wording and format to my other PRs * Updated C6248 Used contractions per Acrolinx's mandate * Updated C6248 Using new formatting as discussed with Colin. Added PREfast name for warning. * Update docs/code-quality/c6248.md Co-authored-by: Michael Squires <[email protected]> * Updated C6248 Changed the ms.date and PREfast->code analysis Co-authored-by: Michael Squires <[email protected]>
1 parent bd6f0bd commit 918f61e

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

docs/code-quality/c6248.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
---
22
description: "Learn more about: C6248"
33
title: C6248
4-
ms.date: 11/04/2016
4+
ms.date: 08/16/2022
55
ms.topic: reference
6-
f1_keywords: ["C6248"]
6+
f1_keywords: ["C6248", "__WARNING_CREATINGNULLDACL", "CREATINGNULLDACL"]
77
helpviewer_keywords: ["C6248"]
88
ms.assetid: 75743622-7a79-4fe8-81b9-dbdfa1a12f3d
99
---
10-
# C6248
10+
# Warning C6248
1111

12-
> warning C6248: setting a SECURITY_DESCRIPTOR's DACL to NULL will result in an unprotected object
12+
> Setting a SECURITY_DESCRIPTOR's DACL to NULL will result in an unprotected object.
1313
14-
This warning identifies a call that sets a SECURITY_DESCRIPTOR's DACL field to null. If the DACL that belongs to the security descriptor of an object is set to NULL, a null DACL is created. A null DACL grants full access to any user who requests it; normal security checking is not performed with respect to the object. A null DACL should not be confused with an empty DACL. An empty DACL is a properly allocated and initialized DACL that contains no ACEs. An empty DACL grants no access to the object it is assigned to.
14+
## Remarks
1515

16-
Objects that have null DACLs can have their security descriptors altered by malicious users so that no one has access to the object.
16+
If the DACL that belongs to the security descriptor of an object is set to NULL, a null DACL is created. A null DACL grants full access to any user who requests it; normal security checking isn't performed with respect to the object. A null DACL shouldn't be confused with an empty DACL. An empty DACL is a properly allocated and initialized DACL that contains no ACEs. An empty DACL grants no access to the object it's assigned to. Objects that have null DACLs can have their security descriptors altered by malicious users, making it so that no one has access to the object. Even in a situation where everyone needs access to an object, only administrators should be able to alter that object's security. If only the creator needs access to an object, a DACL shouldn't be set on the object; the system will choose an appropriate default.
1717

18-
Even if everyone needs access to an object, the object should be secured so that only administrators can alter its security. If only the creator needs access to an object, a DACL should not be set on the object; the system will choose an appropriate default.
18+
Code analysis name: CREATINGNULLDACL
1919

2020
## Example
2121

@@ -36,4 +36,4 @@ void f( PSECURITY_DESCRIPTOR pSecurityDescriptor )
3636
}
3737
```
3838
39-
To see a complete example on how to create security descriptor, see [Creating a Security Descriptor for a New Object in C++](/windows/desktop/SecAuthZ/creating-a-security-descriptor-for-a-new-object-in-c--). For more information, see [Creating a DACL](/windows/desktop/SecBP/creating-a-dacl).
39+
To see a complete example on how to create security descriptor, see [Creating a Security Descriptor for a New Object in C++](/windows/desktop/SecAuthZ/creating-a-security-descriptor-for-a-new-object-in-c--). For more information on creating DACLs, see [Creating a DACL](/windows/desktop/SecBP/creating-a-dacl).

0 commit comments

Comments
 (0)