Re: [PATCH net] rtnetlink: Fix the IFLA_PHYS_PORT_NAME TLV to include terminating NULL
On 05/09/2017 03:31 PM, Tobias Klauser wrote: > On 2017-05-09 at 14:12:02 +0200, Yotam Gigiwrote: >> 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 >> Cc: David Ahern >> Reviewed-by: Ido Schimmel >> Acked-by: Jiri Pirko >> --- >> Please consider this for stable too. Thanks! > This is already fixed in commit 77ef033b687c ("rtnetlink: NUL-terminate > IFLA_PHYS_PORT_NAME string"). You are right. I forgot to rebase my net tree :)
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 Gigiwrote: > 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 > Cc: David Ahern > Reviewed-by: Ido Schimmel > Acked-by: Jiri Pirko > --- > Please consider this for stable too. Thanks! This is already fixed in commit 77ef033b687c ("rtnetlink: NUL-terminate IFLA_PHYS_PORT_NAME string").