{
  "id": "CVE-2025-68340",
  "url": "https://poc.griffinguard.io/cve/CVE-2025-68340",
  "published_at": "2025-12-23T13:58:25.841Z",
  "title": "team: Move team device type change at the end of team_port_add",
  "vendor": "Linux",
  "product": "Linux",
  "cvss": {
    "score": 7.8,
    "source": "cna",
    "vector": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
  },
  "kev": {
    "in_kev": false,
    "added_at": null,
    "days_after_publication": null
  },
  "first_poc": null,
  "poc_repo_count": 0,
  "exploit_count": 0,
  "suspicious_repo_count": 0,
  "edge_device": null,
  "description": "In the Linux kernel, the following vulnerability has been resolved:\n\nteam: Move team device type change at the end of team_port_add\n\nAttempting to add a port device that is already up will expectedly fail,\nbut not before modifying the team device header_ops.\n\nIn the case of the syzbot reproducer the gre0 device is\nalready in state UP when it attempts to add it as a\nport device of team0, this fails but before that\nheader_ops-\u003ecreate of team0 is changed from eth_header to ipgre_header\nin the call to team_dev_type_check_change.\n\nLater when we end up in ipgre_header() struct ip_tunnel* points to nonsense\nas the private data of the device still holds a struct team.\n\nExample sequence of iproute2 commands to reproduce the hang/BUG():\nip link add dev team0 type team\nip link add dev gre0 type gre\nip link set dev gre0 up\nip link set dev gre0 master team0\nip link set dev team0 up\nping -I team0 1.1.1.1\n\nMove team_dev_type_check_change down where all other checks have passed\nas it changes the dev type with no way to restore it in case\none of the checks that follow it fail.\n\nAlso make sure to preserve the origial mtu assignment:\n  - If port_dev is not the same type as dev, dev takes mtu from port_dev\n  - If port_dev is the same type as dev, port_dev takes mtu from dev\n\nThis is done by adding a conditional before the call to dev_set_mtu\nto prevent it from assigning port_dev-\u003emtu = dev-\u003emtu and instead\nletting team_dev_type_check_change assign dev-\u003emtu = port_dev-\u003emtu.\nThe conditional is needed because the patch moves the call to\nteam_dev_type_check_change past dev_set_mtu.\n\nTesting:\n  - team device driver in-tree selftests\n  - Add/remove various devices as slaves of team device\n  - syzbot",
  "cpes": [
    "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.18:rc1:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.18:rc2:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.18:rc3:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.18:rc4:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.18:rc5:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.18:rc6:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.18:rc7:*:*:*:*:*:*"
  ],
  "cvss_by_source": {
    "cna": 7.8,
    "nvd": 5.5
  },
  "repos": [],
  "remediation": {
    "affected": [
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "\u003e= 1d76efe1577b4323609b1bcbfafa8b731eda071a, \u003c f82d1fb65549de241fe312fcb2bcb8e0ad7b424d",
          "\u003e= 1d76efe1577b4323609b1bcbfafa8b731eda071a, \u003c c8b15b0d2eec3b5c7f585e5a53dfc8d36c818283",
          "\u003e= 1d76efe1577b4323609b1bcbfafa8b731eda071a, \u003c a74ab1b532ecc5f9106621a8f75b4c3d04466b35",
          "\u003e= 1d76efe1577b4323609b1bcbfafa8b731eda071a, \u003c e26235840fd961e4ebe5568f11a2a078cf726663",
          "\u003e= 1d76efe1577b4323609b1bcbfafa8b731eda071a, \u003c 4040b5e8963982a00aa821300cb746efc9f2947e",
          "\u003e= 1d76efe1577b4323609b1bcbfafa8b731eda071a, \u003c e3eed4f038214494af62c7d2d64749e5108ce6ca",
          "\u003e= 1d76efe1577b4323609b1bcbfafa8b731eda071a, \u003c 0ae9cfc454ea5ead5f3ddbdfe2e70270d8e2c8ef"
        ],
        "fixed_in": [
          "f82d1fb65549de241fe312fcb2bcb8e0ad7b424d",
          "c8b15b0d2eec3b5c7f585e5a53dfc8d36c818283",
          "a74ab1b532ecc5f9106621a8f75b4c3d04466b35",
          "e26235840fd961e4ebe5568f11a2a078cf726663",
          "4040b5e8963982a00aa821300cb746efc9f2947e",
          "e3eed4f038214494af62c7d2d64749e5108ce6ca",
          "0ae9cfc454ea5ead5f3ddbdfe2e70270d8e2c8ef"
        ]
      },
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "3.7"
        ],
        "fixed_in": [
          "0",
          "5.10.259",
          "5.15.199",
          "6.1.162",
          "6.6.123",
          "6.12.61",
          "6.17.11",
          "6.18"
        ]
      }
    ],
    "upgrade": [
      "Upgrade Linux to f82d1fb65549de241fe312fcb2bcb8e0ad7b424d or c8b15b0d2eec3b5c7f585e5a53dfc8d36c818283 or a74ab1b532ecc5f9106621a8f75b4c3d04466b35 or e26235840fd961e4ebe5568f11a2a078cf726663 or 4040b5e8963982a00aa821300cb746efc9f2947e or e3eed4f038214494af62c7d2d64749e5108ce6ca or 0ae9cfc454ea5ead5f3ddbdfe2e70270d8e2c8ef or later.",
      "Upgrade Linux to 0 or 5.10.259 or 5.15.199 or 6.1.162 or 6.6.123 or 6.12.61 or 6.17.11 or 6.18 or later."
    ]
  },
  "exploit_refs": [],
  "hunt_profile": [],
  "rules": []
}
