From: Pablo Neira <pablo@netfilter.org>
To: Netfilter Development Mailinglist <netfilter-devel@lists.netfilter.org>
Cc: Harald Welte <laforge@netfilter.org>
Subject: [PATCH 2/7] check if CTA_PROTOINFO_TCP is present
Date: Fri, 04 Nov 2005 19:00:21 +0100 [thread overview]
Message-ID: <436BA1B5.9090905@netfilter.org> (raw)
[-- 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;
reply other threads:[~2005-11-04 18:00 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=436BA1B5.9090905@netfilter.org \
--to=pablo@netfilter.org \
--cc=laforge@netfilter.org \
--cc=netfilter-devel@lists.netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.