Lucene search

K
cvelistLinuxCVELIST:CVE-2021-47281
HistoryMay 21, 2024 - 2:20 p.m.

CVE-2021-47281 ALSA: seq: Fix race of snd_seq_timer_open()

2024-05-2114:20:07
Linux
www.cve.org
linux kernel
alsa
vulnerability
race condition
uaf
snd_seq_timer_open
timer instance

6.4 Medium

AI Score

Confidence

Low

0.0004 Low

EPSS

Percentile

15.7%

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

ALSA: seq: Fix race of snd_seq_timer_open()

The timer instance per queue is exclusive, and snd_seq_timer_open()
should have managed the concurrent accesses. It looks as if it’s
checking the already existing timer instance at the beginning, but
it’s not right, because there is no protection, hence any later
concurrent call of snd_seq_timer_open() may override the timer
instance easily. This may result in UAF, as the leftover timer
instance can keep running while the queue itself gets closed, as
spotted by syzkaller recently.

For avoiding the race, add a proper check at the assignment of
tmr->timeri again, and return -EBUSY if it’s been already registered.

CNA Affected

[
  {
    "product": "Linux",
    "vendor": "Linux",
    "defaultStatus": "unaffected",
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "programFiles": [
      "sound/core/seq/seq_timer.c"
    ],
    "versions": [
      {
        "version": "1da177e4c3f4",
        "lessThan": "bd7d88b0874f",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "1da177e4c3f4",
        "lessThan": "536a7646c00a",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "1da177e4c3f4",
        "lessThan": "83e197a8414c",
        "status": "affected",
        "versionType": "git"
      }
    ]
  },
  {
    "product": "Linux",
    "vendor": "Linux",
    "defaultStatus": "affected",
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "programFiles": [
      "sound/core/seq/seq_timer.c"
    ],
    "versions": [
      {
        "version": "5.10.44",
        "lessThanOrEqual": "5.10.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "5.12.11",
        "lessThanOrEqual": "5.12.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "5.13",
        "lessThanOrEqual": "*",
        "status": "unaffected",
        "versionType": "original_commit_for_fix"
      }
    ]
  }
]

6.4 Medium

AI Score

Confidence

Low

0.0004 Low

EPSS

Percentile

15.7%