Commit d7a4b9d0 authored by Dann Frazier's avatar Dann Frazier

* bugfix/ipv4-fib_props-out-of-bounds.patch

  [SECURITY] Fix a typo which caused fib_props[] to be of the wrong size
  and check for out of bounds condition in index provided by userspace
  See CVE-2007-2172

svn path=/dists/etch-security/linux-2.6/; revision=9385
parent 13a3838b
linux-2.6 (2.6.18.dfsg.1-13etch2) UNRELEASED; urgency=low
* bugfix/ipv4-fib_props-out-of-bounds.patch
[SECURITY] Fix a typo which caused fib_props[] to be of the wrong size
and check for out of bounds condition in index provided by userspace
See CVE-2007-2172
-- dann frazier <dannf@debian.org> Mon, 27 Aug 2007 22:16:19 -0600
linux-2.6 (2.6.18.dfsg.1-13etch1) stable-security; urgency=high
* Update abi reference files for ABI 5
......
From: Thomas Graf <tgraf@suug.ch>
Date: Sun, 25 Mar 2007 03:32:54 +0000 (-0700)
Subject: [IPv4] fib: Fix out of bound access of fib_props[]
X-Git-Tag: v2.6.21~241^2~12
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=a0ee18b9b7d3847976c6fb315c06a34fb296de0e
[IPv4] fib: Fix out of bound access of fib_props[]
Fixes a typo which caused fib_props[] to have the wrong size
and makes sure the value used to index the array which is
provided by userspace via netlink is checked to avoid out of
bound access.
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
---
Backported to Debian's 2.6.18 by dann frazier <dannf@debian.org>, heavily
based upon Tim Gardner's backport for Ubuntu:
http://kernel.ubuntu.com/git?p=ubuntu/ubuntu-edgy.git;a=commitdiff;h=6e87288e83ac08e7154980795622efdafd49c9c8
--- linux-source-2.6.18.orig/net/ipv4/fib_semantics.c 2006-09-19 21:42:06.000000000 -0600
+++ linux-source-2.6.18/net/ipv4/fib_semantics.c 2007-08-27 22:15:04.678316443 -0600
@@ -88,7 +88,7 @@ static const struct
{
int error;
u8 scope;
-} fib_props[RTA_MAX + 1] = {
+} fib_props[RTN_MAX + 1] = {
{
.error = 0,
.scope = RT_SCOPE_NOWHERE,
@@ -662,6 +662,9 @@ fib_create_info(const struct rtmsg *r, s
u32 mp_alg = IP_MP_ALG_NONE;
#endif
+ if (r->rtm_type > RTN_MAX)
+ goto err_inval;
+
/* Fast check to catch the most weird cases */
if (fib_props[r->rtm_type].scope > r->rtm_scope)
goto err_inval;
+ bugfix/ipv4-fib_props-out-of-bounds.patch
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment