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 EA2B91AB37B for ; Thu, 20 Jun 2024 11:18:39 +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=1718882320; cv=none; b=D4qhBPkhi5c+7BU3du6TJjVaf+3Ku4q6RJChjHgnZ3xWRX/iUudep5beTukShjwrPEKA5XwrJVJLtSH9FPR609JpzGR5/HUD9psHr3wB18te608hlBAQMNCfytCue1iROErIduotTIWtMLRmKB/ZsQRvr65naQId1nVuTde0PAs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718882320; c=relaxed/simple; bh=PD9ZqYDHrG4IqiWVXBFCPAeDSnyZj7pYbFFs4vnF8So=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=cXh0pn2iCx9xGworsoFNrMgFUjpERbQlh/i/1cmItz14zRWGrN36VdLDVX7MRUc8bcqPkVs0sqq6Gq7H0D7o29XKKH55Lx+yvKy3QSg67xSRKGumAAW21u2Z4ytG0gMFLJ5cZdymq+9AblwBaZcVlL6YF7jHljgnq9qXhOHVFts= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=w4sOxGN/; 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="w4sOxGN/" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6F407C2BD10; Thu, 20 Jun 2024 11:18:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1718882319; bh=PD9ZqYDHrG4IqiWVXBFCPAeDSnyZj7pYbFFs4vnF8So=; h=From:To:Cc:Subject:Date:Reply-to:From; b=w4sOxGN/dJzRv+izWojvqTMNahNuUNEJoL3hu1LIsOCj3Hzd9pNpbjac5a9P+Z08B znU/ql0g1h6TXJa1z8SK+4pLLwV87zUaA8Ru/6Hqvq4a5KJ2OsuTLsy8d9dLVDrzE+ TjwQ5OC+W3Wu7k+nrdov1y6zA8clGMayWcxJuyMk= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-48768: tracing/histogram: Fix a potential memory leak for kstrdup() Date: Thu, 20 Jun 2024 13:16:48 +0200 Message-ID: <2024062010-CVE-2022-48768-afee@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=2412; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=PD9ZqYDHrG4IqiWVXBFCPAeDSnyZj7pYbFFs4vnF8So=; b=owGbwMvMwCRo6H6F97bub03G02pJDGkl/FVraxUyjyo1bfvL0yGSZRSV0jUjIa49LvDthT2XS 77PLP3WEcvCIMjEICumyPJlG8/R/RWHFL0MbU/DzGFlAhnCwMUpABOJaGdYsChlXYZp4Y3EI28q HnKfnLiLeb/9EYb5SfZrUw3PMnrnFiR/bbGs/PLSMqALAA== 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: tracing/histogram: Fix a potential memory leak for kstrdup() kfree() is missing on an error path to free the memory allocated by kstrdup(): p = param = kstrdup(data->params[i], GFP_KERNEL); So it is better to free it via kfree(p). The Linux kernel CVE team has assigned CVE-2022-48768 to this issue. Affected and fixed versions =========================== Issue introduced in 5.4.19 with commit 38b67e60b6b5 and fixed in 5.4.176 with commit 8a8878ebb596 Issue introduced in 5.6 with commit d380dcde9a07 and fixed in 5.10.96 with commit d71b06aa9950 Issue introduced in 5.6 with commit d380dcde9a07 and fixed in 5.15.19 with commit e33fa4a46ee2 Issue introduced in 5.6 with commit d380dcde9a07 and fixed in 5.16.5 with commit df86e2fe808c Issue introduced in 5.6 with commit d380dcde9a07 and fixed in 5.17 with commit e629e7b525a1 Issue introduced in 5.5.6 with commit c78a2baf5e1f 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-48768 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: kernel/trace/trace_events_hist.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/8a8878ebb596281f50fc0b9a6e1f23f0d7f154e8 https://git.kernel.org/stable/c/d71b06aa995007eafd247626d0669b9364c42ad7 https://git.kernel.org/stable/c/e33fa4a46ee22de88a700e2e3d033da8214a5175 https://git.kernel.org/stable/c/df86e2fe808c3536a9dba353cc2bebdfea00d0cf https://git.kernel.org/stable/c/e629e7b525a179e29d53463d992bdee759c950fb