Commit da3124e
committed
ipv6: fix potential "struct net" leak in inet6_rtm_getaddr()
jira LE-1907
cve CVE-2024-27417
Rebuild_History Non-Buildable kernel-5.14.0-427.31.1.el9_4
commit-author Eric Dumazet <edumazet@google.com>
commit 10bfd45
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: 6ecf4c3 ("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>
(cherry picked from commit 10bfd45)
Signed-off-by: Jonathan Maple <jmaple@ciq.com>1 parent 9428adf commit da3124e
1 file changed
+4
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5457 | 5457 | | |
5458 | 5458 | | |
5459 | 5459 | | |
5460 | | - | |
5461 | | - | |
5462 | | - | |
| 5460 | + | |
| 5461 | + | |
| 5462 | + | |
| 5463 | + | |
5463 | 5464 | | |
5464 | 5465 | | |
5465 | 5466 | | |
| |||
0 commit comments