Skip to content

Commit

Permalink
fixed a kernel crash due to a double-free introduced in the below fix
Browse files Browse the repository at this point in the history
  • Loading branch information
suz committed Mar 22, 2006
1 parent d7be582 commit 7763d8c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG
@@ -1,7 +1,11 @@
CHANGELOG for KAME kit
$KAME: CHANGELOG,v 1.2820 2006/03/17 07:23:30 suz Exp $
$KAME: CHANGELOG,v 1.2821 2006/03/22 18:48:46 suz Exp $

<200603>
2006-03-22 SUZUKI, Shinsuke <suz@alaxala.net>
* kame/sys/netinet6/nd6.c: fixed a kernel crash due to a double-free
introduced in the below fix

2006-03-17 SUZUKI, Shinsuke <suz@alaxala.net>
* kame/sys/netinet6/nd6.c: fixed a memory leak for an unresolved
packet in ND queue
Expand Down
8 changes: 7 additions & 1 deletion kame/sys/netinet6/nd6.c
@@ -1,4 +1,4 @@
/* $KAME: nd6.c,v 1.396 2006/03/17 07:23:31 suz Exp $ */
/* $KAME: nd6.c,v 1.397 2006/03/22 18:48:46 suz Exp $ */

/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
Expand Down Expand Up @@ -602,12 +602,18 @@ nd6_llinfo_timer(arg)
} else {
struct mbuf *m = ln->ln_hold;
if (m) {
struct mbuf *m0;

/*
* assuming every packet in ln_hold has the
* same IP header
*/
m0 = m->m_nextpkt;
m->m_nextpkt = NULL;
icmp6_error2(m, ICMP6_DST_UNREACH,
ICMP6_DST_UNREACH_ADDR, 0, rt->rt_ifp);

ln->ln_hold = m0;
clear_llinfo_pqueue(ln);
}
if (rt)
Expand Down

0 comments on commit 7763d8c

Please sign in to comment.