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 15B7010F1 for ; Fri, 11 Sep 2026 09:44:43 +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=1789119885; cv=none; b=lDRVbccXXc2o7Fw23++g9s/X4PNH76oSo/RJeKoImK12tP9pBS8UCW10YSlSBcrMAOup3auyVX0QhfsV/NRghbTeddxF25cj9xBD3AX/Ik3DBIYDxNSP7i8p5R1Rpl0suBN7quv//ylszkDmajq2LlBQWhqZpMKc1ydsGhAcGfQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789119885; c=relaxed/simple; bh=vyjGNWuLfBoXQMCd9DAnDtpQh8vp0awKyTEku/5YI+Q=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=qmCfb5N0afnLbXkAnLMiySanzLf7pMf/7FQtdOspvfuZV7lD2sMbUN0oC+zp5ejmCnOjvkFikwzgWpeLxsGaR3KaMFClDGoD4GLumUNlb7SRCaqFMUyDESJZhnYgKYXlEJF7f028I6LDJ7NiHj8QGemKrjbzCyZwaN0qlrLZQIE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=bC6Ax0nx; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="bC6Ax0nx" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 15CA91F000FF; Fri, 11 Sep 2026 09:44:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1789119883; bh=/I+WU3DjvIbQtN77J9ax1EpNlvJ/ou6J1n/sYZSDZwY=; h=Subject:To:Cc:From:Date; b=bC6Ax0nxvpUxRgCa3gMHhsr1WgIW/cANSn4G/U6NF/2cXfTG60sN3vljD/EyTvj6f Equs7CgVLjZk6H4NH2OOkpwyAs0Vlp0AS9jXD8maic7CRgsQzc9s+uKjsJsg6CPrqz 5SPxMikBWCWFlwD7rSowoGz3pZKofU/+fEB4QNT4= Subject: FAILED: patch "[PATCH] ksmbd: zero pipe read compound padding" failed to apply to 6.1-stable tree To: linkinjeon@kernel.org,cheryl@renat.io Cc: From: Date: Fri, 11 Sep 2026 11:44:24 +0200 Message-ID: <2026091124-undefined-monsieur-f0fc@gregkh> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit The patch below does not apply to the 6.1-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . To reproduce the conflict and resubmit, you may use the following commands: git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.1.y git checkout FETCH_HEAD git cherry-pick -x 73f860489e3be2245598d1819226304fc5b87291 # git commit -s git send-email --to '' --in-reply-to '2026091124-undefined-monsieur-f0fc@gregkh' --subject-prefix 'PATCH 6.1.y' 'HEAD^..' Possible dependencies: thanks, greg k-h ------------------ original commit in Linus's tree ------------------ From 73f860489e3be2245598d1819226304fc5b87291 Mon Sep 17 00:00:00 2001 From: Namjae Jeon Date: Tue, 25 Aug 2026 09:31:35 +0900 Subject: [PATCH] ksmbd: zero pipe read compound padding Compound response handling extends the last response iov to an eight-byte boundary. smb2_read_pipe() allocates only the payload size, so the alignment padding can expose up to seven bytes of uninitialized kernel heap memory. Allocate the aligned size and clear the unused tail before pinning the response buffer. Fixes: e2b76ab8b5c9 ("ksmbd: add support for read compound") Reported-by: Cheryl Babcock Signed-off-by: Namjae Jeon diff --git a/fs/smb/server/smb2pdu.c b/fs/smb/server/smb2pdu.c index ba0fe25bf366..8c589110460a 100644 --- a/fs/smb/server/smb2pdu.c +++ b/fs/smb/server/smb2pdu.c @@ -8657,13 +8657,18 @@ static noinline int smb2_read_pipe(struct ksmbd_work *work) } aux_payload_buf = - kvmalloc(rpc_resp->payload_sz, KSMBD_DEFAULT_GFP); + kvmalloc(ALIGN(rpc_resp->payload_sz, 8), + KSMBD_DEFAULT_GFP); if (!aux_payload_buf) { err = -ENOMEM; goto out; } memcpy(aux_payload_buf, rpc_resp->payload, rpc_resp->payload_sz); + if (rpc_resp->payload_sz & 7) + memset(aux_payload_buf + rpc_resp->payload_sz, 0, + ALIGN(rpc_resp->payload_sz, 8) - + rpc_resp->payload_sz); nbytes = rpc_resp->payload_sz; err = ksmbd_iov_pin_rsp_read(work, (void *)rsp,