Lucene search

K
cvelistLinuxCVELIST:CVE-2021-47500
HistoryMay 24, 2024 - 3:01 p.m.

CVE-2021-47500 iio: mma8452: Fix trigger reference couting

2024-05-2415:01:43
Linux
www.cve.org
linux kernel
vulnerability
reference counting

6.4 Medium

AI Score

Confidence

Low

0.0004 Low

EPSS

Percentile

13.0%

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

iio: mma8452: Fix trigger reference couting

The mma8452 driver directly assigns a trigger to the struct iio_dev. The
IIO core when done using this trigger will call iio_trigger_put() to drop
the reference count by 1.

Without the matching iio_trigger_get() in the driver the reference count
can reach 0 too early, the trigger gets freed while still in use and a
use-after-free occurs.

Fix this by getting a reference to the trigger before assigning it to the
IIO device.

CNA Affected

[
  {
    "product": "Linux",
    "vendor": "Linux",
    "defaultStatus": "unaffected",
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "programFiles": [
      "drivers/iio/accel/mma8452.c"
    ],
    "versions": [
      {
        "version": "ae6d9ce05691",
        "lessThan": "094d513b78b1",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "ae6d9ce05691",
        "lessThan": "fb75cc4740d8",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "ae6d9ce05691",
        "lessThan": "794c0898f6bf",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "ae6d9ce05691",
        "lessThan": "f5deab10ced3",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "ae6d9ce05691",
        "lessThan": "acf0088ac073",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "ae6d9ce05691",
        "lessThan": "db12d9508536",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "ae6d9ce05691",
        "lessThan": "c43517071dfc",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "ae6d9ce05691",
        "lessThan": "cd0082235783",
        "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/iio/accel/mma8452.c"
    ],
    "versions": [
      {
        "version": "4.2",
        "status": "affected"
      },
      {
        "version": "0",
        "lessThan": "4.2",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "4.4.295",
        "lessThanOrEqual": "4.4.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "4.9.293",
        "lessThanOrEqual": "4.9.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "4.14.258",
        "lessThanOrEqual": "4.14.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "4.19.221",
        "lessThanOrEqual": "4.19.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "5.4.165",
        "lessThanOrEqual": "5.4.*",
        "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.4 Medium

AI Score

Confidence

Low

0.0004 Low

EPSS

Percentile

13.0%