[SRU][Q][PATCH v2 1/1] UBUNTU: SAUCE: fan: vxlan: parse fan-map from IFLA_VXLAN_FAN_MAP attribute ID

Jacob Martin jacob.martin at canonical.com
Fri Jun 20 20:01:24 UTC 2025


BugLink: https://bugs.launchpad.net/bugs/2113992

Before 6c11379b104e ("vxlan: Add an attribute to make VXLAN header
validation configurable"), IFLA_IPTUN_FAN_MAP and IFLA_VXLAN_FAN_MAP
shared the same integer value, allowing them to be used interchangeably
without issue, even though they represented attributes for different
link types. The introduction of IFLA_VXLAN_RESERVED_BITS led to
IFLA_VXLAN_FAN_MAP's integer value being incremented by 1 (33 to 34).
Thus the presence of attribute IFLA_VXLAN_FAN_MAP is checked but parsing
of the fan-map is attempted by accessing IFLA_IPTUN_FAN_MAP, causing a
NULL pointer dereference when creating a VXLAN device with a Fan
mapping.

This is resolved by adjusting the vxlan_parse_fan_map() function to
access the correct IFLA_VXLAN_FAN_MAP attribute instead of
IFLA_IPTUN_FAN_MAP.

Fixes: 9ce64bb8afd8 ("UBUNTU: SAUCE: fan: add VXLAN implementation")
Signed-off-by: Jacob Martin <jacob.martin at canonical.com>
---
 drivers/net/vxlan/vxlan_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/vxlan/vxlan_core.c b/drivers/net/vxlan/vxlan_core.c
index 152a5f060bf6..dfd8604c2b58 100644
--- a/drivers/net/vxlan/vxlan_core.c
+++ b/drivers/net/vxlan/vxlan_core.c
@@ -164,7 +164,7 @@ static int vxlan_parse_fan_map(struct nlattr *data[], struct vxlan_dev *vxlan)
 	struct nlattr *attr;
 	int rem, rv;
 
-	nla_for_each_nested(attr, data[IFLA_IPTUN_FAN_MAP], rem) {
+	nla_for_each_nested(attr, data[IFLA_VXLAN_FAN_MAP], rem) {
 		map = nla_data(attr);
 		rv = vxlan_fan_add_map(vxlan, map);
 		if (rv)
-- 
2.43.0




More information about the kernel-team mailing list