Skip to content
Heist/ feed
High

net: bridge: fix use-after-free due to MST port state bypass

Type: advisorySource: Official CVE List1 source record

In the Linux kernel, the following vulnerability has been resolved: net: bridge: fix use-after-free due to MST port state bypass syzbot reported[1] a use-after-free when deleting an expired fdb. It is due to a race condition between learning still happening and a port being deleted, after all its fdbs have been flushed. The port's state has been toggled to disabled so no learning should happen at that time, but if we have MST enabled, it will bypass the port's state, that together with VLAN filtering disabled can lead to fdb learning at a time when it shouldn't happen while the port is being deleted. VLAN filtering must be disabled because we flush the port VLANs when it's being deleted which will stop learning. This fix adds a check for the port's vlan group which is initialized to NULL when the port is getting deleted, that avoids the port state bypass. When MST is enabled there would be a minimal new overhead in the fast-path because the port's vlan group pointer is cache-hot. [1] https://syzkaller.appspot.com/bug?extid=dd280197f0f7ab3917be

Announced Group revision 1
Original source ↗

CVE-2025-40297

Primary source · Revision 1

Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.

Security context

Source reference: cve:CVE-2025-40297

Linux

Source reference: /containers/cna/affected/0/product

Affected versions
Not stated in this record
Fixed versions
Not stated in this record
Prerequisites
Not stated in this record

Linux

Source reference: /containers/cna/affected/1/product

Affected versions
Not stated in this record
Fixed versions
Not stated in this record
Prerequisites
Not stated in this record

Structured affected-version data

Original package identities and version rules from this source.

[
  {
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "vendor": "Linux",
    "product": "Linux",
    "versions": [
      {
        "status": "affected",
        "version": "ec7328b59176227216c461601c6bd0e922232a9b",
        "lessThan": "e19085b2a86addccff33ab8536fc67ebd9d52198",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "ec7328b59176227216c461601c6bd0e922232a9b",
        "lessThan": "3b60ce334c1ce8b3fad7e02dcd5ed9f6646477c8",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "ec7328b59176227216c461601c6bd0e922232a9b",
        "lessThan": "bf3843183bc3158e5821b46f330c438ae9bd6ddb",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "ec7328b59176227216c461601c6bd0e922232a9b",
        "lessThan": "991fbe1680cd41a5f97c92cd3a3496315df36e4b",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "ec7328b59176227216c461601c6bd0e922232a9b",
        "lessThan": "8dca36978aa80bab9d4da130c211db75c9e00048",
        "versionType": "git"
      }
    ],
    "programFiles": [
      "net/bridge/br_forward.c",
      "net/bridge/br_input.c",
      "net/bridge/br_private.h"
    ],
    "defaultStatus": "unaffected"
  },
  {
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "vendor": "Linux",
    "product": "Linux",
    "versions": [
      {
        "status": "affected",
        "version": "5.18"
      },
      {
        "status": "unaffected",
        "version": "0",
        "lessThan": "5.18",
        "versionType": "semver"
      },
      {
        "status": "unaffected",
        "version": "6.1.159",
        "versionType": "semver",
        "lessThanOrEqual": "6.1.*"
      },
      {
        "status": "unaffected",
        "version": "6.6.117",
        "versionType": "semver",
        "lessThanOrEqual": "6.6.*"
      },
      {
        "status": "unaffected",
        "version": "6.12.58",
        "versionType": "semver",
        "lessThanOrEqual": "6.12.*"
      },
      {
        "status": "unaffected",
        "version": "6.17.8",
        "versionType": "semver",
        "lessThanOrEqual": "6.17.*"
      },
      {
        "status": "unaffected",
        "version": "6.18",
        "versionType": "original_commit_for_fix",
        "lessThanOrEqual": "*"
      }
    ],
    "programFiles": [
      "net/bridge/br_forward.c",
      "net/bridge/br_input.c",
      "net/bridge/br_private.h"
    ],
    "defaultStatus": "affected"
  }
]
Related CVEs
CVE-2025-40297

Source reference: /cveMetadata/cveId

Publisher severity

high

Source reference: /containers/cna/metrics

Event
#30708 · Revision 1
Added to Heist Feed
Publisher date
Read the original announcement