Skip to content

Commit 47834d1

Browse files
committed
Discourage use of sanitizers for SUID binaries
Signed-off-by: Thomas Nyman <[email protected]>
1 parent 21937cb commit 47834d1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

docs/Compiler-Hardening-Guides/Compiler-Options-Hardening-Guide-for-C-and-C++.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1133,6 +1133,10 @@ While more efficient compared to dynamic analysis, sanitizers are still prohibit
11331133
11341134
As with all testing practices, sanitizers cannot absolutely prove the absence of bugs. However, when used appropriately and regularly they can help in identifying latent memory, concurrency, and undefined behavior-related bugs which may be difficult to pinpoint.
11351135
1136+
Sanitizers should not be used for hardening in production environments, particularly for Set User ID (SUID) binaries, as they expose operational parameters via environmental variables which can be manipulated to clobber root-owned files and privilege escalation[^Nagy2016].
1137+
1138+
[^Nagy2016]: Nagy , Szabolcs, [Address Sanitizer local root](https://www.openwall.com/lists/oss-security/2016/02/17/9), Openwall mailing list, 2016-02-16.
1139+
11361140
Table 4: Sanitizer options in GCC and Clang.
11371141
11381142
| Compiler Flag | Supported since | Description |

0 commit comments

Comments
 (0)