CVE-2025-39874
Severity CVSS v4.0:
Pending analysis
Type:
Unavailable / Other
Publication date:
23/09/2025
Last modified:
24/09/2025
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
macsec: sync features on RTM_NEWLINK<br />
<br />
Syzkaller managed to lock the lower device via ETHTOOL_SFEATURES:<br />
<br />
netdev_lock include/linux/netdevice.h:2761 [inline]<br />
netdev_lock_ops include/net/netdev_lock.h:42 [inline]<br />
netdev_sync_lower_features net/core/dev.c:10649 [inline]<br />
__netdev_update_features+0xcb1/0x1be0 net/core/dev.c:10819<br />
netdev_update_features+0x6d/0xe0 net/core/dev.c:10876<br />
macsec_notify+0x2f5/0x660 drivers/net/macsec.c:4533<br />
notifier_call_chain+0x1b3/0x3e0 kernel/notifier.c:85<br />
call_netdevice_notifiers_extack net/core/dev.c:2267 [inline]<br />
call_netdevice_notifiers net/core/dev.c:2281 [inline]<br />
netdev_features_change+0x85/0xc0 net/core/dev.c:1570<br />
__dev_ethtool net/ethtool/ioctl.c:3469 [inline]<br />
dev_ethtool+0x1536/0x19b0 net/ethtool/ioctl.c:3502<br />
dev_ioctl+0x392/0x1150 net/core/dev_ioctl.c:759<br />
<br />
It happens because lower features are out of sync with the upper:<br />
<br />
__dev_ethtool (real_dev)<br />
netdev_lock_ops(real_dev)<br />
ETHTOOL_SFEATURES<br />
__netdev_features_change<br />
netdev_sync_upper_features<br />
disable LRO on the lower<br />
if (old_features != dev->features)<br />
netdev_features_change<br />
fires NETDEV_FEAT_CHANGE<br />
macsec_notify<br />
NETDEV_FEAT_CHANGE<br />
netdev_update_features (for each macsec dev)<br />
netdev_sync_lower_features<br />
if (upper_features != lower_features)<br />
netdev_lock_ops(lower) # lower == real_dev<br />
stuck<br />
...<br />
<br />
netdev_unlock_ops(real_dev)<br />
<br />
Per commit af5f54b0ef9e ("net: Lock lower level devices when updating<br />
features"), we elide the lock/unlock when the upper and lower features<br />
are synced. Makes sure the lower (real_dev) has proper features after<br />
the macsec link has been created. This makes sure we never hit the<br />
situation where we need to sync upper flags to the lower.