[patch] netfilter: nfnetlink: guard against undefined entries

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



parent a391d495f6082f6348b9074214e81c7e2dc1151c (v2.6.37-rc1-184-ga391d49)
commit 6e97eb121bc8e39c651645c3d937f468d2b3e7fe
Author: Jan Engelhardt <jengelh@xxxxxxxxxx>
Date:   Sat Nov 6 21:19:16 2010 +0100

netfilter: nfnetlink: guard against undefined entries

Check for empty entries in struct nfnl_callback[] to avoid potential
NULL deference. (Because I have run into one during development.)

Signed-off-by: Jan Engelhardt <jengelh@xxxxxxxxxx>
---
 net/netfilter/nfnetlink.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/netfilter/nfnetlink.c b/net/netfilter/nfnetlink.c
index b4a4532..7012882 100644
--- a/net/netfilter/nfnetlink.c
+++ b/net/netfilter/nfnetlink.c
@@ -152,7 +152,7 @@ replay:
 	}
 
 	nc = nfnetlink_find_client(type, ss);
-	if (!nc)
+	if (nc == NULL || nc->call == NULL)
 		return -EINVAL;
 
 	{
-- 
# Created with git-export-patch
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux