git: DragonFly_RELEASE_6_4 net: Fix ifnet_mtx deadlock in ifioctl()
Aaron LI
aly at crater.dragonflybsd.org
Mon Jul 20 22:26:34 PDT 2026
commit f5f3e1f5506db617274a4b521172ecc4d8e0b047
Author: Nathan Sapwell <nathan at dreamfast.solutions>
Date: Thu Jul 2 12:19:45 2026 +0000
net: Fix ifnet_mtx deadlock in ifioctl()
Several error paths in ifioctl()'s switch (SIOCGIFGROUP, SIOCAIFGROUP,
SIOCDIFGROUP, SIOCSIFDESCR) return directly instead of break, bypassing
the ifnet_unlock() at the end of the function. As a result, ifnet_mtx
is held across the switch and will block any future ifnet_lock() calls,
which basically breaks the network subsystem.
What makes matter worse is that SIOCGIFGROUP has no caps check, so
any local user can trigger such a deadlock in the network subsystem.
GitHub-PR: #47
Assisted-with: Zhipu GLM-5.2
Summary of changes:
sys/net/if.c | 22 ++++++++++------------
1 file changed, 10 insertions(+), 12 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/f5f3e1f5506db617274a4b521172ecc4d8e0b047
--
DragonFly BSD source repository
More information about the Commits
mailing list