Commit ffa319e
ipv6: prevent infinite loop in rt6_nlmsg_size()
JIRA: https://issues.redhat.com/browse/RHEL-115578
CVE: CVE-2025-38588
commit 54e6fe9
Author: Eric Dumazet <edumazet@google.com>
Date: Fri Jul 25 14:07:23 2025 +0000
ipv6: prevent infinite loop in rt6_nlmsg_size()
While testing prior patch, I was able to trigger
an infinite loop in rt6_nlmsg_size() in the following place:
list_for_each_entry_rcu(sibling, &f6i->fib6_siblings,
fib6_siblings) {
rt6_nh_nlmsg_size(sibling->fib6_nh, &nexthop_len);
}
This is because fib6_del_route() and fib6_add_rt2node()
uses list_del_rcu(), which can confuse rcu readers,
because they might no longer see the head of the list.
Restart the loop if f6i->fib6_nsiblings is zero.
Fixes: d9ccb18 ("ipv6: Fix soft lockups in fib6_select_path under high next hop churn")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Link: https://patch.msgid.link/20250725140725.3626540-3-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: CKI Backport Bot <cki-ci-bot+cki-gitlab-backport-bot@redhat.com>1 parent 19a07a4 commit ffa319e
2 files changed
+20
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1251 | 1251 | | |
1252 | 1252 | | |
1253 | 1253 | | |
1254 | | - | |
| 1254 | + | |
1255 | 1255 | | |
1256 | 1256 | | |
1257 | 1257 | | |
| |||
1969 | 1969 | | |
1970 | 1970 | | |
1971 | 1971 | | |
1972 | | - | |
| 1972 | + | |
1973 | 1973 | | |
1974 | 1974 | | |
1975 | 1975 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5587 | 5587 | | |
5588 | 5588 | | |
5589 | 5589 | | |
| 5590 | + | |
| 5591 | + | |
5590 | 5592 | | |
5591 | 5593 | | |
5592 | 5594 | | |
5593 | 5595 | | |
5594 | 5596 | | |
5595 | 5597 | | |
5596 | | - | |
5597 | | - | |
5598 | | - | |
5599 | | - | |
5600 | | - | |
5601 | | - | |
5602 | | - | |
5603 | | - | |
5604 | | - | |
| 5598 | + | |
| 5599 | + | |
5605 | 5600 | | |
5606 | | - | |
5607 | | - | |
5608 | | - | |
5609 | | - | |
| 5601 | + | |
| 5602 | + | |
| 5603 | + | |
| 5604 | + | |
| 5605 | + | |
| 5606 | + | |
5610 | 5607 | | |
5611 | | - | |
| 5608 | + | |
| 5609 | + | |
| 5610 | + | |
| 5611 | + | |
| 5612 | + | |
5612 | 5613 | | |
5613 | | - | |
5614 | 5614 | | |
5615 | | - | |
| 5615 | + | |
| 5616 | + | |
| 5617 | + | |
5616 | 5618 | | |
5617 | 5619 | | |
5618 | 5620 | | |
| |||
0 commit comments