* [PATCH 2/7] check if CTA_PROTOINFO_TCP is present
@ 2005-11-04 18:00 Pablo Neira
0 siblings, 0 replies; only message in thread
From: Pablo Neira @ 2005-11-04 18:00 UTC (permalink / raw)
To: Netfilter Development Mailinglist; +Cc: Harald Welte
[-- Attachment #1: Type: text/plain, Size: 334 bytes --]
This fixes an oops triggered from userspace. If we don't pass
information about the private protocol info, the reference to attr will
be NULL. This is likely to happen in update messages.
--
The dawn of the fourth age of Linux firewalling is coming; a time of
great struggle and heroic deeds -- J.Kadlecsik got inspired by J.Morris
[-- Attachment #2: 05-check-protoinfo.patch --]
[-- Type: text/plain, Size: 984 bytes --]
This fixes an oops triggered from userspace. If we don't pass information
about the private protocol info, the reference to attr will be NULL. This is
likely to happen in update messages.
Signed-out-by: Pablo Neira Ayuso <pablo@netfilter.org>
Index: net-2.6.git/net/ipv4/netfilter/ip_conntrack_proto_tcp.c
===================================================================
--- net-2.6.git.orig/net/ipv4/netfilter/ip_conntrack_proto_tcp.c 2005-11-04 17:44:54.000000000 +0100
+++ net-2.6.git/net/ipv4/netfilter/ip_conntrack_proto_tcp.c 2005-11-04 17:45:24.000000000 +0100
@@ -362,6 +362,11 @@ static int nfattr_to_tcp(struct nfattr *
struct nfattr *attr = cda[CTA_PROTOINFO_TCP-1];
struct nfattr *tb[CTA_PROTOINFO_TCP_MAX];
+ /* updates could not contain anything about the private
+ * protocol info, in that case skip the parsing. */
+ if (!attr)
+ return 0;
+
if (nfattr_parse_nested(tb, CTA_PROTOINFO_TCP_MAX, attr) < 0)
goto nfattr_failure;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-11-04 18:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-04 18:00 [PATCH 2/7] check if CTA_PROTOINFO_TCP is present Pablo Neira
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.