stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Patch "[PATCH 134/135] tipc: fix an infoleak in tipc_nl_compat_link_dump" has been added to the 4.4-stable tree
@ 2016-09-09 13:38 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2016-09-09 13:38 UTC (permalink / raw)
  To: kangjielu, alexander.levin, davem, gregkh, kjlu; +Cc: stable, stable-commits


This is a note to let you know that I've just added the patch titled

    [PATCH 134/135] tipc: fix an infoleak in tipc_nl_compat_link_dump

to the 4.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     0134-tipc-fix-an-infoleak-in-tipc_nl_compat_link_dump.patch
and it can be found in the queue-4.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From b3295e24834304c804eed1c95fd98ea93b6923ed Mon Sep 17 00:00:00 2001
From: Kangjie Lu <kangjielu@gmail.com>
Date: Thu, 14 Jul 2016 15:02:06 +0100
Subject: [PATCH 134/135] tipc: fix an infoleak in tipc_nl_compat_link_dump

[ Upstream commit 5d2be1422e02ccd697ccfcd45c85b4a26e6178e2 ]

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>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 net/tipc/netlink_compat.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/net/tipc/netlink_compat.c
+++ b/net/tipc/netlink_compat.c
@@ -574,7 +574,8 @@ static int tipc_nl_compat_link_dump(stru
 
 	link_info.dest = nla_get_flag(link[TIPC_NLA_LINK_DEST]);
 	link_info.up = htonl(nla_get_flag(link[TIPC_NLA_LINK_UP]));
-	strcpy(link_info.str, nla_data(link[TIPC_NLA_LINK_NAME]));
+	nla_strlcpy(link_info.str, nla_data(link[TIPC_NLA_LINK_NAME]),
+		    TIPC_MAX_LINK_NAME);
 
 	return tipc_add_tlv(msg->rep, TIPC_TLV_LINK_INFO,
 			    &link_info, sizeof(link_info));


Patches currently in stable-queue which might be from kangjielu@gmail.com are

queue-4.4/0134-tipc-fix-an-infoleak-in-tipc_nl_compat_link_dump.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-09-09 13:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-09 13:38 Patch "[PATCH 134/135] tipc: fix an infoleak in tipc_nl_compat_link_dump" has been added to the 4.4-stable tree gregkh

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