From: Jetchko Jekov <jetchko.jekov@nokia.com>
To: netdev@vger.kernel.org
Subject: [PATCH] Raising the size of the buffer holding nl messages
Date: Thu, 21 May 2015 17:03:36 +0200 [thread overview]
Message-ID: <555DF3C8.10006@nokia.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 3 bytes --]
[-- Attachment #2: 0001-Raising-the-size-of-the-buffer-holding-nl-messages.patch --]
[-- Type: text/x-patch, Size: 825 bytes --]
>From 68f0dda45a4f1bca070849f3f04a409de897ee0f Mon Sep 17 00:00:00 2001
From: Jetchko Jekov <jetchko.jekov@nokia.com>
Date: Thu, 21 May 2015 16:32:24 +0200
Subject: [PATCH] Raising the size of the buffer holding nl messages.
Now it matches the size for the answer defined in rtnl_talk()
and prevents stack corruption with answer > 1024 bytes.
---
ip/link_gre.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ip/link_gre.c b/ip/link_gre.c
index 1d78387..1937261 100644
--- a/ip/link_gre.c
+++ b/ip/link_gre.c
@@ -53,7 +53,7 @@ static int gre_parse_opt(struct link_util *lu, int argc, char **argv,
struct {
struct nlmsghdr n;
struct ifinfomsg i;
- char buf[1024];
+ char buf[16384];
} req;
struct ifinfomsg *ifi = (struct ifinfomsg *)(n + 1);
struct rtattr *tb[IFLA_MAX + 1];
--
2.1.0
reply other threads:[~2015-05-21 15:03 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=555DF3C8.10006@nokia.com \
--to=jetchko.jekov@nokia.com \
--cc=netdev@vger.kernel.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 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).