From: Masatake YAMATO <yamato@redhat.com>
To: netdev@vger.kernel.org
Cc: Masatake YAMATO <yamato@redhat.com>
Subject: [PATCH 1/2] genetlink: trigger BUG_ON if a group name is too long
Date: Tue, 19 Mar 2013 20:47:27 +0900 [thread overview]
Message-ID: <1363693648-10015-2-git-send-email-yamato@redhat.com> (raw)
In-Reply-To: <1363693648-10015-1-git-send-email-yamato@redhat.com>
Trigger BUG_ON if a group name is longer than GENL_NAMSIZ.
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
---
net/netlink/genetlink.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/netlink/genetlink.c b/net/netlink/genetlink.c
index f2aabb6..5a55be3 100644
--- a/net/netlink/genetlink.c
+++ b/net/netlink/genetlink.c
@@ -142,6 +142,7 @@ int genl_register_mc_group(struct genl_family *family,
int err = 0;
BUG_ON(grp->name[0] == '\0');
+ BUG_ON(memchr(grp->name, '\0', GENL_NAMSIZ) == NULL);
genl_lock();
--
1.7.11.7
next prev parent reply other threads:[~2013-03-19 17:28 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-19 11:47 [PATCH 0/2] netlink: protection and workaround for too long mcast group name Masatake YAMATO
2013-03-19 11:47 ` Masatake YAMATO [this message]
2013-03-20 16:07 ` [PATCH 1/2] genetlink: trigger BUG_ON if a group name is too long David Miller
2013-03-20 17:32 ` Ben Hutchings
2013-03-21 7:49 ` Masatake YAMATO
2013-03-20 21:01 ` Yinghai Lu
2013-03-20 21:05 ` David Miller
2013-03-20 21:06 ` Yinghai Lu
2013-03-20 21:13 ` David Miller
2013-03-20 21:16 ` Yinghai Lu
2013-03-20 22:10 ` David Miller
2013-03-20 22:17 ` Yinghai Lu
2013-03-20 22:18 ` David Miller
2013-04-23 9:27 ` Masatake YAMATO
2013-03-19 11:47 ` [PATCH 2/2] thermal: shorten too long mcast group name Masatake YAMATO
2013-03-20 16:08 ` David Miller
2013-03-21 7:46 ` Masatake YAMATO
2013-03-21 14:53 ` David Miller
[not found] ` <20130321.190819.892238877314124764.yamato@redhat.com>
2013-03-22 3:43 ` Masatake YAMATO
2013-03-22 14:04 ` David Miller
2013-03-21 13:04 ` Thomas Graf
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=1363693648-10015-2-git-send-email-yamato@redhat.com \
--to=yamato@redhat.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).