Summary: | Out of bounds access in vlan | ||
---|---|---|---|
Product: | Base System | Reporter: | CTurt <ecturt> |
Component: | kern | Assignee: | Mark Johnston <markj> |
Status: | Closed FIXED | ||
Severity: | Affects Only Me | CC: | emaste, markj, net, op |
Priority: | --- | ||
Version: | CURRENT | ||
Hardware: | Any | ||
OS: | Any |
Description
CTurt
2017-05-23 12:36:18 UTC
vlan(4) doesn't even export the struct ifv_linkmib structure to userspace. It never has, as far as I can see, and all other uses of if_linkmib use it to export standard MIBs to userspace. I think it's a mistake that vlan(4) sets if_linkmib to begin with. It's also worth nothing that no modern drivers set if_linkmib, so the IFDATA_LINKSPECIFIC interface is effectively obsolete. A commit references this bug: Author: markj Date: Wed Jan 9 16:47:16 UTC 2019 New revision: 342887 URL: https://svnweb.freebsd.org/changeset/base/342887 Log: Stop setting if_linkmib in vlan(4) ifnets. There are several reasons: - The structure being exported via IFDATA_LINKSPECIFIC doesn't appear to be a standard MIB. - The structure being exported is private to the kernel and always has been. - No other drivers in common use set the if_linkmib field. - Because IFDATA_LINKSPECIFIC can be used to overwrite the linkmib structure, a privileged user could use it to corrupt internal vlan(4) state. [1] PR: 219472 Reported by: CTurt <ecturt@gmail.com> [1] Reviewed by: kp (previous version) MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D18779 Changes: head/sys/net/if_vlan.c A commit references this bug: Author: markj Date: Wed Jan 16 03:07:33 UTC 2019 New revision: 343076 URL: https://svnweb.freebsd.org/changeset/base/343076 Log: MFC r342887: Stop setting if_linkmib in vlan(4) ifnets. PR: 219472 Changes: _U stable/11/ stable/11/sys/net/if_vlan.c _U stable/12/ stable/12/sys/net/if_vlan.c |