From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1793211966; b=rle1bSYeJB5c9uvFjWHWtliY/MxW4gob6JCv2Skl67CiopfbyhbCBogqpw/iWMdEIoAD qab//8qnbTmz9Y2Nl1isG4+L10qqI7LlTndlM7oOrgKl3foWmJMLwxPS0E86aduqZGWqV RDfAsljIUuX/IoK6VNrkWPcR552jX8UCMu+CDAIdLHf6w6251Zs2vkgJU/AtWVJ8GfRyR QaKqrlFxF5wmojOPO9weltqLUshIPVUWReFMu3KtFDOSjAAhClg/98owt31hXb8E5IBrr DZcVnl33+/Pj93Ck6hN2dUse3psIMxlP5cY5f8fXpeaTa9OiZNhWG13+Aim4PkkgOZg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793211966; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=/XjqRQiUh3YZlHoNn4jJToO1HgTz60xq+gwyvkLZooY=; b=2UW9VI530/k7yoD6FqgwhX/gWyNl5ULrMoeVaahLwuTXgzobzn3o95RKetlxhf5vvihU PXQeJuI1URMtR8N+4cUX9ua9PwqfySfbGW4MOhVdbvpP+GCj9f05U2T0SDT5y+xXtsKky 6jACWhTJ4Q/FGdhQc+xLl1JauSCvrK9F2d5NoiIlehdbDojiT8JdbCBdf1jpWvN7cbCGb 8Y2p3dxDGn4p786HsUaTd/53rz9RK9TvenyCQ+fjI/pxrYpqMw92A3XWM2JQ7aO0nwRZH 84a4pjjsAzn/HzlzHAVA3klVTEzqJLFYC/rGxWbflDjPa6EVEIQfFgqR9tPuI0w+gdQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=vsaKDEL7; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 661DF606A31C; Wed, 28 Oct 2026 18:26:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=vsaKDEL7 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 672BE1F01825; Wed, 28 Oct 2026 18:26:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1793211965; bh=/XjqRQiUh3YZlHoNn4jJToO1HgTz60xq+gwyvkLZooY=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=vsaKDEL7Lsyz634eylLvO6iFp6D20TajVx+TodIGlllmIwxjYoOY1AF5KI8ZaBGv5 m2eXhxmwTIqLsUatLzoqsjPEiQhR9BvGVdU2i7RIKZ8SMydsqEsmFJnc9GPo+evUr+ piTgw7FppnWnEOVkf/vD/ghhQEX37N+kAURPsXcI= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Aswin Karuvally , Jakub Kicinski Subject: [PATCH 5.15 518/571] s390/ctcm: Prevent XID null dereference Date: Wed, 28 Oct 2026 18:01:05 +0100 Message-ID: <20261028170020.320948202@linuxfoundation.org> X-Mailer: git-send-email 2.56.0 In-Reply-To: <20261028170008.009143722@linuxfoundation.org> References: <20261028170008.009143722@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: patches@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Aswin Karuvally commit b264d8422779d69febce914efc47a92a85cc382c upstream. The mpc_validate_xid() function sets grp->saved_xid2->xid2_flag2 to 0x40 to signal XID validation error. If peer XID is NULL or r/w channel pairing mismatch happens, grp->saved_xid2 is never initialized. An attempt to set the flag in such case leads to NULL dereference. Fix this by using the always available priv->xid->xid2_flag2 instead of grp->saved_xid2->xid2_flag2 for validation errors. Fixes: 293d984f0e36 ("ctcm: infrastructure for replaced ctc driver") Cc: stable@vger.kernel.org Signed-off-by: Aswin Karuvally Link: https://patch.msgid.link/20260827063408.2168914-1-aswin@linux.ibm.com Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- drivers/s390/net/ctcm_mpc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- a/drivers/s390/net/ctcm_mpc.c +++ b/drivers/s390/net/ctcm_mpc.c @@ -824,7 +824,7 @@ static void mpc_action_go_ready(fsm_inst fsm_deltimer(&grp->timer); - if (grp->saved_xid2->xid2_flag2 == 0x40) { + if (priv->xid->xid2_flag2 == 0x40) { priv->xid->xid2_flag2 = 0x00; if (grp->estconnfunc) { grp->estconnfunc(grp->port_num, 1, @@ -1633,7 +1633,6 @@ done: "The XID used in the MPC protocol is not valid, " "rc = %d\n", rc); priv->xid->xid2_flag2 = 0x40; - grp->saved_xid2->xid2_flag2 = 0x40; } return rc;