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 034301684A8 for ; Wed, 18 Sep 2024 07:18:24 +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=1726643905; cv=none; b=eXX0If5hdTZ5HMok12muKh1HrsqY3VIlHzcmO/jA5KfSgu7xyVW+f9C4vJ8z8U1V2Vkwj5UL99EqsTxpin6uMmM8Ial44MlVFj9xCD9IdW1ACk0sUYwk4jResS3oztC6zwRhfBJHLb39uqrumcpSd0pia4f93MAvhox+BXX+HXg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726643905; c=relaxed/simple; bh=BRMMWq6NyBTlprIiT9fMWJjshUyDzdqE1wIM8BxtZCY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=QMns5AfWNNHOb0YNyZ0NlT03bX52FaJKqNas5shg8xMQDqxZF9v86JAvl/W0ajZdjYKxvjiVl8VceNKmW8cb79cTQJ0XPUc0p1jJ2IK6CdnkKofqKT+1BPZ6NgDXMEMkA6lgnqLcCIfI6eqB1cOT9NYQAmJMC5mRcBzL4IU4slU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=2lAeHG/3; 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="2lAeHG/3" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6C02FC4CECD; Wed, 18 Sep 2024 07:18:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1726643904; bh=BRMMWq6NyBTlprIiT9fMWJjshUyDzdqE1wIM8BxtZCY=; h=From:To:Cc:Subject:Date:Reply-to:From; b=2lAeHG/3dQgYxHf9nVKZXudtkft2eJRhkCpYtJN0fc833OHglNVoaH3iMx7mVBfp2 L/D/6Hje9rflBjclsea7cFUp94a/i9Sxc2Gl99xpNWAXwMdgjnZZQfvIu4Xbfm8Z5V W4sMIR/Ionffv6HX7ziKlm6YzI63Ds0dqAmMR3Ss= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-46741: misc: fastrpc: Fix double free of 'buf' in error path Date: Wed, 18 Sep 2024 09:16:36 +0200 Message-ID: <2024091835-CVE-2024-46741-4ce7@gregkh> X-Mailer: git-send-email 2.46.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=2160; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=BRMMWq6NyBTlprIiT9fMWJjshUyDzdqE1wIM8BxtZCY=; b=owGbwMvMwCRo6H6F97bub03G02pJDGmv6oL/pe5ZvSLu82r+w/OTusy4O5kfrX3VVztRfsXkb RY1Z3nYO2JZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAie98wzDMNZeyNeLRh4suF r0/OfPAmMPH5sxiGBcvib15Or1p9nEnL8FV/yGTOo78YnwEA 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: misc: fastrpc: Fix double free of 'buf' in error path smatch warning: drivers/misc/fastrpc.c:1926 fastrpc_req_mmap() error: double free of 'buf' In fastrpc_req_mmap() error path, the fastrpc buffer is freed in fastrpc_req_munmap_impl() if unmap is successful. But in the end, there is an unconditional call to fastrpc_buf_free(). So the above case triggers the double free of fastrpc buf. The Linux kernel CVE team has assigned CVE-2024-46741 to this issue. Affected and fixed versions =========================== Issue introduced in 6.2 with commit 72fa6f7820c4 and fixed in 6.6.51 with commit f77dc8a75859 Issue introduced in 6.2 with commit 72fa6f7820c4 and fixed in 6.10.10 with commit bfc1704d909d Issue introduced in 6.2 with commit 72fa6f7820c4 and fixed in 6.11 with commit e8c276d4dc0e 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-2024-46741 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/misc/fastrpc.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/f77dc8a75859e559f3238a6d906206259227985e https://git.kernel.org/stable/c/bfc1704d909dc9911a558b1a5833d3d61a43a1f2 https://git.kernel.org/stable/c/e8c276d4dc0e19ee48385f74426aebc855b49aaf