Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F160512564
D50460.id155857.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D50460.id155857.diff
View Options
diff --git a/sys/netinet6/icmp6.c b/sys/netinet6/icmp6.c
--- a/sys/netinet6/icmp6.c
+++ b/sys/netinet6/icmp6.c
@@ -2391,7 +2391,7 @@
icmp6_redirect_output(struct mbuf *m0, struct nhop_object *nh)
{
struct ifnet *ifp; /* my outgoing interface */
- struct in6_addr *ifp_ll6;
+ struct in6_addr ifp_ll6;
struct in6_addr *router_ll6;
struct ip6_hdr *sip6; /* m0 as struct ip6_hdr */
struct mbuf *m = NULL; /* newly allocated one */
@@ -2461,8 +2461,7 @@
IN6_IFF_NOTREADY|
IN6_IFF_ANYCAST)) == NULL)
goto fail;
- ifp_ll6 = &ia->ia_addr.sin6_addr;
- /* XXXRW: reference released prematurely. */
+ bcopy(&ia->ia_addr.sin6_addr, &ifp_ll6, sizeof(ifp_ll6));
ifa_free(&ia->ia_ifa);
}
@@ -2485,7 +2484,7 @@
ip6->ip6_nxt = IPPROTO_ICMPV6;
ip6->ip6_hlim = 255;
/* ip6->ip6_src must be linklocal addr for my outgoing if. */
- bcopy(ifp_ll6, &ip6->ip6_src, sizeof(struct in6_addr));
+ bcopy(&ifp_ll6, &ip6->ip6_src, sizeof(struct in6_addr));
bcopy(&sip6->ip6_src, &ip6->ip6_dst, sizeof(struct in6_addr));
/* ND Redirect */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jun 26, 6:18 AM (8 h, 20 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34339617
Default Alt Text
D50460.id155857.diff (1 KB)
Attached To
Mode
D50460: icmp6: fix use-after-reference-release
Attached
Detach File
Event Timeline
Log In to Comment