netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [IPV6]: Fix crash in ip6_del_rt
@ 2006-08-07  5:19 Patrick McHardy
  2006-08-07  5:23 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Patrick McHardy @ 2006-08-07  5:19 UTC (permalink / raw)
  To: David S. Miller; +Cc: Thomas Graf, Linux Netdev List

[-- Attachment #1: Type: text/plain, Size: 0 bytes --]



[-- Attachment #2: 01.diff --]
[-- Type: text/plain, Size: 921 bytes --]

[IPV6]: Fix crash in ip6_del_rt

ip6_null_entry doesn't have rt6i_table set, when trying to delete it the
kernel crashes dereferencing table->tb6_lock.

Signed-off-by: Patrick McHardy <kaber@trash.net>

---
commit d3ddd45b230e8b56873c77d266004fec49c44f8b
tree 764a548789cd495e2b424824c682734f62e9cb94
parent 10365c03ef65f5bccc992d6b78f7ef037cb4f0e9
author Patrick McHardy <kaber@trash.net> Mon, 07 Aug 2006 06:54:47 +0200
committer Patrick McHardy <kaber@trash.net> Mon, 07 Aug 2006 06:54:47 +0200

 net/ipv6/route.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index d5c39c4..c6c3cf3 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -1223,6 +1223,9 @@ int ip6_del_rt(struct rt6_info *rt, stru
 	int err;
 	struct fib6_table *table;
 
+	if (rt == &ip6_null_entry)
+		return -ENOENT;
+
 	table = rt->rt6i_table;
 	write_lock_bh(&table->tb6_lock);
 

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [IPV6]: Fix crash in ip6_del_rt
  2006-08-07  5:19 [IPV6]: Fix crash in ip6_del_rt Patrick McHardy
@ 2006-08-07  5:23 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2006-08-07  5:23 UTC (permalink / raw)
  To: kaber; +Cc: tgraf, netdev

From: Patrick McHardy <kaber@trash.net>
Date: Mon, 07 Aug 2006 07:19:05 +0200

> [IPV6]: Fix crash in ip6_del_rt
>
> ip6_null_entry doesn't have rt6i_table set, when trying to delete it the
> kernel crashes dereferencing table->tb6_lock.
>
> Signed-off-by: Patrick McHardy <kaber@trash.net>

Applied, thanks Patrick.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-08-07  5:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-07  5:19 [IPV6]: Fix crash in ip6_del_rt Patrick McHardy
2006-08-07  5:23 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).