From mboxrd@z Thu Jan 1 00:00:00 1970 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 8501321E0AF for ; Thu, 4 Dec 2025 16:09:21 +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=1764864561; cv=none; b=etLSKAI0U3UU1z4q59YOSGtx72HHKdx9efhqM20sjUJ9cyL0xKeXXXYir26ay78FUdq/AHxbNrgbQYasZKjK8yC45lOfnvwpdiAKQerdZMvgYAFF4g2pnLvb6TZVANj5W8ENihIU+UMB1ymKu5Mx93zswIgcI7yZo5h4z/SfqLI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764864561; c=relaxed/simple; bh=2HPGvp+0o1MmSecqG0QeZBtdNlHWJScYeXMNm63k7g8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=M4dCfHPZcmeNPBDgZcutCwC9fCIQIcwcH47qCnQI8jtNa6jOQISy+dfn4y2qksvmDUP+gACPrkIE2zuTH1goE9+ft4T1TtONSw3/A5h2yoPEQ1qvLOVUiYW/jd0kZSA4+lF8bWjI6Gwi52wEp5aq+pwsZBdYMi9wHmyXa1DnwQI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=mjZuga8D; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="mjZuga8D" Received: by smtp.kernel.org (Postfix) with ESMTPSA id F0B90C4CEFB; Thu, 4 Dec 2025 16:09:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1764864561; bh=2HPGvp+0o1MmSecqG0QeZBtdNlHWJScYeXMNm63k7g8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=mjZuga8DZPtLQ0hTLFJIi11GB4ipjAPEpIgFMTBxB44ylBXvP4rl9nEnpU/XEYot2 zQdzKP2peeOrbi6qJp7uvR8vVyvs7gxMIQUfF8woZJs85VFAZv3Mue37JhNHG26evi imsGLHZ5cfvNBYSpxA2vt6obNS9H0lbHlZqhvZo+c61pzA8L3WO5Buc/w5hxvvmDmc 6JX64wyvmvhUWoR5948Ft1kdaVEyuzPpF3bXGQH7XIX9Bo6afLKSzoKyEJ9GqAoA5N o+bik8R2Zd5lXnMgd3jVklptgrOrvWrvv+3DMwt2hseAKXyNuHgjbfZoeOkVInkRqS TThZltkwIZmmg== Date: Thu, 4 Dec 2025 09:09:18 -0700 From: Keith Busch To: Eugene Korenevsky Cc: Jens Axboe , Christoph Hellwig , Sagi Grimberg , linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4] nvme: nvme_identify_ns_descs: prevent oob Message-ID: References: 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: On Tue, Dec 02, 2025 at 09:22:13PM +0300, Eugene Korenevsky wrote: > Broken or malicious controller can send invalid ns id. > Out-of-band memory access may occur if remaining buffer size > is less than .nidl (ns id length) field of `struct nvme_ns_id_desc` > > Fix this issue by checking (header size + .nidl) against > remaining buffer length. Thanks, applied to nvme-6.19 with the line length wrap fixed up.