From mboxrd@z Thu Jan 1 00:00:00 1970 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 A24E62557E for ; Tue, 27 Feb 2024 18:47:37 +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=1709059657; cv=none; b=rauv4iQNFXMytgeXDvaGw7WgxbmcbJYXPCyvS1lDC44mX3p0aMlnRoyyhp4ciXxzyDGuvbcQKmPPLtWq0koaKK8OKeQHArewhaNU3UTcBkuoiAFFDOu2TLdpaL4w5/TtL3OJ0S4Oe47IQfoq//R13AjThCE6RHpjmqa5C7hY3b4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709059657; c=relaxed/simple; bh=c78TSne914/Ew0w4jasmO1746eFVnVRQQuJ2NWOsjKo=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=tZVGUmSpMSCabx+IGdsQTbGDwvQSBUadtahgSUIldcLPMIvhMyqL1r9bjD/+kI3Q3BfDxxloTSAjYXg1ykWYMtoIiN1qWd7zj5szprQNL5KoUfobj8jDQCm6Ec3oFstR0VBx243PfUSQrzYXc8TwADk2tTaltNuH8S7DJS4lZ4Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=TvBGhpzb; 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="TvBGhpzb" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 229DCC433F1; Tue, 27 Feb 2024 18:47:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1709059657; bh=c78TSne914/Ew0w4jasmO1746eFVnVRQQuJ2NWOsjKo=; h=From:To:Cc:Subject:Date:Reply-to:From; b=TvBGhpzb2m+SJEeFE0/H24w82gltPMBGzJoMv732ys41W8ZVS8fhHN/elvV2eg4T2 zAsJ6m/duAxYUaO7/Q/8UUHPLXt9YheqvuhRMQ9jMtoG7kSUlX6suIBn/Zhn9k6WD5 QN+zgc8K7rUo3LcMW575zH0QUzBZ4pm6Ba3sM72Q= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2021-46966: ACPI: custom_method: fix potential use-after-free issue Date: Tue, 27 Feb 2024 19:47:26 +0100 Message-ID: <2024022720-CVE-2021-46966-1469@gregkh> X-Mailer: git-send-email 2.44.0 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=3250; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=c78TSne914/Ew0w4jasmO1746eFVnVRQQuJ2NWOsjKo=; b=owGbwMvMwCRo6H6F97bub03G02pJDKn39CzWXPt//ibn4r8F++5EKEq6KzoKPzi74fGzdNaXQ Z8uz7Wo7YhlYRBkYpAVU2T5so3n6P6KQ4pehranYeawMoEMYeDiFICJ/H3NsGDpx6Uvnr0/ekZ2 2++XwQoziu7myKkyLJhxmK1eTv/1288semVtV9Q/zrjrXQ4A 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: ACPI: custom_method: fix potential use-after-free issue In cm_write(), buf is always freed when reaching the end of the function. If the requested count is less than table.length, the allocated buffer will be freed but subsequent calls to cm_write() will still try to access it. Remove the unconditional kfree(buf) at the end of the function and set the buf to NULL in the -EINVAL error path to match the rest of function. The Linux kernel CVE team has assigned CVE-2021-46966 to this issue. Affected and fixed versions =========================== Issue introduced in 4.4.195 with commit 4bda2b79a9d0 and fixed in 4.4.269 with commit 1d53ca5d1310 Issue introduced in 4.9.195 with commit 5c12dadcbef8 and fixed in 4.9.269 with commit 8b04d57f30ca Issue introduced in 4.14.147 with commit 35b88a10535e and fixed in 4.14.233 with commit 90575d1d9311 Issue introduced in 4.19.77 with commit e4467fb6ef54 and fixed in 4.19.191 with commit a5b26a2e362f Issue introduced in 5.4 with commit 03d1571d9513 and fixed in 5.4.118 with commit 72814a94c38a Issue introduced in 5.4 with commit 03d1571d9513 and fixed in 5.10.36 with commit 62dc2440ebb5 Issue introduced in 5.4 with commit 03d1571d9513 and fixed in 5.11.20 with commit f16737caf41f Issue introduced in 5.4 with commit 03d1571d9513 and fixed in 5.12.3 with commit b7a5baaae212 Issue introduced in 5.4 with commit 03d1571d9513 and fixed in 5.13 with commit e483bb9a991b Please see https://www.kernel.org or 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-46966 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/acpi/custom_method.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/1d53ca5d131074c925ce38361fb0376d3bf7e394 https://git.kernel.org/stable/c/8b04d57f30caf76649d0567551589af9a66ca9be https://git.kernel.org/stable/c/90575d1d9311b753cf1718f4ce9061ddda7dfd23 https://git.kernel.org/stable/c/a5b26a2e362f572d87e9fd35435680e557052a17 https://git.kernel.org/stable/c/72814a94c38a33239793f7622cec6ace1e540c4b https://git.kernel.org/stable/c/62dc2440ebb552aa0d7f635e1697e077d9d21203 https://git.kernel.org/stable/c/f16737caf41fc06cfe6e49048becb09657074d4b https://git.kernel.org/stable/c/b7a5baaae212a686ceb812c32fceed79c03c0234 https://git.kernel.org/stable/c/e483bb9a991bdae29a0caa4b3a6d002c968f94aa