Lucene search

K
cvelistLinuxCVELIST:CVE-2022-48854
HistoryJul 16, 2024 - 12:25 p.m.

CVE-2022-48854 net: arc_emac: Fix use after free in arc_mdio_probe()

2024-07-1612:25:20
Linux
www.cve.org
4
vulnerability
linux kernel
use after free
fix
arc_emac
arc_mdio_probe
mdiobus_allocated
uaf

EPSS

0

Percentile

9.3%

In the Linux kernel, the following vulnerability has been resolved:

net: arc_emac: Fix use after free in arc_mdio_probe()

If bus->state is equal to MDIOBUS_ALLOCATED, mdiobus_free(bus) will free
the “bus”. But bus->name is still used in the next line, which will lead
to a use after free.

We can fix it by putting the name in a local variable and make the
bus->name point to the rodata section “name”,then use the name in the
error message without referring to bus to avoid the uaf.

CNA Affected

[
  {
    "product": "Linux",
    "vendor": "Linux",
    "defaultStatus": "unaffected",
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "programFiles": [
      "drivers/net/ethernet/arc/emac_mdio.c"
    ],
    "versions": [
      {
        "version": "95b5fc03c189",
        "lessThan": "84c831803785",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "95b5fc03c189",
        "lessThan": "bc0e610a6eb0",
        "status": "affected",
        "versionType": "git"
      }
    ]
  },
  {
    "product": "Linux",
    "vendor": "Linux",
    "defaultStatus": "affected",
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "programFiles": [
      "drivers/net/ethernet/arc/emac_mdio.c"
    ],
    "versions": [
      {
        "version": "5.16",
        "status": "affected"
      },
      {
        "version": "0",
        "lessThan": "5.16",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "5.16.15",
        "lessThanOrEqual": "5.16.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "5.17",
        "lessThanOrEqual": "*",
        "status": "unaffected",
        "versionType": "original_commit_for_fix"
      }
    ]
  }
]

EPSS

0

Percentile

9.3%