summaryrefslogtreecommitdiffstats
path: root/sys/netinet/ip_input.c
diff options
context:
space:
mode:
authorbz <bz@FreeBSD.org>2010-04-21 10:21:34 +0000
committerbz <bz@FreeBSD.org>2010-04-21 10:21:34 +0000
commitb883f7a391f4c0701e1c731511a2a6a35ab62588 (patch)
tree44d19affcde7360804caa341685c5b969313c1d9 /sys/netinet/ip_input.c
parent2be29b5c7150997a62ebcff0e91750529ac11c27 (diff)
downloadFreeBSD-src-b883f7a391f4c0701e1c731511a2a6a35ab62588.zip
FreeBSD-src-b883f7a391f4c0701e1c731511a2a6a35ab62588.tar.gz
Avoid memory access after free. Use the (shortend) copy for the
ipsec mtu lookup as well. PR: kern/145736 Submitted by: Peter Molnar (peter molnar.cc) MFC after: 3 days
Diffstat (limited to 'sys/netinet/ip_input.c')
-rw-r--r--sys/netinet/ip_input.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c
index 8be51fb..fdef645 100644
--- a/sys/netinet/ip_input.c
+++ b/sys/netinet/ip_input.c
@@ -1590,7 +1590,7 @@ ip_forward(struct mbuf *m, int srcrt)
* If IPsec is configured for this path,
* override any possibly mtu value set by ip_output.
*/
- mtu = ip_ipsec_mtu(m, mtu);
+ mtu = ip_ipsec_mtu(mcopy, mtu);
#endif /* IPSEC */
/*
* If the MTU was set before make sure we are below the
OpenPOWER on IntegriCloud