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 926DE1990CE for ; Tue, 16 Jul 2024 11:14:16 +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=1721128456; cv=none; b=nRGlJqqBnsm/Xm2+BRMhFH4bHPBWaNArkF2WEBRHSoUdCVTNuvbD9TevlTeyCspGweU7iEP26g/IlItF62R3Ylv3jNy1KTG8eelxCeeChRC/MtAT9mSW10yryvdQszcmw4y0bgG/0qZuRMuOJmGvFfCQfusKgGd0fJ3k9bYE02M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721128456; c=relaxed/simple; bh=BQq0xE99Fl+19N7I+IFARIPraE2dnwqKgMtr7al8YDE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=IGDk/Ct08ykMWgUu/KYqKjBCsvr0An/IB1EUvTFoJK2Dcxf3IGDy5hjDj/2zDpC/r2HG5jcFXjKWr9Q6b8gW1/VBWhIcMy5DHoPMFpToGVku54f1AmEvtt1YgecBBdCIMg3eXaQBYc+iVwSx0PKxCCSf0X+8LFK+QgctGa5QiKY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=FgSAcO8u; 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="FgSAcO8u" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D1DC5C4AF0C; Tue, 16 Jul 2024 11:14:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1721128456; bh=BQq0xE99Fl+19N7I+IFARIPraE2dnwqKgMtr7al8YDE=; h=From:To:Cc:Subject:Date:Reply-to:From; b=FgSAcO8uSjEuzjuZkycm5IImeDUBCXlQBaMU2nYkH2N/xDUTL+9gQm+zp5fhOIduu 2MsgDXXDJpyHqxPW0Zn62hzdTyDEPuXrTFg8LK7oc2Fqs0prsNeqg5X/h9ROa/3uyJ mM4RGTvjrC7O1cCVgJcrmrhrhi8DUN3/EvGQ6EHI= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-48782: mctp: fix use after free Date: Tue, 16 Jul 2024 13:13:36 +0200 Message-ID: <2024071633-CVE-2022-48782-5032@gregkh> X-Mailer: git-send-email 2.45.2 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=1948; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=BQq0xE99Fl+19N7I+IFARIPraE2dnwqKgMtr7al8YDE=; b=owGbwMvMwCRo6H6F97bub03G02pJDGnTQu+G9zv/+CJz+BHbLZaSZw2S99ecS4vhaTT3rInJn uUh0fehI5aFQZCJQVZMkeXLNp6j+ysOKXoZ2p6GmcPKBDKEgYtTACbS1sSwoOuD+QMPO1XVO4Ld +x1M3+bbvGVzYphnrqhiYbs/wuFU2CymP/f2XzqWtkoCAA== 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: mctp: fix use after free Clang static analysis reports this problem route.c:425:4: warning: Use of memory after it is freed trace_mctp_key_acquire(key); ^~~~~~~~~~~~~~~~~~~~~~~~~~~ When mctp_key_add() fails, key is freed but then is later used in trace_mctp_key_acquire(). Add an else statement to use the key only when mctp_key_add() is successful. The Linux kernel CVE team has assigned CVE-2022-48782 to this issue. Affected and fixed versions =========================== Issue introduced in 5.16 with commit 4f9e1ba6de45 and fixed in 5.16.11 with commit 1dd3ecbec5f6 Issue introduced in 5.16 with commit 4f9e1ba6de45 and fixed in 5.17 with commit 7e5b6a5c8c44 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-48782 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: net/mctp/route.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/1dd3ecbec5f606b2a526c47925c8634b1a6bb81e https://git.kernel.org/stable/c/7e5b6a5c8c44310784c88c1c198dde79f6402f7b