From: Thomas Graf <tgraf@suug.ch>
To: "David S. Miller" <davem@davemloft.net>
Cc: netdev@oss.sgi.com
Subject: [PATCH 2.6 NET] Catch wrong RTATTR_MAX with BUG()
Date: Thu, 9 Sep 2004 18:43:46 +0200 [thread overview]
Message-ID: <20040909164346.GA18994@postel.suug.ch> (raw)
Catches outdated/invalid RTATTR_MAX and therefore avoids possible stack
corruption.
Signed-off-by: Thomas Graf <tgraf@suug.ch>
--- linux-2.6.9-rc1-bk15.orig/net/core/rtnetlink.c 2004-09-08 18:33:42.000000000 +0200
+++ linux-2.6.9-rc1-bk15/net/core/rtnetlink.c 2004-09-09 18:18:22.000000000 +0200
@@ -450,6 +450,9 @@
sz_idx = type>>2;
kind = type&3;
+ if (RTATTR_MAX < rta_max[sz_idx])
+ BUG();
+
if (kind != 2 && security_netlink_recv(skb)) {
*errp = -EPERM;
return -1;
next reply other threads:[~2004-09-09 16:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-09 16:43 Thomas Graf [this message]
2004-09-09 16:55 ` [PATCH 2.6 NET] Catch wrong RTATTR_MAX with BUG() David S. Miller
2004-09-09 17:24 ` YOSHIFUJI Hideaki / 吉藤英明
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=20040909164346.GA18994@postel.suug.ch \
--to=tgraf@suug.ch \
--cc=davem@davemloft.net \
--cc=netdev@oss.sgi.com \
/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;
as well as URLs for NNTP newsgroup(s).