Article View: linux.kernel.netdev
Article #12278[PATCH] sctp: fix skb_over_panic when adding addresses with a pending delete of another family
From: Henry Martin
Date: Fri, 06 Nov 2026 18:52
Date: Fri, 06 Nov 2026 18:52
62 lines
12815 bytes
12815 bytes
sctp_make_asconf_update_ip() accounts for a pending DEL_IP
parameter by reusing the length of the address being added. The
write-back side instead serializes the pending address itself,
with its own address family. If the pending delete is IPv6
(20-byte parameter) while the added addresses are IPv4 (8-byte),
the chunk is allocated 12 bytes short and sctp_addto_chunk()
writes past the end of the skb. E.g. on mainline (05441d697f7f):
skbuff: skb_over_panic: text:ffffffff84859c77 len:392 put:20
tail:0x188 end:0x180 dev:<NULL>
kernel BUG at net/core/skbuff.c:215!
CPU: 0 UID: 1000 PID: 379 Comm: poc_sctp
Call Trace:
skb_panic
skb_put
sctp_addto_chunk
sctp_make_asconf_update_ip
sctp_send_asconf_add_ip
sctp_setsockopt_bindx
__x64_sys_setsockopt
Requires addip enabled on the endpoint (net.sctp.addip_enable=1).
Account for the pending delete with its own address family, as
the write-back side already does.
This issue was discovered by Tencent CodeBuddy Security.
Cc: stable@vger.kernel.org
Fixes: 8a07eb0a50ae ("sctp: Add ASCONF operation on the single-homed host")
Signed-off-by: Henry Martin <bsdhenrymartin@gmail.com>
---
net/sctp/sm_make_chunk.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c
index 90de272842512..18947ec5ff9f9 100644
--- a/net/sctp/sm_make_chunk.c
+++ b/net/sctp/sm_make_chunk.c
@@ -2886,9 +2886,17 @@ struct sctp_chunk *sctp_make_asconf_update_ip(struct sctp_association *asoc,
addr_buf += af->sockaddr_len;
if (asoc->asconf_addr_del_pending && !del_pickup) {
- /* reuse the parameter length from the same scope one */
+ /* The DEL_IP parameter is serialized from the
+ * pending address itself below; account for its
+ * own address family, which may differ from the
+ * added one.
+ */
+ addr = asoc->asconf_addr_del_pending;
+ af = sctp_get_af_specific(addr->v4.sin_family);
+
totallen += paramlen;
- totallen += addr_param_len;
+ totallen += af->to_addr_param(addr, &addr_param);
+
del_pickup = 1;
pr_debug("%s: picked same-scope del_pending addr, "
--
2.43.7
Technical Details
Message-ID:
<20261106185203.3326303-1-bsdhenrymartin@gmail.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-358122-linux-kernel-netdev=dewy.ruShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-358122-linux-kernel-netdev=dewy.ru
From: bsdhenrymartin@gmail.com (Henry Martin)
Newsgroups: linux.kernel.netdev
Subject: [PATCH] sctp: fix skb_over_panic when adding addresses with a pending delete of another family
Date: Sat, 7 Nov 2026 02:52:03 +0800
Organization: Usenet Network
Message-ID: <20261106185203.3326303-1-bsdhenrymartin@gmail.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
logging-data="3949469"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:T7I803zYAc1PfDpAmn6Mf9/Zk7Y= sha256:kvSE8BcM8xbXj3dl7rUS0aalmzJSKUirBZR+C7L81Ps=
sha1:p+vy+0k0AfCofmAoPABD5fgaaCo= sha256:TahKQrTK19a/9Rhfn04pZK8FyuWytSrPcEIYAYCm+aw=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
by mail.dewy.ru (Postfix) with ESMTP id 374BD1132E2; Fri, 6 Nov 2026 21:53:09 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.049
X-Spam-Status: No, score=-3.049 tagged_above=-9999 required=6.31
tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
DKIM_VALID_AU=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001,
FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249,
MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
SPF_PASS=-0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
header.d=gmail.com
X-Received: from mail.dewy.ru ([127.0.0.1])
by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id AEtZXbyLANUp;
Fri, 6 Nov 2026 21:53:06 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-358122-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=gmail.com
X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
by mail.dewy.ru (Postfix) with ESMTPS id CE7041132E0; Fri, 6 Nov 2026 21:52:56 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
by tor.lore.kernel.org (Postfix) with ESMTP id A6A2B2FFE2; Fri, 6 Nov 2026 18:52:16 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
t=1793991134;
b=XHsrF4oMs7Fo+juctVtxNJdikOPJTVCrKrZKnwf2Eityw93LOhpyIsa96SwOWIIzD7Gv
ArfNOG1G1zk5ea7YkeVtgou3MUo+8dIxNvEDDRxcCifQrQDGFn+6j9Rf2SpmxbM1KXsHy
IRKqEMAPt8PSvCXiZfMmOmMIIav1XAF26r3yNcvJuyIDJuKme7C42oPgCj5FrMZcV5G1u
uD/ZyhVIPivamn6rUDdcvXePMn8s+RI/7k70uFBDX6KzeSiePzc9CA05X/5dErSHnKGxU
wye+okChvVbT6Tk01/WepZf/AlGW7sQvT1O/C53Tyxu7JlW8/VCFtX8JBvbkCQ5beOw==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1793991134;
h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:
X-Google-DKIM-Signature:X-Forwarded-Encrypted:X-Gm-Message-State:
X-Gm-Gg:X-Received:Received:From:To:Cc:Subject:Date:Message-ID:
X-Mailer:X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe:
List-Unsubscribe:List-Owner:Precedence:MIME-Version:
Content-Transfer-Encoding;
bh=Jkr/vXjba9Z3zwOiGq9O6qe7GzW0wTcrHSexSQcxSGE=;
b=Reu6lzsKBtoMMjQIEaxCh57wEybXgVXjFlxjaAOIPXPGbgcOWBDjlIY6Fly3sVjY1kLo
b3xfEDXn8NISIa8rbPb/F+4uUmsHu4ELvsk4aI9JPpuIoxFRja3nROQNTAKMyabyy3EIb
9hW0iYPUg0ewTa7Hi38fFPG2YKRFvrYiDMAQn0BqGXKk+Jwdfj3k54c5PGa/IrPKAsmbF
TAnc67ykyOyaGGcQqb6bAhXc1sB3IjaWSLPu2Sb00n3alDi5B9Rq5qsL3qRaZ0TXgGUKT
+fK5wWtongEXDeDxGzvwQYYm/t6hPoAop/m9Rx6c2RT1TUwzKJMI/u/YP6P5FHSj68A==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org;
dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=jySbVnZm;
dmarc=pass header.from=gmail.com;
spf=pass smtp.mailfrom=gmail.com;
arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 35A1F606A329;
Fri, 6 Nov 2026 18:52:14 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=jySbVnZm
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.231.139
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
t=1793991133;
b=G8wg6DAmW8HKxOP1ZdCAXRJ6ev+fyHQ+KbF7EBXhzbr8HdT1ffB4pEgr2iqTfaAje7Dx
g1hfeRVt7xB1YuMJcPFr70wVzp5g7qNs/3fDfiqXTYQ99ctxg8ENx6bSELKYnc9m60Px6
DZ83V/os1fbIVRFeCTgxyURJ84xXq6vcWM8buPZwyOGwMVH2vOuMIIom07USWmt73gZSy
EwtKV1pyvnwMw3cBYViJzXiWfUz/rDIc8CHPMrMJ8QWl/t6ub/H+mzJIVerKi0McubHJ8
rYXsqIWRO+FoIgcrMV4N5y1q7zoOaO7257AOuT38XW7HXbzQtS6Hcd/nUgDOcJlvY0A==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1793991133;
h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature:
X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received:
From:To:Cc:Subject:Date:Message-ID:X-Mailer:MIME-Version:
Content-Transfer-Encoding;
bh=Jkr/vXjba9Z3zwOiGq9O6qe7GzW0wTcrHSexSQcxSGE=;
b=YOWo+IEr/4CboyezmogzJYZs8s1hUPGEfTFGhg+x8PCGQOJo5mY0NExFQktwmlZOlpoX
M2hHBrc48WMIQcLdTWBeezlgfZ7Il6K9kqiJqIZy3VnMPJZBw+JJz1GRlkWQNwojCTh+S
bxwqHbi/m2FBdDBXqksAxshOU9IexCU6cEPmuAvWdgv/MfLTkMU1rBKmj3tPT+5vXK2sd
TNAXDyT46TiH4rVC4qvwA0xI7iOqlH/8k9AlGYQkX/ImSC/2LvFdOVcHAvCoGb07Cjuwr
7WMwyzTfCvqpz2/49M04E6vuj4oYarniiZDr0YwsXl5UYCZ1J6gabBUxHNOcG9jke2g==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org;
dmarc=pass header.from=gmail.com;
spf=pass smtp.mailfrom=gmail.com;
dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=jySbVnZm;
arc=none smtp.remote-ip=74.125.231.139
X-Received: from mail-oo2-f11.google.com (mail-oo2-f11.google.com [74.125.231.139])
(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 863A9606A326
for <netdev@vger.kernel.org>; Fri, 6 Nov 2026 18:52:12 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 863A9606A326
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
X-Received: by mail-oo2-f11.google.com with SMTP id 46e09a7af769-853d57a81easo267933a34.1
for <netdev@vger.kernel.org>; Fri, 06 Nov 2026 10:52:12 -0800 (PST)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20260707; t=1793991131; x=1794595931; darn=vger.kernel.org;
h=content-transfer-encoding:mime-version:message-id:date:subject:cc
:to:from:from:to:cc:subject:date:message-id:reply-to:content-type;
bh=Jkr/vXjba9Z3zwOiGq9O6qe7GzW0wTcrHSexSQcxSGE=;
b=jySbVnZm+1AV5VJLdKjudU4bDQgXjripk4/WPWfN2IuT9kWha6DIBZ51q8fjTnB9Za
5IKiHFgDtEP8JX8Eak9CbaB3xjArWYIjugVii0/OTMMDAWg3nuALGDp390U86YyhCrs+
iNeIRpYcGn8SCy5c2vQzO9OCT3viYYjrqkLxW7xOrjJUrEqA9uRo9lWHmEb4eh3ugiDn
5sV99QblolTqwccSQYAM5pwlZNmBYW062mwK7P/n3HYD1b7KJA0LLoZV4/GaXXJg03Z9
Mo68HwOiGl7ge+H+PLNAfdXKRV/Szg+dUh11bLP5lSnueAc7qo1icq9qeykO3tWLHB+q
A+dw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20260707; t=1793991131; x=1794595931;
h=content-transfer-encoding:mime-version:message-id:date:subject:cc
:to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date
:message-id:reply-to:content-type;
bh=Jkr/vXjba9Z3zwOiGq9O6qe7GzW0wTcrHSexSQcxSGE=;
b=umWUrEO68y1OIbwZoJGj6vcLpHSZ3VDFqbKGR78Cuz0NoKnqtMx3Rnckm406IUN0I2
oRZu/NLgxYI1m21H3uTOzuar+sl1L4QS2lvTEci7yKM3aLv6SF/7CbXGRZT1PEUaG4dM
V4MZXtleVl/7s3koQWbb5MB3nBRCYLJoC0YpV7UILyS+iGlL3ZiZLZA3TCjj1ahzfyQj
ROWGLSYJewNk2x8c5gKQBtkSnp1RCWHlCcqFPPvezu4fVp5K//dS7/5P4mJeooDekf3d
QsPQcND0kSNEfBGffi+HlEk6gvjLLY58TylOOXasV2u9uDDvkwiGRxlt2sFn8yzpuzHv
OK8A==
X-Forwarded-Encrypted: i=1; AKwUvBwkj42us76aupkSx4kM5mhtmXaz9LigjBCMxvxxmw06eNKVuF0YwZk2Sn+bFSvRsUjMjG42LjI=@vger.kernel.org
X-Gm-Message-State: APuU4Z9oPesuEktKksR1DzbIVhsTSl4MUlAVOtuznTWOdFaumyUwJcCD
/ezV4cLahNo2Gh6AAa8LyAGwcf7wgLTTmrvP363mLLQT6JqCNpXwGUOK
X-Gm-Gg: AYBFou2pApfa9OqOkMYUawSK6XB5kzAlBZHVNz0oZVyA6RRhpQWAboZL97UaRQIJYFN
JkwFGQby+dE+/jJvvlB9Omam+BFyf5bd1mpgWF1rL9+5Mk+DPkzJ0K4AjVDktbM+EPZsvf5ShJ1
Cs7D6SuJaJwT3Tds8GzvFOCPKSbcEN421wYD88wM0xpKuKlXHWkmVj/G2+cCBZlnHRFWzqv+n4I
JCrdUzCCFeCJ0VSD+UmahD7eTvHO3Z7nbsQNimCywkiyp3/lP9Xxf6eCl87kBuyEd9A0NaBSV7s
DrsFim/rPeFGcS+AtgcJIJaIVSeR3TmRUTBKrc27jgGZkDzjcTq7tpKRkjQdtDEhlsmHLlyp/5h
bCBH4oEeljnYIXMN/5mwqzTlpIwFqRepart2VvBzO3cYqajqM++fpbS0WdK3zAVIbb7v4pYZpy1
nAUwcKvTytSW4kqM2kz9uiObTM4J+LLSEw8bvhf8bj6q2BSMOHsadtr9Ql2yGkwpcFeFAbjaeHQ
w6VUrIS/r7SV7cYofNF8cw1TbhV+IdLOqROC0Ggn7sEfCvRKXYdBh6wZmGZpKRWrh3sWpJqgKdJ
8zZy25Wvcq3NMpnrCx8kqpb7C77CPM/NjOoz1AVhySW4b/8AKrnrGv0kDJi58B/JCRbG
X-Received: by 2002:a05:6830:7192:b0:818:56c:a8f6 with SMTP id 46e09a7af769-85f1d04dc99mr3163517a34.26.1793991131373;
Fri, 06 Nov 2026 10:52:11 -0800 (PST)
X-Received: from localhost.localdomain ([14.116.239.35])
by smtp.gmail.com with ESMTPSA id 46e09a7af769-85f1de8fdebsm2533411a34.25.2026.11.06.10.52.07
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Fri, 06 Nov 2026 10:52:10 -0800 (PST)
X-Cc: linux-sctp@vger.kernel.org,
netdev@vger.kernel.org,
Henry Martin <bsdhenrymartin@gmail.com>,
stable@vger.kernel.org
X-Mailer: git-send-email 2.43.7
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list