Lucene search

K
vulnrichmentLinuxVULNRICHMENT: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
github.com
7
linux kernel
vulnerability
alsa
seq
fix
race
snd_seq_timer_open
timer instance
uaf
leftover timer
syzkaller
protection
concurrent
check
assignment
ebusy
registered
cve

AI Score

6.8

Confidence

Low

EPSS

0

Percentile

15.5%

SSVC

Exploitation

none

Automatable

no

Technical Impact

partial

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

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

AI Score

6.8

Confidence

Low

EPSS

0

Percentile

15.5%

SSVC

Exploitation

none

Automatable

no

Technical Impact

partial