CVE-2025-68340
Severity CVSS v4.0:
Pending analysis
Type:
Unavailable / Other
Publication date:
23/12/2025
Last modified:
06/02/2026
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
team: Move team device type change at the end of team_port_add<br />
<br />
Attempting to add a port device that is already up will expectedly fail,<br />
but not before modifying the team device header_ops.<br />
<br />
In the case of the syzbot reproducer the gre0 device is<br />
already in state UP when it attempts to add it as a<br />
port device of team0, this fails but before that<br />
header_ops->create of team0 is changed from eth_header to ipgre_header<br />
in the call to team_dev_type_check_change.<br />
<br />
Later when we end up in ipgre_header() struct ip_tunnel* points to nonsense<br />
as the private data of the device still holds a struct team.<br />
<br />
Example sequence of iproute2 commands to reproduce the hang/BUG():<br />
ip link add dev team0 type team<br />
ip link add dev gre0 type gre<br />
ip link set dev gre0 up<br />
ip link set dev gre0 master team0<br />
ip link set dev team0 up<br />
ping -I team0 1.1.1.1<br />
<br />
Move team_dev_type_check_change down where all other checks have passed<br />
as it changes the dev type with no way to restore it in case<br />
one of the checks that follow it fail.<br />
<br />
Also make sure to preserve the origial mtu assignment:<br />
- If port_dev is not the same type as dev, dev takes mtu from port_dev<br />
- If port_dev is the same type as dev, port_dev takes mtu from dev<br />
<br />
This is done by adding a conditional before the call to dev_set_mtu<br />
to prevent it from assigning port_dev->mtu = dev->mtu and instead<br />
letting team_dev_type_check_change assign dev->mtu = port_dev->mtu.<br />
The conditional is needed because the patch moves the call to<br />
team_dev_type_check_change past dev_set_mtu.<br />
<br />
Testing:<br />
- team device driver in-tree selftests<br />
- Add/remove various devices as slaves of team device<br />
- syzbot
Impact
References to Advisories, Solutions, and Tools
- https://git.kernel.org/stable/c/0ae9cfc454ea5ead5f3ddbdfe2e70270d8e2c8ef
- https://git.kernel.org/stable/c/4040b5e8963982a00aa821300cb746efc9f2947e
- https://git.kernel.org/stable/c/a74ab1b532ecc5f9106621a8f75b4c3d04466b35
- https://git.kernel.org/stable/c/c8b15b0d2eec3b5c7f585e5a53dfc8d36c818283
- https://git.kernel.org/stable/c/e26235840fd961e4ebe5568f11a2a078cf726663
- https://git.kernel.org/stable/c/e3eed4f038214494af62c7d2d64749e5108ce6ca



