For vxlan fan networks, iproute2 uses the flag IFLA_VXLAN_FAN_MAP to
configure Ubuntu Fan vxlan devices.

The vxlan fan netlink data parsing is handled in the kernel (see
drivers/net/vxlan/vxlan_core.c) with:

...
if (data[IFLA_VXLAN_FAN_MAP]) {
        err = vxlan_parse_fan_map(data, vxlan);
        if (err)
                return err;
}
...

...
static int vxlan_parse_fan_map(struct nlattr *data[], struct vxlan_dev *vxlan)
{
        struct ifla_fan_map *map;
        struct nlattr *attr;
        int rem, rv;

        nla_for_each_nested(attr, data[IFLA_IPTUN_FAN_MAP], rem) {
                map = nla_data(attr);
                rv = vxlan_fan_add_map(vxlan, map);
                if (rv)
                        return rv;
        }

        return 0;
}
...

The vxlan_parse_fan_map() function incorrectly uses the
IFLA_IPTUN_FAN_MAP flag instead of IFLA_VXLAN_FAN_MAP.

In the past, IFLA_VXLAN_FAN_MAP == IFLA_IPTUN_FAN_MAP == 33, and so this
worked. Now, IFLA_VXLAN_FAN_MAP == 34, while IFLA_IPTUN_FAN_MAP == 33,
so it checks for attributes at IFLA_VXLAN_FAN_MAP (34) but attempts to
access attributes at IFLA_IPTUN_FAN_MAP (33).

A straightforward fix appears to be adjusting vxlan_parse_fan_map() to
access IFLA_VXLAN_FAN_MAP instead of IFLA_IPTUN_FAN_MAP.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2113992

Title:
  NULL pointer dereference caught by ubuntu_fan_smoke_test:sut-scan

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2113992/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to