[Bug 275920] Kernel crash in sys/netlink/route/iface.c:124

[email protected]
Newsgroups gmane.os.freebsd.devel.net
Message-ID <[email protected]/bugzilla/>
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=275920

--- Comment #6 from [email protected] ---
A commit in branch main references this bug:

URL:
https://cgit.FreeBSD.org/src/commit/?id=43387b4e574043b78a58c8bcb7575161b055fce1

commit 43387b4e574043b78a58c8bcb7575161b055fce1
Author:     Kristof Provost <[email protected]>
AuthorDate: 2024-05-06 09:39:08 +0000
Commit:     Kristof Provost <[email protected]>
CommitDate: 2024-05-06 09:39:08 +0000

    if: guard against if_ioctl being NULL

    There are situations where an struct ifnet has a NULL if_ioctl pointer.

    For example, e6000sw creates such struct ifnets for each of its ports so it
can
    call into the MII code.

    If there is then a link state event this calls do_link_state_change()
    -> rtnl_handle_ifevent() -> dump_iface() -> get_operstate() ->
    get_operstate_ether(). That wants to know if the link is up or down, so it
tries
    to ioctl(SIOCGIFMEDIA), which doesn't go well if if_ioctl is NULL.

    Guard against this, and return EOPNOTSUPP.

    PR:             275920
    MFC ater:       3 days
    Sponsored by:   Rubicon Communications, LLC ("Netgate")

 sys/net/if.c | 3 +++
 1 file changed, 3 insertions(+)

-- 
You are receiving this mail because:
You are the assignee for the bug.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.