From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 6CC193C4573 for ; Wed, 27 May 2026 16:34:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779899651; cv=none; b=kfOoxP5u+V/Kr5UGG20C0tlUf9xkD2GSr22QNaCPnw69vVKo3ryt4relbhD+l9HdbeA5+nb5RtsV3V677So9zGprZXoKuC0GBRQc9fY4hcxtKf/uZnumE7uXYuTCe6xS6UZW6IUOcycls90ILpIDnsI5bBlUFDKsRJ94pSVDFns= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779899651; c=relaxed/simple; bh=W9T8H3+1lESWHBar5MGOcKrgb81Y57kRmUb1Pg2IXKk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ZObJfE0YY4l74DncvgMtBnyHMFqgG9CKP0++okKjC/Yc5wk7WcvKM2zLLanfze8YQFuYj03/oAQ1YJyxSn1PUr5OrZzN4KrTdgk+hs79YUWxQsOUoHirKnM3IGApbBSx9v4Iq+i6hvggb8cEjdRMcYZx6jAze/FiCYhWFvoXZw8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=f9jlQrzS; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="f9jlQrzS" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8A60C1F000E9; Wed, 27 May 2026 16:34:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1779899650; bh=DAOqfSQvs8G5RQT5spINIn2IhJZUSKLhtYEwu8PRHAg=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=f9jlQrzSeysdBTkJ9Bli6zirNjFzt0NbrlCnY5Q+QX13ta2a+gFcqTUbFhB70q/Zo GaN/c3W30jjZAVa3n+KbzkWyXpB3ckpic07kDALOIVeW+8A5vKX3L2pE/gaVgqeThL g2fhpATepAJSYLxp+hwIspcimHT7uqhh+6xYGDW2bOcMroo6idlNCFXnKRTYaN/PFP y1b6sbe27IQIbCPRZPXGoOIxvX9qC5/Q8Qj61K4fnRk8ZnDycQEVWlxzkGjNcqAGGF WsjCISZnph4MP6Dqjsw66wJoHU5yarX4S/7k9IZCD3qEIxMzTE1i7WbXM98vzffaZb 4efwF0I7GJUvw== Date: Wed, 27 May 2026 10:34:07 -0600 From: Keith Busch To: Mateusz Nowicki Cc: Jens Axboe , Christoph Hellwig , Sagi Grimberg , Caleb Sander Mateos , Sung-woo Kim , linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] nvme-pci: fix out-of-bounds access in nvme_setup_descriptor_pools Message-ID: References: <20260522150628.399288-1-mateusz.nowicki@posteo.net> <20260523082751.20453-1-mateusz.nowicki@posteo.net> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260523082751.20453-1-mateusz.nowicki@posteo.net> On Sat, May 23, 2026 at 08:28:16AM +0000, Mateusz Nowicki wrote: > nvme_setup_descriptor_pools() indexes dev->descriptor_pools[] using the > numa_node forwarded from hctx->numa_node by its single caller, > nvme_init_hctx_common(). On a non-NUMA kernel hctx->numa_node is > NUMA_NO_NODE (-1). Because the parameter was declared 'unsigned', the > value becomes UINT_MAX and the index walks off the array (sized to > nr_node_ids), faulting during nvme_alloc_ns() and leaving the namespace > without a /dev node. Thanks, applied to nvme-7.2.