From: David Miller <davem@davemloft.net>
To: kangjielu@gmail.com
Cc: jon.maloy@ericsson.com, ying.xue@windriver.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
taesoo@gatech.edu, csong84@gatech.edu, kjlu@gatech.edu
Subject: Re: [PATCH] tipc: fix an infoleak in tipc_nl_compat_link_dump
Date: Wed, 01 Jun 2016 23:32:16 -0700 (PDT) [thread overview]
Message-ID: <20160601.233216.1293792015714271361.davem@davemloft.net> (raw)
In-Reply-To: <1464798895-26870-1-git-send-email-kjlu@gatech.edu>
From: Kangjie Lu <kangjielu@gmail.com>
Date: Wed, 1 Jun 2016 12:34:55 -0400
> diff --git a/net/tipc/netlink_compat.c b/net/tipc/netlink_compat.c
> index f795b1d..115aafa 100644
> --- a/net/tipc/netlink_compat.c
> +++ b/net/tipc/netlink_compat.c
> @@ -604,6 +604,7 @@ static int tipc_nl_compat_link_dump(struct tipc_nl_compat_msg *msg,
>
> link_info.dest = nla_get_flag(link[TIPC_NLA_LINK_DEST]);
> link_info.up = htonl(nla_get_flag(link[TIPC_NLA_LINK_UP]));
> + memset((void *)link_info.str, 0, TIPC_MAX_LINK_NAME);
> strcpy(link_info.str, nla_data(link[TIPC_NLA_LINK_NAME]));
>
Please instead use "nla_strlcpy()".
Thanks.
next prev parent reply other threads:[~2016-06-02 6:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-01 16:34 Kangjie Lu
2016-06-02 6:32 ` David Miller [this message]
2016-06-02 8:04 Kangjie Lu
2016-06-03 4:32 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160601.233216.1293792015714271361.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=csong84@gatech.edu \
--cc=jon.maloy@ericsson.com \
--cc=kangjielu@gmail.com \
--cc=kjlu@gatech.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=taesoo@gatech.edu \
--cc=ying.xue@windriver.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®