Date: Mon, 4 Jun 2012 18:43:51 +0000 (UTC) From: Maksim Yevmenkin <emax@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r236575 - head/sys/netinet Message-ID: <201206041843.q54Ihp07058865@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: emax Date: Mon Jun 4 18:43:51 2012 New Revision: 236575 URL: http://svn.freebsd.org/changeset/base/236575 Log: Plug more refcount leaks and possible NULL deref for interface address list. Submitted by: scottl@ MFC after: 3 days Modified: head/sys/netinet/tcp_input.c Modified: head/sys/netinet/tcp_input.c ============================================================================== --- head/sys/netinet/tcp_input.c Mon Jun 4 18:17:09 2012 (r236574) +++ head/sys/netinet/tcp_input.c Mon Jun 4 18:43:51 2012 (r236575) @@ -512,6 +512,8 @@ tcp6_input(struct mbuf **mp, int *offp, (caddr_t)&ip6->ip6_dst - (caddr_t)ip6); return IPPROTO_DONE; } + if (ia6) + ifa_free(&ia6->ia_ifa); tcp_input(m, *offp); return IPPROTO_DONE; @@ -1240,7 +1242,8 @@ relocked: rstreason = BANDLIM_RST_OPENPORT; goto dropwithreset; } - ifa_free(&ia6->ia_ifa); + if (ia6) + ifa_free(&ia6->ia_ifa); } #endif /* INET6 */ /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201206041843.q54Ihp07058865>