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 5A04514375D for ; Tue, 19 Nov 2024 17:31:59 +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=1732037519; cv=none; b=WKDygqKkweMFUxnEi+nhlJsCCuJWJ7yO0XAL4wFRBnPrdJFUSELU48X50U481c4lITvnKxu0IEiYPeoq9VqL9KgjmP5niFFv47Rz33E19r2y3cnusjeEq//wJVggX/QFAHdclsEw5PTqGzGyW8O3hs9IFuwgrSBN8z1X1I6eXTM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732037519; c=relaxed/simple; bh=/uODRlDdLbtxgRFsWwMfrag7WxCAMl8R13zCY8t70Ts=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Om8vBxF5RWuWivkuApdR255AY+ZWPA9FNgqk3HxyqNZdNvd0RLQh2NEjXYBdRGqVHDAd6utUA6+EPZOZT+y++D2Sw1clRFMZ2TwT1hC0RvuketZaJvNtUuXAKzV0oUf0OQDCnhcsxA4Xnw+3Tm4eWcuWouWWNisL6ka0gGDrdjY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=uZvvnjZ9; 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="uZvvnjZ9" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1DA99C4CED1; Tue, 19 Nov 2024 17:31:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1732037519; bh=/uODRlDdLbtxgRFsWwMfrag7WxCAMl8R13zCY8t70Ts=; h=From:To:Cc:Subject:Date:Reply-to:From; b=uZvvnjZ9V3YcWt1Oc4DNkR2yMsWHSZ3tDXxU0pJoy/iI1lzKYlQWSQAZIjH71zMI3 3aFKlRzYpIIJ+YoYsSo3EO3rONwFbza70zYSKBERuZsVmhLiI+yH8KkWlHbK7HFJYY hoCjK5xIpymSh2ZqQsm0uaCq+rt4ai4Fni2NMh/4= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-53076: iio: gts-helper: Fix memory leaks for the error path of iio_gts_build_avail_scale_table() Date: Tue, 19 Nov 2024 18:31:27 +0100 Message-ID: <2024111925-CVE-2024-53076-713e@gregkh> X-Mailer: git-send-email 2.47.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=2192; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=/uODRlDdLbtxgRFsWwMfrag7WxCAMl8R13zCY8t70Ts=; b=owGbwMvMwCRo6H6F97bub03G02pJDOk2p3OvNPz7FmyV13zgUPtU2YKsl0e83p3sVV8/dc+0t B5t+4u9HbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjARob8M85NTfHNO72iWMBfx Nf9U76v28TODLMP8sAi7pM0nz/9qFVLzTdghnfB0W6MVAA== 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: iio: gts-helper: Fix memory leaks for the error path of iio_gts_build_avail_scale_table() If per_time_scales[i] or per_time_gains[i] kcalloc fails in the for loop of iio_gts_build_avail_scale_table(), the err_free_out will fail to call kfree() each time when i is reduced to 0, so all the per_time_scales[0] and per_time_gains[0] will not be freed, which will cause memory leaks. Fix it by checking if i >= 0. The Linux kernel CVE team has assigned CVE-2024-53076 to this issue. Affected and fixed versions =========================== Issue introduced in 6.4 with commit 38416c28e168 and fixed in 6.6.60 with commit 62c118966831 Issue introduced in 6.4 with commit 38416c28e168 and fixed in 6.11.7 with commit b304362ce836 Issue introduced in 6.4 with commit 38416c28e168 and fixed in 6.12 with commit 369f05688911 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-53076 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/iio/industrialio-gts-helper.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/62c11896683129790b8f5ab6eb7e695818b0b723 https://git.kernel.org/stable/c/b304362ce836968b803e5d4c5f84dcb51a7bf0f2 https://git.kernel.org/stable/c/369f05688911b05216cfcd6ca74473bec87948d7