Skip to content

Commit

Permalink
sriov: fix crash in rtnl_link_sriov_parse_vflist
Browse files Browse the repository at this point in the history
vf_vlan_info was incorrectly indexed with "len" (the length in bytes
of the entire vfinfo_list rather than list_len (the index of the
current end of the vf_vlan_info array)

thom311/libnl#126
http://lists.infradead.org/pipermail/libnl/2017-January/002270.html

Fixes: 5d6e43e

Signed-off-by: Thomas Haller <thaller@redhat.com>
  • Loading branch information
Laine Stump authored and thom311 committed Jan 17, 2017
1 parent ecc5e34 commit bad947f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/route/link/sriov.c
Expand Up @@ -568,7 +568,7 @@ int rtnl_link_sriov_parse_vflist(struct rtnl_link *link, struct nlattr **tb) {
list_len = 0;
nla_for_each_nested(nla_list, t[IFLA_VF_VLAN_LIST],
list_rem) {
vf_vlan_info[len] = nla_data(nla_list);
vf_vlan_info[list_len] = nla_data(nla_list);
list_len++;
}

Expand Down

0 comments on commit bad947f

Please sign in to comment.