Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F164980789
D58552.id183104.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
968 B
Referenced Files
None
Subscribers
None
D58552.id183104.diff
View Options
diff --git a/sys/net/if_vxlan.h b/sys/net/if_vxlan.h
--- a/sys/net/if_vxlan.h
+++ b/sys/net/if_vxlan.h
@@ -97,6 +97,7 @@
#define VXLAN_CMD_GET_CONFIG 0
#define VXLAN_CMD_SET_VNI 1
#define VXLAN_CMD_SET_LOCAL_ADDR 2
+#define VXLAN_CMD_UNUSED_3 3
#define VXLAN_CMD_SET_REMOTE_ADDR 4
#define VXLAN_CMD_SET_LOCAL_PORT 5
#define VXLAN_CMD_SET_REMOTE_PORT 6
@@ -110,6 +111,9 @@
#define VXLAN_CMD_FTABLE_ENTRY_REM 14
#define VXLAN_CMD_FLUSH 15
+/* Unused CMD numbers */
+#define VXLAN_CMD_INVALID(cmd) ((cmd) == VXLAN_CMD_UNUSED_3)
+
struct ifvxlancfg {
uint32_t vxlc_vni;
union vxlan_sockaddr vxlc_local_sa;
diff --git a/sys/net/if_vxlan.c b/sys/net/if_vxlan.c
--- a/sys/net/if_vxlan.c
+++ b/sys/net/if_vxlan.c
@@ -2309,7 +2309,8 @@
} args;
int out, error;
- if (ifd->ifd_cmd >= vxlan_control_table_size)
+ if (ifd->ifd_cmd >= vxlan_control_table_size ||
+ VXLAN_CMD_INVALID(ifd->ifd_cmd))
return (EINVAL);
bzero(&args, sizeof(args));
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Aug 6, 5:15 AM (12 h, 17 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35786427
Default Alt Text
D58552.id183104.diff (968 B)
Attached To
Mode
D58552: if_vxlan(4): fix panic by validating unused drvspec values
Attached
Detach File
Event Timeline
Log In to Comment