From a53ba9ea87a410f323149224b266aeaf2fae36ce Mon Sep 17 00:00:00 2001 From: Shawn Webb Date: Fri, 10 Jun 2022 15:11:31 -0400 Subject: [PATCH] HBSD: Log TPE violations Signed-off-by: Shawn Webb MFC-to: 13-STABLE --- sys/kern/kern_exec.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index 0cf8841a14b9..917e613d0cd4 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -550,6 +550,10 @@ interpret: #ifdef PAX error = pax_enforce_tpe(td, imgp->vp, imgp->execpath); if (error) { + pax_log_internal(td->td_proc, + PAX_LOG_P_COMM | PAX_LOG_NO_P_PAX, + "uid=%u,gid=%u: TPE violation", + td->td_ucred->cr_uid, td->td_ucred->cr_gid); goto exec_fail_dealloc; } #endif