netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] netlink: protection and workaround for too long mcast group name
@ 2013-03-19 11:47 Masatake YAMATO
  2013-03-19 11:47 ` [PATCH 1/2] genetlink: trigger BUG_ON if a group name is too long Masatake YAMATO
  2013-03-19 11:47 ` [PATCH 2/2] thermal: shorten too long mcast group name Masatake YAMATO
  0 siblings, 2 replies; 21+ messages in thread
From: Masatake YAMATO @ 2013-03-19 11:47 UTC (permalink / raw)
  To: netdev; +Cc: Masatake YAMATO

You will see garbage at the end of line in the output of following command line:

	$ genl ctrl show | grep thermal_mc_group
        #1:  ID-0x2  name: thermal_mc_group^B

The type of structure field for "name" is char[16]:

    #define GENL_NAMSIZ	16	/* length of family name */
    ...
    struct genl_multicast_group {
            ...
	    char		name[GENL_NAMSIZ];
            ...
    };

strlen("thermal_mc_group") == 16 is too long for the array size.

This patch series provid a protection(patch for genetlink) for this 
kind of bug and workaround(patch for thermal). 

Masatake YAMATO (2):
  genetlink: trigger BUG_ON if a group name is too long
  thermal: shorten too long mcast group name

 include/linux/thermal.h | 2 +-
 net/netlink/genetlink.c | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

-- 
1.7.11.7

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2013-04-23  9:27 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH 1/2] genetlink: trigger BUG_ON if a group name is too long Masatake YAMATO
2013-03-20 16:07   ` 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

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).