Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8087912EBEE for ; Tue, 21 May 2024 14:22:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716301373; cv=none; b=MV/eZc/Nk2f9UdJfvHQ8/ql3FtpsewIYwIpV2iaS+Nwgv5DYW4uc1FwSgpkskA4FkYssiHpRyWGpEuI4zv6sT443cMIvnpCHwABR39CeK8R0+BJQmDL+3fmd7aOCmNtC7RA0uFrLQueM5jkuz/MlYWgKTEW10/o8/rWtnPdmW+o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716301373; c=relaxed/simple; bh=8wW3Pr+sdrA1EOJSqBJJm6phA8vcC6WCF9P1m+vCdPs=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=ijUaYoWeKGrrijhFGHTfk9V6zmG/X6+pUZ9PDXlkhMX4iO+2NmgduJE6kG3hW4CafYltizXgR7wnHSSaQTX0e8oJS3BHIdhE7TErQzXPH7P3oDtqsWMrLuZZOORqqvI+cm2+g2VMM2qfyG+D7sol9egxfBntzmkmkvEtb58XtQc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=z145ZGVy; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="z145ZGVy" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 07486C2BD11; Tue, 21 May 2024 14:22:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1716301373; bh=8wW3Pr+sdrA1EOJSqBJJm6phA8vcC6WCF9P1m+vCdPs=; h=From:To:Cc:Subject:Date:Reply-to:From; b=z145ZGVyB+Is81745gARDJdLjDEppC8nezTlC4gDxeNBlvOXgzZwbPPUr19b1+5Iz UzVmVXtx8zUKZN2GxsA8tUEB9yE+RYCQYWQYNDUeL1XoJ9Mmpx6NMxe4SeJKSnowm6 2AJOC3GYa5wuP+Q4xR0j1eKPYCv9e4MF9N24lEUk= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2021-47281: ALSA: seq: Fix race of snd_seq_timer_open() Date: Tue, 21 May 2024 16:20:35 +0200 Message-ID: <2024052153-CVE-2021-47281-d193@gregkh> X-Mailer: git-send-email 2.45.1 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=2284; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=8wW3Pr+sdrA1EOJSqBJJm6phA8vcC6WCF9P1m+vCdPs=; b=owGbwMvMwCRo6H6F97bub03G02pJDGk+azuvsKVwv5XzlQp80bnl+elJO+4stfmzTFOVu91i3 bXKZT/9O2JZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAiR6cyzBVhD9vEx/hpTfTV M8+OpC/9yLQ/8AvDPIuEQ19dYyMMt9d389zbPOf0gZtrUgA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit Description =========== 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. The Linux kernel CVE team has assigned CVE-2021-47281 to this issue. Affected and fixed versions =========================== Fixed in 5.10.44 with commit bd7d88b0874f Fixed in 5.12.11 with commit 536a7646c00a Fixed in 5.13 with commit 83e197a8414c Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2021-47281 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: sound/core/seq/seq_timer.c Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: https://git.kernel.org/stable/c/bd7d88b0874f82f7b29d1a53e574cedaf23166ba https://git.kernel.org/stable/c/536a7646c00a0f14fee49e5e313109e5da2f6031 https://git.kernel.org/stable/c/83e197a8414c0ba545e7e3916ce05f836f349273