Lucene search

K
cvelistLinuxCVELIST:CVE-2021-47514
HistoryMay 24, 2024 - 3:09 p.m.

CVE-2021-47514 devlink: fix netns refcount leak in devlink_nl_cmd_reload()

2024-05-2415:09:28
Linux
www.cve.org
linux kernel
devlink
netns refcount
vulnerability
patch series
devlink_reload

6.5 Medium

AI Score

Confidence

Low

0.0004 Low

EPSS

Percentile

15.5%

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

devlink: fix netns refcount leak in devlink_nl_cmd_reload()

While preparing my patch series adding netns refcount tracking,
I spotted bugs in devlink_nl_cmd_reload()

Some error paths forgot to release a refcount on a netns.

To fix this, we can reduce the scope of get_net()/put_net()
section around the call to devlink_reload().

CNA Affected

[
  {
    "product": "Linux",
    "vendor": "Linux",
    "defaultStatus": "unaffected",
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "programFiles": [
      "net/core/devlink.c"
    ],
    "versions": [
      {
        "version": "ccdf07219da6",
        "lessThan": "4b7e90672af8",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "ccdf07219da6",
        "lessThan": "fe30b70ca84d",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "ccdf07219da6",
        "lessThan": "4dbb0dad8e63",
        "status": "affected",
        "versionType": "git"
      }
    ]
  },
  {
    "product": "Linux",
    "vendor": "Linux",
    "defaultStatus": "affected",
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "programFiles": [
      "net/core/devlink.c"
    ],
    "versions": [
      {
        "version": "5.10",
        "status": "affected"
      },
      {
        "version": "0",
        "lessThan": "5.10",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "5.10.85",
        "lessThanOrEqual": "5.10.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "5.15.8",
        "lessThanOrEqual": "5.15.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "5.16",
        "lessThanOrEqual": "*",
        "status": "unaffected",
        "versionType": "original_commit_for_fix"
      }
    ]
  }
]

6.5 Medium

AI Score

Confidence

Low

0.0004 Low

EPSS

Percentile

15.5%