All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Freeing dst when the reference count <0 causes general protection fault, it could be a major security flaw as rogue app can modify dst to crash kernel.
@ 2014-09-13  8:27 Shakil A Khan
  2014-09-13 10:13 ` Hannes Frederic Sowa
  2014-09-13 11:50 ` Eric Dumazet
  0 siblings, 2 replies; 6+ messages in thread
From: Shakil A Khan @ 2014-09-13  8:27 UTC (permalink / raw)
  To: netdev, linux-kernel; +Cc: edumazet, davem, Shakil A Khan

Signed-off-by: Shakil A Khan <shakilk1729@gmail.com>
---
 net/core/dst.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/net/core/dst.c b/net/core/dst.c
index a028409..6a848b0 100644
--- a/net/core/dst.c
+++ b/net/core/dst.c
@@ -284,7 +284,10 @@ void dst_release(struct dst_entry *dst)
 		int newrefcnt;
 
 		newrefcnt = atomic_dec_return(&dst->__refcnt);
-		WARN_ON(newrefcnt < 0);
+
+		if (WARN(newrefcnt < 0, "dst reference count less than zero"))
+			return;
+
 		if (unlikely(dst->flags & DST_NOCACHE) && !newrefcnt)
 			call_rcu(&dst->rcu_head, dst_destroy_rcu);
 	}
-- 
1.9.3

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

end of thread, other threads:[~2014-09-14  3:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-13  8:27 [PATCH] Freeing dst when the reference count <0 causes general protection fault, it could be a major security flaw as rogue app can modify dst to crash kernel Shakil A Khan
2014-09-13 10:13 ` Hannes Frederic Sowa
2014-09-13 11:50 ` Eric Dumazet
2014-09-13 18:35   ` shakil A Khan
2014-09-14  3:54     ` Eric Dumazet
     [not found]   ` <CAGiEYNd7HEURq0vSh+MgmzG-jyWLF_8UcnbO7EeNMS_vznyX6g@mail.gmail.com>
2014-09-13 19:32     ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.