From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=34.202.193.197 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795928180; b=ClaElkXJ0wNrCgT5S3XlZ2ydrAlzTy5r/utcKs81F7iDdYXf7XNSE7sPFJ4eP5DvF1ZB XEmMQ9vZ1rqg1D8Ec4f0BVXkdWLqbogDoMgUqUbmunFiTrXoUFRsCPAGiQn2GNkPYLsPY 0X8aUHp1qjZgNiaGBtgu9PMFOqDSMMAR4OtrfxesWrT7ktHfakIcDILZWayQGOMJ2MWun QC0UpjT/iWlwONEUL9UhE3eBScQ8tlj3d524EhbBUEurLv+H63CIvJYCH6HwOJ6cVTFAK edTFIdXAZEHEE1VbJRA1GtzuREMRxOISiCFef9LM7hHJm7W+yPN6z0wcjF4WfC6taJQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795928180; h=DMARC-Filter:DKIM-Signature:DKIM-Signature:Feedback-ID: X-Pm-Original-To:Received:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:MIME-Version:Content-Transfer-Encoding: X-MIME-Autoconverted:Content-Type; bh=W84AKdVJf1e00TxPnWPxmXQtPErxsZgtzSzSqAOOdJU=; b=vEWl2rUmKw0+MGgI5C1Z1vT7BKqKEObeK+8OBy20intRqJlY6fGlhqW++yNscE7Ini3y joQH3nuU2aD0VvVr/PEIRGXGIJ+hV7vztbop/5XhoezxmMaWcJb7UO0OBxOh0rl3kvyRZ 4p8J0cz9b1/aUaxTjNH8oxk7wTA3MBkk3XQJ3jOa2h5exNw29Z2hM4aZ1VDeKGWQt38Uq rRf1C/KBpUH3KKfbe93FykIW6WNAh9P43eA4AIBPZHfz8xC8yFQ6GMxDHT55vyPZxvNM+ URI7+mVg6uMpOGX08Fyxd0v7vO450xA8SMt5PCt0MZwA39QbOegSluvIfV5uWwt/iAg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=atomlin.com; spf=pass smtp.mailfrom=atomlin.com; dkim=pass header.d=atomlin.com header.i=@atomlin.com header.a=rsa-sha256 header.s=purelymail3 header.b=iMnVrp0T; dkim=pass header.d=purelymail.com header.i=@purelymail.com header.a=rsa-sha256 header.s=purelymail3 header.b=t9dvOMNd; arc=none smtp.remote-ip=34.202.193.197 Received: from sendmail.purelymail.com (sendmail.purelymail.com [34.202.193.197]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2C030606A336 for ; Sun, 29 Nov 2026 04:56:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 2C030606A336 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=atomlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=atomlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=atomlin.com header.i=@atomlin.com header.a=rsa-sha256 header.s=purelymail3 header.b=iMnVrp0T; dkim=pass (2048-bit key, unprotected) header.d=purelymail.com header.i=@purelymail.com header.a=rsa-sha256 header.s=purelymail3 header.b=t9dvOMNd DKIM-Signature: a=rsa-sha256; b=iMnVrp0T20YaLh3QhtSnt2SAR/zDt7WmhPvTGMvmUbiRudaAO6yYQL5S9UAcX342eMGyQy7+X7nQaCQAUSyzvjL32VZgxLHltgnA3jqPqZ/Srrawn2Q0mzxrcfljH6/g46RXUUz5Ng1eG43T8hxt7Js3s+EaeMIRCX56Oe20IdvBxVwWcOG4AJl2Et/UfDNMZylRSBgA8me+OiHd3GbVCRq0B+5wBj8fu0H+jRuwQzkCJ4rnRZ2FGxbIRYUv6QXGm0UXonLcnGL5RVJO5mdDwyESfyKUBMiDGbk0ALOiVQVuch1ZSO+QmaVxBhdIRJwTN0tOV1LT3nP7BnPLOgbp8Q==; s=purelymail3; d=atomlin.com; v=1; bh=W84AKdVJf1e00TxPnWPxmXQtPErxsZgtzSzSqAOOdJU=; h=Received:From:To:Subject:Date:Message-ID; DKIM-Signature: a=rsa-sha256; b=t9dvOMNdSrcb0+W75fTKMtvzNRCJbl5/1wWptvGbEJyBtiC0Alnes6n8Xh72b1Z3UhwHZ65fnDoJUJl1VCGua6+cMDHk2Hx8G+37b+lQxwEYZyeCpZWhBdW9QQA6e7Ss9v/9NFWS8BafC3e14cvunU6BtdJxKu4Ou+zD1yEZ6R43E4X7GbNX0bZRxF4LS7ast6P7LRwWsk0HpaLQWsqNp8jvhXaNIsbx4U9cQWEXebd7PAhFEMaiC+StMYVYy1LOvb0d+VSSNRY8ymcCln4545WeccO4Na89Efg789OwTTCJP5HHjEFKSkSvL+qJFKzDkMfv/VB/XkhHOWzOkqR6MQ==; s=purelymail3; d=purelymail.com; v=1; bh=W84AKdVJf1e00TxPnWPxmXQtPErxsZgtzSzSqAOOdJU=; h=Feedback-ID:Received:From:To:Subject:Date:Message-ID; Feedback-ID: 1802931:67223:null:purelymail X-Pm-Original-To: linux-fsdevel@vger.kernel.org Authentication-Results: purelymail.com; auth=pass Received: by smtp.purelymail.com (Purelymail SMTP) with ESMTPSA id -527146303; (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Sun, 29 Nov 2026 04:54:41 +0000 (UTC) From: Aaron Tomlin To: axboe@kernel.dk, tglx@kernel.org, aacraid@microsemi.com, James.Bottomley@HansenPartnership.com, mkp@kernel.org, frederic@kernel.org, bigeasy@linutronix.de, gmaglione@redhat.com, vgoyal@redhat.com, stefanha@redhat.com, miklos@szeredi.hu Cc: atomlin@atomlin.com, dwagner@suse.de, eperezma@redhat.com, tom.leiming@gmail.com, ionut.nechita@windriver.com, corbet@lwn.net, vincent.guittot@linaro.org, mingo@redhat.com, peterz@infradead.org, radu@rendec.net, akpm@linux-foundation.org, steve@abita.co, sean@ashe.io, chjohnst@gmail.com, neelx@suse.com, mproche@gmail.com, nick.lange@gmail.com, marco.crivellari@suse.com, rishil1999@outlook.com, linux-doc@vger.kernel.org, linux-block@vger.kernel.org, linux-scsi@vger.kernel.org, virtualization@lists.linux.dev, linux-fsdevel@vger.kernel.org, fuse-devel@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH v17 04/10] sched/isolation: Prevent out-of-bounds read in isolcpus= boot parameter parser Date: Sat, 28 Nov 2026 23:54:28 -0500 Message-ID: <20261129045436.255364-5-atomlin@atomlin.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261129045436.255364-1-atomlin@atomlin.com> References: <20261129045436.255364-1-atomlin@atomlin.com> X-Mailing-List: linux-fsdevel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by Purelymail Content-Type: text/plain; charset=UTF-8 The "isolcpus=3D" boot parameter parser in housekeeping_isolcpus_setup() contains an out-of-bounds memory read bug when handling unterminated flags. When parsing the boot parameter string, the logic expects flags to be comma-separated. If a user passes an unrecognised or legitimate flag at the very end of the string without a trailing comma (e.g., "isolcpus=3Dunknown"), the strict strncmp() checks will fail. The execution then falls through to a fallback for loop designed to skip the unknown sub-parameter. This inner loop consumes characters until it encounters either a comma or the NULL terminator ('\0'). When the loop terminates due to hitting the end of the string, the str pointer rests exactly on the NULL terminator. However, immediately following this inner loop, the code unconditionally executes str++. This advances the pointer past the end of the string and into uninitialised memory. The outer while (isalpha(*str)) loop subsequently evaluates this out-of-bounds memory. If the adjacent byte happens to be alphabetical, the parser will continue reading garbage data, potentially leading to undefined behavior or boot anomalies. Fix this by adding a bounds check immediately before the pointer increment. This ensures the parsing loop cleanly terminates when reaching the end of the boot parameter string. Fixes: 3662daf023500 ("sched/isolation: Allow "isolcpus=3D" to skip unknown= sub-parameters") Cc: stable@vger.kernel.org Reviewed-by: Valentin Schneider Signed-off-by: Aaron Tomlin --- kernel/sched/isolation.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/sched/isolation.c b/kernel/sched/isolation.c index c0c8b8862cbd..9198f6dbdadb 100644 --- a/kernel/sched/isolation.c +++ b/kernel/sched/isolation.c @@ -380,6 +380,8 @@ static int __init housekeeping_isolcpus_setup(char *str= ) =09=09} =20 =09=09pr_info("isolcpus: Skipped unknown flag %.*s\n", len, par); +=09=09if (!*str) +=09=09=09break; =09=09str++; =09} =20 --=20 2.55.0