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 69E603BB687; Mon, 17 Aug 2026 14:02: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=1786975364; cv=none; b=LDU6LuvOU0Vu+DipG91oPX6rDS9wfGY1KxjC4J5UZvhlSysFHPWqWgZ2j1cuZyw2WVQDDxw1JY/exp1kyvI5ldHrrhb+AD7s+VfQhDon/83L10l+d4aeqG77cmlAhX+B22xXWizwo1E4vXkpbpKa7F3Is4P+2XzT0t4uHgZ5JWg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786975364; c=relaxed/simple; bh=Hldoas4qOemkT7NzGaVRwxocS2nzOPgnTRSeIE2LrCA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ctCHRoL0Ho3lw51ugBZyvbnml/wg8Xrol/hioTasGj+9DTCessmHahrtnhf2nr8Aafo5EPzxkRNbAJ7lwBAtZc5h9pBUcMc/AStj7YOZnAZtDyzCtB+w5ueByicB7qYo04qUKJ6OYwZKl5Wh3iGcx9A24RhrZv6kTVlkglURsok= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=aO+2Aj9+; 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="aO+2Aj9+" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C0CFA1F000E9; Mon, 17 Aug 2026 14:02:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1786975363; bh=u0ED+6EXOHTX8+c+iRvy0ljYGee/+acESHBPsCWBKQQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=aO+2Aj9++wfWlugfMfiALpTlCzg8S/V8avgNWv8NADs48/fE2T03SaSBkEIrY9FE4 OyBW4mwN+sGEmXbUOVYG9/NqPtfMAshnr68OYbnks9tCHDkB5KcmUugwXPsih/rv0F FTWDWT2O8ejGYHljPhkuzRzkbBANQ2U3ZwtAwZ6o= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Baul Lee , Xin Long , Jakub Kicinski Subject: [PATCH 6.18 244/250] sctp: keep chunk->transport in step with the list it is queued on Date: Mon, 17 Aug 2026 15:33:25 +0200 Message-ID: <20260817132546.463214717@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260817132536.466235697@linuxfoundation.org> References: <20260817132536.466235697@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Baul Lee commit 9f2cf069a9a72a2d6b97ca8b4c70e714aac99749 upstream. __sctp_outq_flush_rtx() moves a gap-acked chunk onto another transport's transmitted list without updating chunk->transport: if (chunk->tsn_gap_acked) { list_move_tail(&chunk->transmitted_list, &transport->transmitted); continue; } The chunk then sits on a live transport's list while chunk->transport still names a different one. If that transport is removed - sctp_assoc_rm_peer() from an ASCONF Delete-IP - sctp_transport_free() RCU-frees it and the chunk is left with a dangling pointer. sctp_assoc_rm_peer() scrubs peer->transmitted and asoc->outqueue.out_chunk_list, but the chunk is on neither. The pointer is not followed while tsn_gap_acked is set. A SACK that reneges on the TSN clears the flag, and the next SACK reaches tchunk->transport->flight_size -= sctp_data_size(tchunk); inside the freed transport. KASAN reports a slab-use-after-free read in sctp_check_transmitted(), freed from sctp_assoc_rm_peer(). Both the removal and the SACKs come from the association peer. Set chunk->transport at the move. The ordinary resend path needs nothing: it reaches its list_move_tail() only after sctp_packet_append_chunk() returned SCTP_XMIT_OK, and __sctp_packet_append_chunk() has rebound the chunk by then. Discovered by XBOW, triaged by Baul Lee Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: stable@vger.kernel.org Signed-off-by: Baul Lee Acked-by: Xin Long Link: https://patch.msgid.link/20260729160028.54546-1-baul.lee@xbow.com Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- net/sctp/outqueue.c | 1 + 1 file changed, 1 insertion(+) --- a/net/sctp/outqueue.c +++ b/net/sctp/outqueue.c @@ -650,6 +650,7 @@ static int __sctp_outq_flush_rtx(struct if (chunk->tsn_gap_acked) { list_move_tail(&chunk->transmitted_list, &transport->transmitted); + chunk->transport = transport; continue; }