[compiler-rt] [sanitizer] Disable writes to log files for binaries in a secure context. (PR #92593)
via llvm-commits
llvm-commits at lists.llvm.org
Fri May 17 13:39:01 PDT 2024
================
@@ -104,6 +111,16 @@ void ReportFile::SetReportPath(const char *path) {
}
}
+#ifdef HAS_GETAUXVAL
+ if (getauxval(AT_SECURE) != 0 && path &&
+ internal_strcmp(path, "stderr") != 0 &&
+ internal_strcmp(path, "stdout") != 0) {
+ Report(
+ "ERROR: Permission denied setting log_path for a binary in a secure context. You must run on a same priviledge level\n");
----------------
bigb4ng wrote:
Actually couldn't agree more :)
https://github.com/llvm/llvm-project/pull/92593
More information about the llvm-commits
mailing list