From nobody Tue Apr 7 09:18:43 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 733B23DEAE5 for ; Fri, 13 Mar 2026 18:57:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773428261; cv=none; b=juaTezxd+nsBo26ggG/c/NeAhclg/s66+HbfpEDY6ihfJ8og/oUW5zhUDa9n2qajiwU9JFs9us0eoQx4FPHmH9CwTWmRdaWN6ZxcwKQcWe6+GFjzhL/2nV/NHHMTdRPzoWzKLiXUOTbnyvD+LkG1VcAKBL0MUIyOhuvjEexFXTw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773428261; c=relaxed/simple; bh=wa0UjKj6xaa+aw5xxnpHs1qF5adrHNvyUTwlFfkpF74=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=kFP3M5GZUG/Y4rc8FST0uBu2p5Ua90KXvJ3B5+B1Azj8Urv4ACLZOfm6jfbf9DeAXNhJq1Lrw0RriCY3YCt40Clid2BJ4R7lRshap5NlSwUNbMK3TRXDKja/4KQuy+Iz5ZYkOa0EJSgmIm3UatcrY1Ozd2JUSaiZJyEu2eFmcLA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 37652C19421; Fri, 13 Mar 2026 18:57:41 +0000 (UTC) From: Joseph Salisbury To: Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot Cc: Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Valentin Schneider , linux-kernel@vger.kernel.org Subject: [PATCH] sched/core: validate sched_proxy_exec bootarg format Date: Fri, 13 Mar 2026 14:57:40 -0400 Message-ID: <20260313185740.1000298-1-joseph.salisbury@oracle.com> X-Mailer: git-send-email 2.47.3 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" setup_proxy_exec() currently accepts any non-empty suffix and parses str + 1, even when the boot argument does not contain '=3D'. Because __setup("sched_proxy_exec", ...) matches by prefix, malformed tokens can reach setup_proxy_exec() without an '=3D' and be interpreted from the wrong offset instead of being rejected. Require either an empty suffix or an explicit '=3Dbool' suffix before calling kstrtobool(). Fixes: 25c411fce735 ("sched: Add CONFIG_SCHED_PROXY_EXEC & boot argument to enable/disable") Cc: stable@vger.kernel.org Assisted-by: Codex:GPT-5 Signed-off-by: Joseph Salisbury --- kernel/sched/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 2dcba1d9696e..08a06162dd9a 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -132,7 +132,7 @@ static int __init setup_proxy_exec(char *str) { bool proxy_enable =3D true; =20 - if (*str && kstrtobool(str + 1, &proxy_enable)) { + if (*str && (*str !=3D '=3D' || kstrtobool(str + 1, &proxy_enable))) { pr_warn("Unable to parse sched_proxy_exec=3D\n"); return 0; } --=20 2.47.3