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 74B813CBE74 for ; Mon, 6 Jul 2026 18:57:56 +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=1783364277; cv=none; b=k8/MAEo3y8pjaT10XALDd80v07NoPP9YXVLnY7rgzZDn4ddBvjvxPVb2OHASiKEGIbeI3hmfrl3HSaCnVn0o+EtZdB5Y3KJbgptlJOgkZzHXPySdF826owav4i1Ft7d+UmoSPkdIwaEOFrevfXCG+b5YOXjtvg3LLcZ6dH1PLEw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783364277; c=relaxed/simple; bh=FPox6o72Q/4Atg/q8sFRZ81PUM8bPGEREIB8WMihEe4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=dcz/R8fQQ0KgAUPu8ZXUUbwm3UaQ2vmv19pVMBWyaX+nSWKpLkZ/jmi4nnUhXzwARdXGc+NxTgVj0cxYWCcJkNUwvUa++LbNxpexjYyudtxifY91N9TiUm1OSeaO9nxYlFqv7z0VmFPSkKEluqQj90kn2Nush+NgAjJd/Ry7Lmo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=bDcJYo6A; 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="bDcJYo6A" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D72DA1F000E9; Mon, 6 Jul 2026 18:57:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1783364276; bh=wTgQPbKFntBvJOTC1pS5QrCHYOxXbIPVe3K+h3Tn0pU=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=bDcJYo6AoMYJz5q5L07dBnNCy3eUuL85TGC0ojzzIusCVFvKiJL3PA1BiX2SpRxAN x392b6fsdU4p0UF6rhgjc2zuF1ofaZLyEd9lgCrKdu6YtfWgsCV1eiNnq+nNt7+yNA KjpbTpeGAqzQh+d8G2WcCwaIj/9O07nyHS6AAuWAXw0ypPiYYp06EzkJU4+C/sAD3o 1iqHCSmFu0cDF+pEl8Zpa6nBLNNB7RxM5TLZyAKt/BujirkCWsStfZj1WDjBWOSZj2 /oaVsXOMrO5rD2veRNsMsjIFLyraTrKJCAyAfnw/BmE/d1rrg7SRdM7bJeMX8QlaCm BwMQ1qPU41kdg== Date: Mon, 6 Jul 2026 12:57:54 -0600 From: Keith Busch To: hexlabsecurity@proton.me Cc: Christoph Hellwig , Sagi Grimberg , Chaitanya Kulkarni , Hannes Reinecke , linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org Subject: Re: [PATCH] nvmet-auth: zero the AUTH_RECEIVE response buffer Message-ID: References: <20260702-b4-disp-127414cf-v1-1-e5395cc0f9ae@proton.me> 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: <20260702-b4-disp-127414cf-v1-1-e5395cc0f9ae@proton.me> On Thu, Jul 02, 2026 at 03:45:14AM -0500, Bryam Vargas via B4 Relay wrote: > From: Bryam Vargas > > nvmet_execute_auth_receive() allocates the response buffer with kmalloc() > sized by the host-supplied AUTH_RECEIVE allocation length, but the > DH-HMAC-CHAP builders write only a fixed-size message into it. The full > allocation length is then copied to the wire by nvmet_copy_to_sgl(), so a > remote initiator receives the bytes past the built message -- up to nearly > a page of uninitialized slab -- during the pre-authentication handshake. > > Allocate the buffer with kzalloc() so the unwritten tail is zeroed before > it is sent; conforming responses are unaffected. Thanks, applied to nvme-7.3.