Home
last modified time | relevance | path

Searched hist:"44112 bc5c74e64f28f5a9127dc34066c7a09bd0f" (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/net/ipv6/
H A Daddrconf.cdiff 44112bc5c74e64f28f5a9127dc34066c7a09bd0f Thu Feb 22 06:17:47 CST 2024 Eric Dumazet <edumazet@google.com> ipv6: fix potential "struct net" leak in inet6_rtm_getaddr()

[ Upstream commit 10bfd453da64a057bcfd1a49fb6b271c48653cdb ]

It seems that if userspace provides a correct IFA_TARGET_NETNSID value
but no IFA_ADDRESS and IFA_LOCAL attributes, inet6_rtm_getaddr()
returns -EINVAL with an elevated "struct net" refcount.

Fixes: 6ecf4c37eb3e ("ipv6: enable IFA_TARGET_NETNSID for RTM_GETADDR")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Christian Brauner <brauner@kernel.org>
Cc: David Ahern <dsahern@kernel.org>
Reviewed-by: David Ahern <dsahern@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>