]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: mctp: Prevent duplicate binds
authorMatt Johnston <matt@codeconstruct.com.au>
Thu, 10 Jul 2025 08:55:55 +0000 (16:55 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Aug 2025 14:25:55 +0000 (16:25 +0200)
commit4e92e5c943051c6d0453ae6db5add8b62d091333
treef30872cd48d20c8950193099f77d26020a820128
parentb5de8d80b5d049f051b95d9b1ee50ae4ab656124
net: mctp: Prevent duplicate binds

[ Upstream commit 3954502377ec05a1b37e2dc9bef0bacd4bbd71b2 ]

Disallow bind() calls that have the same arguments as existing bound
sockets.  Previously multiple sockets could bind() to the same
type/local address, with an arbitrary socket receiving matched messages.

This is only a partial fix, a future commit will define precedence order
for MCTP_ADDR_ANY versus specific EID bind(), which are allowed to exist
together.

Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
Link: https://patch.msgid.link/20250710-mctp-bind-v4-2-8ec2f6460c56@codeconstruct.com.au
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/mctp/af_mctp.c