public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Chris Wright <chrisw@osdl.org>
To: linux-kernel@vger.kernel.org, stable@kernel.org
Cc: Justin Forbes <jmforbes@linuxtx.org>,
	Zwane Mwaikambo <zwane@arm.linux.org.uk>,
	"Theodore Ts'o" <tytso@mit.edu>,
	Randy Dunlap <rdunlap@xenotime.net>,
	Dave Jones <davej@redhat.com>,
	Chuck Wolber <chuckw@quantumlinux.com>,
	torvalds@osdl.org, akpm@osdl.org, alan@lxorguk.ukuu.org.uk,
	Harald Welte <laforge@netfilter.org>,
	Pablo Neira Ayuso <pablo@netfilter.org>
Subject: [patch 11/23] [PATCH] [NETFILTER] ctnetlink: check if protoinfo is present
Date: Tue, 22 Nov 2005 13:07:51 -0800	[thread overview]
Message-ID: <20051122210751.GL28140@shell0.pdx.osdl.net> (raw)
In-Reply-To: 20051122205223.099537000@localhost.localdomain

[-- Attachment #1: ctnetlink-check-if-protoinfo-is-present.patch --]
[-- Type: text/plain, Size: 1125 bytes --]

-stable review patch.  If anyone has any objections, please let us know.
------------------

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-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: Chris Wright <chrisw@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 net/ipv4/netfilter/ip_conntrack_proto_tcp.c |    5 +++++
 1 file changed, 5 insertions(+)

--- linux-2.6.14.2.orig/net/ipv4/netfilter/ip_conntrack_proto_tcp.c
+++ linux-2.6.14.2/net/ipv4/netfilter/ip_conntrack_proto_tcp.c
@@ -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;
 

--

  parent reply	other threads:[~2005-11-22 21:09 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20051122205223.099537000@localhost.localdomain>
2005-11-22 21:06 ` [patch 05/23] [PATCH] VFS: Fix memory leak with file leases Chris Wright
2005-11-22 21:06 ` [patch 06/23] [PATCH] Generic HDLC WAN drivers - disable netif_carrier_off() Chris Wright
2005-11-22 21:06 ` [patch 07/23] [PATCH] [NETFILTER] PPTP helper: Fix endianness bug in GRE key / CallID NAT Chris Wright
2005-11-22 21:06 ` [patch 08/23] [PATCH] [NETFILTER] NAT: Fix module refcount dropping too far Chris Wright
2005-11-22 21:06 ` [patch 09/23] [PATCH] [NETFILTER] nf_queue: Fix Ooops when no queue handler registered Chris Wright
2005-11-22 21:06 ` [patch 10/23] [PATCH] [NETFILTER] refcount leak of proto when ctnetlink dumping tuple Chris Wright
2005-11-22 21:07 ` Chris Wright [this message]
2005-11-22 21:07 ` [patch 12/23] [PATCH] [NETFILTER] PPTP helper: fix PNS-PAC expectation call id Chris Wright
2005-11-22 21:08 ` [patch 13/23] [PATCH] [NETFILTER] ctnetlink: Fix oops when no ICMP ID info in message Chris Wright
2005-11-22 23:31   ` Krzysztof Oledzki
2005-11-23  0:10     ` Chris Wright
2005-11-23  6:59     ` Harald Welte
2005-11-23 19:17       ` Chris Wright
2005-11-22 21:08 ` [patch 14/23] [PATCH] [NETFILTER] ip_conntrack TCP: Accept SYN+PUSH like SYN Chris Wright
2005-11-22 21:08 ` [patch 15/23] [PATCH] [NETFILTER] ip_conntrack: fix ftp/irc/tftp helpers on ports >= 32768 Chris Wright
2005-11-22 21:08 ` [patch 16/23] [PATCH] [IPV6]: Fix memory management error during setting up new advapi sockopts Chris Wright
2005-11-22 21:08 ` [patch 17/23] [PATCH] [IPV6]: Fix calculation of AH length during filling ancillary data Chris Wright
2005-11-22 21:08 ` [patch 18/23] [PATCH] [IPV6]: Fix sending extension headers before and including routing header Chris Wright
2005-11-22 21:08 ` [patch 19/23] [PATCH] x86_64/i386: Compute correct MTRR mask on early Noconas Chris Wright
2005-11-22 21:08 ` [patch 20/23] drivers/isdn/hardware/eicon/os_4bri.c: correct the xdiLoadFile() signature Chris Wright
2005-11-22 21:08 ` [patch 21/23] [PATCH] hwmon: Fix missing boundary check when setting W83627THF in0 limits Chris Wright
2005-11-22 21:08 ` [patch 22/23] hwmon: Fix lm78 VID conversion Chris Wright
2005-11-22 21:09 ` [patch 23/23] hwmon: Fix missing it87 fan div init Chris Wright

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=20051122210751.GL28140@shell0.pdx.osdl.net \
    --to=chrisw@osdl.org \
    --cc=akpm@osdl.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=chuckw@quantumlinux.com \
    --cc=davej@redhat.com \
    --cc=jmforbes@linuxtx.org \
    --cc=laforge@netfilter.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pablo@netfilter.org \
    --cc=rdunlap@xenotime.net \
    --cc=stable@kernel.org \
    --cc=torvalds@osdl.org \
    --cc=tytso@mit.edu \
    --cc=zwane@arm.linux.org.uk \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox