* [PATCH] ipv4: make ip_append_data() handle NULL routing table
@ 2009-08-27 13:26 Julien TINNES
0 siblings, 0 replies; only message in thread
From: Julien TINNES @ 2009-08-27 13:26 UTC (permalink / raw)
To: linux-kernel; +Cc: torvalds, davem, security, taviso
Add a check in ip_append_data() for NULL *rtp to prevent future bugs in callers from being exploitable.
Signed-off-by: Julien Tinnes <julien@cr0.org>
Signed-off-by: Tavis Ormandy <taviso@sdf.lonestar.org>
Acked-by: David S. Miller <davem@davemloft.net>
---
diff -r b3cbf0ceeb34 net/ipv4/ip_output.c
--- a/net/ipv4/ip_output.c Mon Aug 24 14:48:29 2009 +0200
+++ b/net/ipv4/ip_output.c Thu Aug 27 15:20:36 2009 +0200
@@ -814,6 +814,8 @@
inet->cork.addr = ipc->addr;
}
rt = *rtp;
+ if (unlikely(!rt))
+ return -EFAULT;
/*
* We steal reference to this route, caller should not release it
*/
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-08-27 14:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-27 13:26 [PATCH] ipv4: make ip_append_data() handle NULL routing table Julien TINNES
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox