Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1429174 > unrolled thread

[PATCH 3.14 24/29] netfilter: x_tables: assert minimum target size

Started byGreg Kroah-Hartman <gregkh@linuxfoundation.org>
First post2016-06-23 00:50 +0200
Last post2016-06-23 00:50 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 3.14 24/29] netfilter: x_tables: assert minimum target size Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-23 00:50 +0200

#1429174 — [PATCH 3.14 24/29] netfilter: x_tables: assert minimum target size

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2016-06-23 00:50 +0200
Subject[PATCH 3.14 24/29] netfilter: x_tables: assert minimum target size
Message-ID<rMZ87-15H-45@gated-at.bofh.it>
3.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Florian Westphal <fw@strlen.de>

commit a08e4e190b866579896c09af59b3bdca821da2cd upstream.

The target size includes the size of the xt_entry_target struct.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 net/netfilter/x_tables.c |    3 +++
 1 file changed, 3 insertions(+)

--- a/net/netfilter/x_tables.c
+++ b/net/netfilter/x_tables.c
@@ -587,6 +587,9 @@ int xt_check_entry_offsets(const void *b
 		return -EINVAL;
 
 	t = (void *)(e + target_offset);
+	if (t->u.target_size < sizeof(*t))
+		return -EINVAL;
+
 	if (target_offset + t->u.target_size > next_offset)
 		return -EINVAL;
 

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web