[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170509123107.GG10395@distanz.ch>
Date: Tue, 9 May 2017 14:31:07 +0200
From: Tobias Klauser <tklauser@...tanz.ch>
To: Yotam Gigi <yotamg@...lanox.com>
Cc: davem@...emloft.net, zhangshengju@...s.chinamobile.com,
roopa@...ulusnetworks.com, sd@...asysnail.net,
bblanco@...mgrid.com, minipli@...glemail.com, nogahf@...lanox.com,
moshe@...lanox.com, rshearma@...cade.com, daniel@...earbox.net,
netdev@...r.kernel.org, David Ahern <dsa@...ulusnetworks.com>
Subject: Re: [PATCH net] rtnetlink: Fix the IFLA_PHYS_PORT_NAME TLV to
include terminating NULL
On 2017-05-09 at 14:12:02 +0200, Yotam Gigi <yotamg@...lanox.com> wrote:
> The IFLA_PHYS_PORT_NAME rtnetlink TLV length does not include the
> terminating NULL character, which is different from other string typed
> TLVs. Due to the fact that libnl checks for the terminating NULL in every
> string typed attribute, it crashes on every RTM_GETLINK response on
> drivers that implement ndo_get_phys_port_name.
>
> Make the fill_phys_port_name function include the terminating NULL in the
> TLV size by using the nla_put_string helper function.
>
> Fixes: db24a9044ee1 ("net: add support for phys_port_name")
> Signed-off-by: Yotam Gigi <yotamg@...lanox.com>
> Cc: David Ahern <dsa@...ulusnetworks.com>
> Reviewed-by: Ido Schimmel <idosch@...lanox.com>
> Acked-by: Jiri Pirko <jiri@...lanox.com>
> ---
> Please consider this for stable too. Thanks!
This is already fixed in commit 77ef033b687c ("rtnetlink: NUL-terminate
IFLA_PHYS_PORT_NAME string").
Powered by blists - more mailing lists