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 47F7420C008 for ; Wed, 26 Feb 2025 02:00:15 +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=1740535215; cv=none; b=S6KEiGDpFcWxk9whg4hRo8v5mmevDp1PqCERx5tPpcSbCxk5OGsib0i1SznMXyXSvtFU0XnZOOewenPkBkKnGK05JZS31tlX3QU9GJdbTFpwLCeteHp4DNSt/6BJZ+cyiipupb0BN+XW3hdC1mKPI+hgiHu7E7dzsLb+YjCz8n8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740535215; c=relaxed/simple; bh=A8TJ3lBYmDHAFSeiX+Shh/jWf2At/0uiLfzs3o3Cbnc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=A3+/8zNhNDbuPY6mcuCkOQn8pd/rh0ZCpB3NQaQOkko3h6PXOpdpLmkU9FYwi1dy1a7fZ+C/HxnhqDie1J5HfJNlPjs7poTeV+ittHiz2SMIMKiLcnUhulNV1Y/JRBY5XNFqkpv0RsFDwHIQUJHkfkx5X8mQj2NFeQMczaNCFlY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=yoj5OeD0; 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="yoj5OeD0" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 16E16C4CEDD; Wed, 26 Feb 2025 02:00:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1740535215; bh=A8TJ3lBYmDHAFSeiX+Shh/jWf2At/0uiLfzs3o3Cbnc=; h=From:To:Cc:Subject:Date:Reply-to:From; b=yoj5OeD0qeBmQrIraUKSVjpCdCDXHFvDSzybUWjASiWwz5WO+JxfMzs4hVnIz0S5U C+5zyyhwfQDAEYDpktYqTEdWudtTG2FESCraJhrZ64IkW+9i9vJ44whnWMWwmMsMyW 1r4GOTWdRArf8BXBPi69jZ/RyGykckrq5fKpZ8hg= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-49267: mmc: core: use sysfs_emit() instead of sprintf() Date: Wed, 26 Feb 2025 02:57:52 +0100 Message-ID: <2025022629-CVE-2022-49267-b3ac@gregkh> X-Mailer: git-send-email 2.48.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=2103; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=A8TJ3lBYmDHAFSeiX+Shh/jWf2At/0uiLfzs3o3Cbnc=; b=owGbwMvMwCRo6H6F97bub03G02pJDOn7SkLnXvlldmnSlIqmzHeFNydeuHL1VZjVpde8d7Y86 WJ94tXzvSOWhUGQiUFWTJHlyzaeo/srDil6GdqehpnDygQyhIGLUwAm8jeNYX5V8D3PrJs71bO5 1JTrqxp85czWmgFFnb5xX3f+WngmMsl1Tu0xiW+XnFsA 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: mmc: core: use sysfs_emit() instead of sprintf() sprintf() (still used in the MMC core for the sysfs output) is vulnerable to the buffer overflow. Use the new-fangled sysfs_emit() instead. Found by Linux Verification Center (linuxtesting.org) with the SVACE static analysis tool. The Linux kernel CVE team has assigned CVE-2022-49267 to this issue. Affected and fixed versions =========================== Fixed in 5.16.19 with commit 659ca56b5415c7a1d05e185c36fad80ba165d063 Fixed in 5.17.2 with commit c4ab65738ab3e21fe519ee46b2051222bc8e32ef Fixed in 5.18 with commit f5d8a5fe77ce933f53eb8f2e22bb7a1a2019ea11 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-2022-49267 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: drivers/mmc/core/bus.c drivers/mmc/core/bus.h drivers/mmc/core/mmc.c drivers/mmc/core/sd.c drivers/mmc/core/sdio.c drivers/mmc/core/sdio_bus.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/659ca56b5415c7a1d05e185c36fad80ba165d063 https://git.kernel.org/stable/c/c4ab65738ab3e21fe519ee46b2051222bc8e32ef https://git.kernel.org/stable/c/f5d8a5fe77ce933f53eb8f2e22bb7a1a2019ea11