Jonathan T. Looney fb04394554 Fix two places in the ICMP6 code where we could dereference a NULL pointer
in the icmp6_input() function.

When processing an ICMP6_ECHO_REQUEST, if IP6_EXTHDR_GET fails, it will
set nicmp6 and n to NULL. Therefore, we should condition our modification
to nicmp6 on n being not NULL.

And, when processing an ICMP6_WRUREQUEST in the (mode != FQDN) case, if
m_dup_pkthdr() fails, the code will set n to NULL. However, the very next
line dereferences n. Therefore, when m_dup_pkthdr() fails, we should
discontinue further processing and follow the same path as when m_gethdr()
fails.

Reported by:	clang static analyzer
Reviewed by:	ae
MFC after:	2 weeks
Sponsored by:	Netflix
Differential Revision:	https://reviews.freebsd.org/D10941
2017-05-30 14:41:31 +00:00
..
2017-05-28 21:20:55 +00:00
2017-05-23 09:29:05 +00:00
2017-05-29 09:22:53 +00:00
2017-05-28 17:48:54 +00:00
2017-05-18 08:25:07 +00:00
2017-02-28 23:42:47 +00:00
2017-05-29 07:57:01 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-05-23 09:29:05 +00:00
2017-05-23 09:29:05 +00:00
2017-05-09 05:08:47 +00:00
2017-05-07 14:59:45 +00:00
2017-05-30 13:53:03 +00:00