Skip to content

netlink: protection and workaround for too long mcast group name

Masatake YAMATO linux-acpi linux-pm netdev 1 version Applied

Status from this message: Applied, thanks.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 18 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/2genetlink: trigger BUG_ON if a group name is too longnet/netlink/genetlink.c+1 -012 replies
2/2thermal: shorten too long mcast group nameinclude/linux/thermal.h+1 -16 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] netlink: protection and workaround for too long mcast group name

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(-)
Signature · 1 line
1.7.11.7