All Virtuozzo development lists (kernel + QEMU)
 help / color / mirror / Atom feed
* [Devel] [PATCH RK hci-8.0 1/3] ve: downgrade the trusted exec/mmap denial from WARN to pr_warn
@ 2026-11-25 16:48 Konstantin Khorenko
  2026-11-25 16:48 ` [Devel] [PATCH RK hci-8.0 2/3] ve: start the kthreads of a container in its ve namespace Konstantin Khorenko
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Konstantin Khorenko @ 2026-11-25 16:48 UTC (permalink / raw)
  To: Pavel Tikhomirov; +Cc: OpenVZ devel list, Denis V. Lunev

ve_check_trusted_exec()/ve_check_trusted_mmap() protect the host, but
the WARN(1, ...) is too much here:

 * it taints the kernel while this is not a kernel bug which we beed to
   debug and fix
 * the backtrace only shows the exec/mmap path, which is already known
 * on a host booted with panic_on_warn a denied exec takes the host down

The SIGSEGV and the core dump of the offending process are enough to
report and investigate such an attempt. Downgrade the WARN() to
pr_warn(), keeping the message, the rate limiting and the signal.

https://virtuozzo.atlassian.net/browse/VSTOR-147642

Fixes: fc7157b84c32 ("trusted/ve/mmap: Protect from unsecure library load from CT image")
Fixes: cc218b70c6b4 ("trusted/ve/fs/exec: Send SIGSEGV to a process trying to execute untrusted files")
Feature: security/fs: tructed exec feature
Link: http://lore.virtuozzo.com/20260819162513.493543-1-khorenko@virtuozzo.com
Signed-off-by: Konstantin Khorenko <khorenko@virtuozzo.com>

ReadyKernel-specific changes:
The patch was taken as-is without changes.

RK_BUG: VSTOR-157027 VSTOR-157031
RK_CHANGELOG: Do not crash a host with panic_on_warn on a denied exec/mmap.

Signed-off-by: Konstantin Khorenko <khorenko@virtuozzo.com>
---
 kernel/ve/ve.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/kernel/ve/ve.c b/kernel/ve/ve.c
index b2788b80e7655..1a87229966042 100644
--- a/kernel/ve/ve.c
+++ b/kernel/ve/ve.c
@@ -1760,8 +1760,8 @@ bool ve_check_trusted_mmap(struct file *file)
 	if (file->f_path.dentry)
 		filename = file->f_path.dentry->d_name.name;
 
-	WARN(1, "VE0 %s tried to map code from file '%s' from VEX\n",
-			current->comm, filename);
+	pr_warn("VE0 %s tried to map code from file '%s' from VEX\n",
+		current->comm, filename);
 	force_sigsegv(SIGSEGV);
 	return false;
 }
@@ -1780,7 +1780,7 @@ bool ve_check_trusted_exec(struct file *file, struct filename *name)
 	if (!__ratelimit(&sigsegv_rs))
 		return false;
 
-	WARN(1, "VE0's %s tried to execute untrusted file %s from VEX\n",
+	pr_warn("VE0's %s tried to execute untrusted file %s from VEX\n",
 		current->comm, name->name);
 	force_sigsegv(SIGSEGV);
 	return false;
-- 
2.43.0

_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-12-01  0:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-25 16:48 [Devel] [PATCH RK hci-8.0 1/3] ve: downgrade the trusted exec/mmap denial from WARN to pr_warn Konstantin Khorenko
2026-11-25 16:48 ` [Devel] [PATCH RK hci-8.0 2/3] ve: start the kthreads of a container in its ve namespace Konstantin Khorenko
2026-12-01  0:20   ` no-reply
2026-11-25 16:48 ` [Devel] [PATCH RK hci-8.0 3/3] ms/KVM: x86: Unconditionally reset MMU context when emulating INIT Konstantin Khorenko
2026-12-01  0:25   ` no-reply
2026-12-01  0:16 ` [Devel] [PATCH RK hci-8.0 1/3] ve: downgrade the trusted exec/mmap denial from WARN to pr_warn no-reply

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.