linux/net/tipc/node.c
Kangjie Lu 3d4997da79 tipc: fix an infoleak in tipc_nl_compat_link_dump
commit 5d2be1422e upstream.

link_info.str is a char array of size 60. Memory after the NULL
byte is not initialized. Sending the whole object out can cause
a leak.

Signed-off-by: Kangjie Lu <kjlu@gatech.edu>
Signed-off-by: David S. Miller <davem@davemloft.net>
[carnil: Backported to 3.16 (same as bwh did for 3.2): the unpadded strcpy() is
in tipc_node_get_links() and no nlattr is involved, so use strncpy()]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
2016-08-22 22:38:28 +01:00

489 lines
13 KiB