Lucene search

K
cve416baaa9-dc9f-4396-8d5f-8c081fb06d67CVE-2024-35986
HistoryMay 20, 2024 - 10:15 a.m.

CVE-2024-35986

2024-05-2010:15:12
416baaa9-dc9f-4396-8d5f-8c081fb06d67
web.nvd.nist.gov
27
linux kernel
vulnerability
cve-2024-35986
power_supply
charger-det
crash
tusb1210
phy
ti
charger
crash
warn
unregister
reference
kernel
development

6.8 Medium

AI Score

Confidence

Low

0.0004 Low

EPSS

Percentile

15.5%

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

phy: ti: tusb1210: Resolve charger-det crash if charger psy is unregistered

The power_supply frame-work is not really designed for there to be
long living in kernel references to power_supply devices.

Specifically unregistering a power_supply while some other code has
a reference to it triggers a WARN in power_supply_unregister():

WARN_ON(atomic_dec_return(&psy->use_cnt));

Folllowed by the power_supply still getting removed and the
backing data freed anyway, leaving the tusb1210 charger-detect code
with a dangling reference, resulting in a crash the next time
tusb1210_get_online() is called.

Fix this by only holding the reference in tusb1210_get_online()
freeing it at the end of the function. Note this still leaves
a theoretical race window, but it avoids the issue when manually
rmmod-ing the charger chip driver during development.

Affected configurations

Vulners
Node
linuxlinux_kernelRange5.186.1.90
OR
linuxlinux_kernelRange6.2.06.6.30
OR
linuxlinux_kernelRange6.7.06.8.9
OR
linuxlinux_kernelRange6.9.0

CNA Affected

[
  {
    "product": "Linux",
    "vendor": "Linux",
    "defaultStatus": "unaffected",
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "programFiles": [
      "drivers/phy/ti/phy-tusb1210.c"
    ],
    "versions": [
      {
        "version": "48969a5623ed",
        "lessThan": "25b3498485ac",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "48969a5623ed",
        "lessThan": "73224a5d2180",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "48969a5623ed",
        "lessThan": "9827caa5105f",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "48969a5623ed",
        "lessThan": "bf6e4ee5c436",
        "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/phy/ti/phy-tusb1210.c"
    ],
    "versions": [
      {
        "version": "5.18",
        "status": "affected"
      },
      {
        "version": "0",
        "lessThan": "5.18",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "6.1.90",
        "lessThanOrEqual": "6.1.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "6.6.30",
        "lessThanOrEqual": "6.6.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "6.8.9",
        "lessThanOrEqual": "6.8.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "6.9",
        "lessThanOrEqual": "*",
        "status": "unaffected",
        "versionType": "original_commit_for_fix"
      }
    ]
  }
]

6.8 Medium

AI Score

Confidence

Low

0.0004 Low

EPSS

Percentile

15.5%