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 6F7752D3EF1 for ; Thu, 4 Dec 2025 15:32:46 +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=1764862366; cv=none; b=bBo6KkjHXeWEw8oUvM5bZOLeNnG2NZaFpoUcouoPZDUYJSy5bpeNwQf/KnYUJ95XFQuuCRbGUmnxSNDyYgOTr91+qycvds+R0KKsyr2cNNAN7bxWiclNCozNJm7OFeS4NP7KfgxnC1kWPUJVPt5arNHdepK+kmRk3N+HMvsAGyQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764862366; c=relaxed/simple; bh=w0QI0DZpn+80C8cSxbHqUR8/RGXgAyVm1fTqRnB/8tY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=qwfHYsTwVBo6XmZqHW7DLWiXkWUAReHOSiWapKjc/Nrz27Fan7B0ST/ozapSbL/63QRd+aG2CG8wk0ivsGwB1Yudbion+5dz9b9H+IKL7oJJNV38vFLvDhan/us+uB9N1nyzFjUbEoS49EnScyqNEBXg8fLhLxexI174PU5DciY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=hkTq3/pY; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="hkTq3/pY" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C9ACBC116B1; Thu, 4 Dec 2025 15:32:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1764862366; bh=w0QI0DZpn+80C8cSxbHqUR8/RGXgAyVm1fTqRnB/8tY=; h=From:To:Cc:Subject:Date:Reply-To:From; b=hkTq3/pY1tTjDWNNCk+h1LuyfQqvdqyj2BdAiMdZtBBQEV451iD0hp0006/Ie6u3V yukLnMwDySYEyPio4Fs863ptGKGWaTEdBpyz83oj8OoOUjftmgkrz1gNAlSJKL+Rak SVt4cH5nc+tVYI/iWLVUXg19rs1LmclSsqz6TUlw= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-40240: sctp: avoid NULL dereference when chunk data buffer is missing Date: Thu, 4 Dec 2025 16:32:15 +0100 Message-ID: <2025120403-CVE-2025-40240-745a@gregkh> X-Mailer: git-send-email 2.52.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3434; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=/+/T2KGCl36QSDUvVKOp8spo6EZYGkzhoGGCfMEWCTc=; b=owGbwMvMwCRo6H6F97bub03G02pJDJmGK4vNvn3SPHqwtPG65myBtZKRjzdOfb5YUSSj9XLot if6h9wedMSyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBEbn5gmCu1xNHpxK8c1ZPK 6jm55dFXrh6rsmCYp3r9pOSU2Q33tkw/dfwL89vHqTvj3wMA X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: sctp: avoid NULL dereference when chunk data buffer is missing chunk->skb pointer is dereferenced in the if-block where it's supposed to be NULL only. chunk->skb can only be NULL if chunk->head_skb is not. Check for frag_list instead and do it just before replacing chunk->skb. We're sure that otherwise chunk->skb is non-NULL because of outer if() condition. The Linux kernel CVE team has assigned CVE-2025-40240 to this issue. Affected and fixed versions =========================== Issue introduced in 4.8 with commit 90017accff61ae89283ad9a51f9ac46ca01633fb and fixed in 5.4.301 with commit 61cda2777b07d27459f5cac5a047c3edf9c8a1a9 Issue introduced in 4.8 with commit 90017accff61ae89283ad9a51f9ac46ca01633fb and fixed in 5.10.246 with commit 08165c296597075763130919f2aae59b5822f016 Issue introduced in 4.8 with commit 90017accff61ae89283ad9a51f9ac46ca01633fb and fixed in 5.15.196 with commit 03e80a4b04ef1fb2c61dd63216ab8d3a5dcb196f Issue introduced in 4.8 with commit 90017accff61ae89283ad9a51f9ac46ca01633fb and fixed in 6.1.158 with commit 4f6da435fb5d8a21cbf8cae5ca5a2ba0e1012b71 Issue introduced in 4.8 with commit 90017accff61ae89283ad9a51f9ac46ca01633fb and fixed in 6.6.115 with commit cb9055ba30306ede4ad920002233d0659982f1cb Issue introduced in 4.8 with commit 90017accff61ae89283ad9a51f9ac46ca01633fb and fixed in 6.12.56 with commit 7a832b0f99be19df608cb75c023f8027b1789bd1 Issue introduced in 4.8 with commit 90017accff61ae89283ad9a51f9ac46ca01633fb and fixed in 6.17.6 with commit 89b465b54227c245ddc7cc9ed822231af21123ef Issue introduced in 4.8 with commit 90017accff61ae89283ad9a51f9ac46ca01633fb and fixed in 6.18 with commit 441f0647f7673e0e64d4910ef61a5fb8f16bfb82 Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2025-40240 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: net/sctp/inqueue.c Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: https://git.kernel.org/stable/c/61cda2777b07d27459f5cac5a047c3edf9c8a1a9 https://git.kernel.org/stable/c/08165c296597075763130919f2aae59b5822f016 https://git.kernel.org/stable/c/03e80a4b04ef1fb2c61dd63216ab8d3a5dcb196f https://git.kernel.org/stable/c/4f6da435fb5d8a21cbf8cae5ca5a2ba0e1012b71 https://git.kernel.org/stable/c/cb9055ba30306ede4ad920002233d0659982f1cb https://git.kernel.org/stable/c/7a832b0f99be19df608cb75c023f8027b1789bd1 https://git.kernel.org/stable/c/89b465b54227c245ddc7cc9ed822231af21123ef https://git.kernel.org/stable/c/441f0647f7673e0e64d4910ef61a5fb8f16bfb82