All Virtuozzo development lists (kernel + QEMU)
 help / color / mirror / Atom feed
From: Konstantin Khorenko <khorenko@virtuozzo.com>
To: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
Cc: OpenVZ devel list <devel@openvz.org>,
	"Denis V. Lunev" <den@virtuozzo.com>
Subject: [Devel] [PATCH RK hci-8.0 1/3] ve: downgrade the trusted exec/mmap denial from WARN to pr_warn
Date: Wed, 25 Nov 2026 17:48:00 +0100	[thread overview]
Message-ID: <20261125164802.402895-1-khorenko@virtuozzo.com> (raw)

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

             reply	other threads:[~2026-11-25 16:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-25 16:48 Konstantin Khorenko [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261125164802.402895-1-khorenko@virtuozzo.com \
    --to=khorenko@virtuozzo.com \
    --cc=den@virtuozzo.com \
    --cc=devel@openvz.org \
    --cc=ptikhomirov@virtuozzo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.