tipc: fix an infoleak in tipc_nl_compat_link_dump
authorKangjie Lu <kangjielu@gmail.com>
Thu, 2 Jun 2016 08:04:56 +0000 (04:04 -0400)
committerBen Hutchings <ben@decadent.org.uk>
Mon, 22 Aug 2016 21:37:19 +0000 (22:37 +0100)
commit 5d2be1422e02ccd697ccfcd45c85b4a26e6178e2 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>
[bwh: Backported to 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>

No differences found