Re: [PATCH nf 0/1] netfilter: ip6t_rt: fix zero-address non-strict match out-of-bounds read
Florian Westphal <[email protected]>
| Newsgroups | gmane.comp.security.firewalls.netfilter.devel |
|---|---|
| Message-ID | <[email protected]> |
Ren Wei <[email protected]> wrote: > In net/ipv6/netfilter/ip6t_rt.c, rt_mt6_check() permits rules to be configured with rtinfo->addrnr == 0. > When evaluating IPv6 packets with IP6T_RT_FST_NSTRICT (non-strict routing match), rt_mt6() iterates over the packet's routing addresses and compares each candidate address with rtinfo->addrs[i] before checking whether i has reached addrnr: > > if (ipv6_addr_equal(ap, &rtinfo->addrs[i])) { > i++; > } > if (i == rtinfo->addrnr) > break; Please send a v2 that also puts a stop to this backwards loop termination.