diff mbox

[3.5.y.z,extended,stable] Patch "genetlink: trigger BUG_ON if a group name is too long" has been added to staging queue

Message ID 1365081917-14297-1-git-send-email-luis.henriques@canonical.com
State New
Headers show

Commit Message

Luis Henriques April 4, 2013, 1:25 p.m. UTC
This is a note to let you know that I have just added a patch titled

    genetlink: trigger BUG_ON if a group name is too long

to the linux-3.5.y-queue branch of the 3.5.y.z extended stable tree 
which can be found at:

 http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.5.y-queue

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.5.y.z tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Luis

------

From f2f9accdee1126679517df03d791fa19e2a82e50 Mon Sep 17 00:00:00 2001
From: Masatake YAMATO <yamato@redhat.com>
Date: Tue, 19 Mar 2013 01:47:27 +0000
Subject: [PATCH] genetlink: trigger BUG_ON if a group name is too long

commit f1e79e208076ffe7bad97158275f1c572c04f5c7 upstream.

Trigger BUG_ON if a group name is longer than GENL_NAMSIZ.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
 net/netlink/genetlink.c | 1 +
 1 file changed, 1 insertion(+)

--
1.8.1.2
diff mbox

Patch

diff --git a/net/netlink/genetlink.c b/net/netlink/genetlink.c
index 2cc7c1e..4be473d 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();