From: patchwork-bot+netdevbpf@kernel.org
To: Xingyuan Mo <hdthky0@gmail.com>
Cc: marcelo.leitner@gmail.com, lucien.xin@gmail.com,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, horms@kernel.org, linux-sctp@vger.kernel.org,
netdev@vger.kernel.org
Subject: Re: [PATCH v5] sctp: reject forged cookie peer_addr with unknown address family
Date: Fri, 23 Oct 2026 19:30:05 +0000 [thread overview]
Message-ID: <179278380532.1224496.16148284450790135756.git-patchwork-notify@kernel.org> (raw)
In-Reply-To: <20261019073747.178626-1-hdthky0@gmail.com>
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Mon, 19 Oct 2026 15:37:57 +0800 you wrote:
> When cookie authentication is disabled, COOKIE-ECHO peer_addr is
> attacker-controlled. An invalid sa_family made sctp_get_af_specific()
> return NULL and crash in sctp_transport_init() on
> af_specific->sockaddr_len. Validate it with af->addr_valid() in
> sctp_unpack_cookie(), which also rejects a mismatched family, e.g.
> an AF_INET6 peer_addr on an IPv4 socket that would later crash in
> sctp_v6_get_dst() on inet6_sk(sk)->opt. Validate a copy of peer_addr,
> since addr_valid() rewrites a v4-mapped v6 address in place and the
> cookie still lives in the received skb, which is not guaranteed to
> be unshared. Store the validated copy in the new association and
> pass it to sctp_process_init() instead of the raw cookie, so a
> v4-mapped v6 address is normalised to AF_INET before the association
> and its primary transport are built from it.
>
> [...]
Here is the summary with links:
- [v5] sctp: reject forged cookie peer_addr with unknown address family
https://git.kernel.org/netdev/net/c/9802123ceca8
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
prev parent reply other threads:[~2026-10-23 19:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-19 7:37 [PATCH v5] sctp: reject forged cookie peer_addr with unknown address family Xingyuan Mo
2026-10-22 18:46 ` Xin Long
2026-10-23 19:30 ` patchwork-bot+netdevbpf [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=179278380532.1224496.16148284450790135756.git-patchwork-notify@kernel.org \
--to=patchwork-bot+netdevbpf@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hdthky0@gmail.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-sctp@vger.kernel.org \
--cc=lucien.xin@gmail.com \
--cc=marcelo.leitner@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox