Commit ee2acc2
committed
Merge: ipv6: mcast: extend RCU protection in igmp6_send()
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-10/-/merge_requests/1110
JIRA: https://issues.redhat.com/browse/RHEL-81470
Upstream Status: net.git commit 087c1fa
CVE: CVE-2025-21759
commit 087c1fa
Author: Eric Dumazet <edumazet@google.com>
Date: Fri Feb 7 13:58:40 2025 +0000
ipv6: mcast: extend RCU protection in igmp6_send()
igmp6_send() can be called without RTNL or RCU being held.
Extend RCU protection so that we can safely fetch the net pointer
and avoid a potential UAF.
Note that we no longer can use sock_alloc_send_skb() because
ipv6.igmp_sk uses GFP_KERNEL allocations which can sleep.
Instead use alloc_skb() and charge the net->ipv6.igmp_sk
socket under RCU protection.
Fixes: b8ad0cb ("[NETNS][IPV6] mcast - handle several network namespace")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Reviewed-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Link: https://patch.msgid.link/20250207135841.1948589-9-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Hangbin Liu <haliu@redhat.com>
Approved-by: Antoine Tenart <atenart@redhat.com>
Approved-by: Florian Westphal <fwestpha@redhat.com>
Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com>
Merged-by: Jan Stancek <jstancek@redhat.com>1 file changed
+15
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2165 | 2165 | | |
2166 | 2166 | | |
2167 | 2167 | | |
2168 | | - | |
2169 | | - | |
| 2168 | + | |
| 2169 | + | |
| 2170 | + | |
2170 | 2171 | | |
2171 | 2172 | | |
2172 | 2173 | | |
2173 | | - | |
2174 | | - | |
2175 | 2174 | | |
2176 | 2175 | | |
2177 | | - | |
2178 | 2176 | | |
2179 | 2177 | | |
2180 | 2178 | | |
2181 | | - | |
2182 | 2179 | | |
| 2180 | + | |
| 2181 | + | |
| 2182 | + | |
2183 | 2183 | | |
2184 | 2184 | | |
2185 | 2185 | | |
| |||
2190 | 2190 | | |
2191 | 2191 | | |
2192 | 2192 | | |
2193 | | - | |
2194 | | - | |
2195 | | - | |
| 2193 | + | |
2196 | 2194 | | |
2197 | | - | |
| 2195 | + | |
2198 | 2196 | | |
| 2197 | + | |
| 2198 | + | |
| 2199 | + | |
2199 | 2200 | | |
2200 | | - | |
2201 | | - | |
2202 | | - | |
| 2201 | + | |
2203 | 2202 | | |
2204 | 2203 | | |
2205 | 2204 | | |
| 2205 | + | |
| 2206 | + | |
| 2207 | + | |
2206 | 2208 | | |
2207 | 2209 | | |
2208 | 2210 | | |
| |||
2227 | 2229 | | |
2228 | 2230 | | |
2229 | 2231 | | |
2230 | | - | |
2231 | | - | |
2232 | | - | |
2233 | 2232 | | |
2234 | 2233 | | |
2235 | 2234 | | |
| |||
0 commit comments