Commit 8cee09e
icmp: prevent possible NULL dereferences from icmp_build_probe()
jira VULN-43056
cve CVE-2024-35857
commit-author Eric Dumazet <edumazet@google.com>
commit c58e88d
First problem is a double call to __in_dev_get_rcu(), because
the second one could return NULL.
if (__in_dev_get_rcu(dev) && __in_dev_get_rcu(dev)->ifa_list)
Second problem is a read from dev->ip6_ptr with no NULL check:
if (!list_empty(&rcu_dereference(dev->ip6_ptr)->addr_list))
Use the correct RCU API to fix these.
v2: add missing include <net/addrconf.h>
Fixes: d329ea5 ("icmp: add response to RFC 8335 PROBE messages")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Andreas Roeseler <andreas.a.roeseler@gmail.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit c58e88d)
Signed-off-by: CIQ Kernel Automation <ciq_kernel_automation@ciq.com>1 parent 47dbb18 commit 8cee09e
1 file changed
Lines changed: 10 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
95 | 96 | | |
96 | 97 | | |
97 | 98 | | |
| |||
1027 | 1028 | | |
1028 | 1029 | | |
1029 | 1030 | | |
| 1031 | + | |
| 1032 | + | |
1030 | 1033 | | |
1031 | 1034 | | |
1032 | 1035 | | |
| |||
1110 | 1113 | | |
1111 | 1114 | | |
1112 | 1115 | | |
1113 | | - | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
1114 | 1119 | | |
1115 | | - | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
1116 | 1123 | | |
| 1124 | + | |
1117 | 1125 | | |
1118 | 1126 | | |
1119 | 1127 | | |
| |||
0 commit comments