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 0C6654A2D for ; Tue, 27 Feb 2024 18:41:04 +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=1709059265; cv=none; b=n7CmgDUu7IUVJ21VG4SLXiSk40M/AE5kGJPKS2NH3OJ6cgaUtxI2C8eyAGn+tRUjRAMhZeP275MxvtpX2+chqsqSwpYKGwVAtybYoY4gSF2ACVYu5aRTQkACmxk7iCj8fXylVFvLp+3j906Z3iOPxTBd2JH5EiuPmTGuCaPOqb4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709059265; c=relaxed/simple; bh=CKyKvnxV4dSQIILNUa9iMerEkL2lzwdYYiRSYZUEGEU=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=OKVKXjnpbTzzagjn/srIbz6gSsdLN+Qo5aaoEog06QVaEf6i7ehiLadOiZkjS3IUShbip/sLRfGg0OzKXgwRppdy/Arw7FYRu6HVDq5mM/pWV7E+i/EHDn27wpxtHuPvIfyqcrk694pmJqZwixjFiiQF7MqeCpZKspW7G9btE+k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=mGg5SWVQ; 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="mGg5SWVQ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7653DC433C7; Tue, 27 Feb 2024 18:41:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1709059264; bh=CKyKvnxV4dSQIILNUa9iMerEkL2lzwdYYiRSYZUEGEU=; h=From:To:Cc:Subject:Date:Reply-to:From; b=mGg5SWVQv4flWbNpBGRsGatQ/82Om6y5rBqiFwDgwBUNZqemeyRSaZKzCEc81z8o/ 08TMROx/L2nlXKaff2Qbld1WqkV8tKVsWKrHqzBFXc+nYgC+LFt4G/64dcTxYsxjJV Mb7ljSrIE8s58BesTkhJ4a82yfBzfSKcnTsPYXiw= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2020-36776: thermal/drivers/cpufreq_cooling: Fix slab OOB issue Date: Tue, 27 Feb 2024 19:40:38 +0100 Message-ID: <20240227184057.2368370-1-gregkh@linuxfoundation.org> 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: , Content-Transfer-Encoding: 8bit Description =========== In the Linux kernel, the following vulnerability has been resolved: thermal/drivers/cpufreq_cooling: Fix slab OOB issue Slab OOB issue is scanned by KASAN in cpu_power_to_freq(). If power is limited below the power of OPP0 in EM table, it will cause slab out-of-bound issue with negative array index. Return the lowest frequency if limited power cannot found a suitable OPP in EM table to fix this issue. Backtrace: [] die+0x104/0x5ac [] bug_handler+0x64/0xd0 [] brk_handler+0x160/0x258 [] do_debug_exception+0x248/0x3f0 [] el1_dbg+0x14/0xbc [] __kasan_report+0x1dc/0x1e0 [] kasan_report+0x10/0x20 [] __asan_report_load8_noabort+0x18/0x28 [] cpufreq_power2state+0x180/0x43c [] power_actor_set_power+0x114/0x1d4 [] allocate_power+0xaec/0xde0 [] power_allocator_throttle+0x3ec/0x5a4 [] handle_thermal_trip+0x160/0x294 [] thermal_zone_device_check+0xe4/0x154 [] process_one_work+0x5e4/0xe28 [] worker_thread+0xa4c/0xfac [] kthread+0x33c/0x358 [] ret_from_fork+0xc/0x18 The Linux kernel CVE team has assigned CVE-2020-36776 to this issue. Affected and fixed versions =========================== Issue introduced in 5.8 with commit 371a3bc79c11b and fixed in 5.10.36 with commit c24a20912eef Issue introduced in 5.8 with commit 371a3bc79c11b and fixed in 5.11.20 with commit 876a5f33e5d9 Issue introduced in 5.8 with commit 371a3bc79c11b and fixed in 5.12.3 with commit 6bf443acf6ca Issue introduced in 5.8 with commit 371a3bc79c11b and fixed in 5.13 with commit 34ab17cc6c2c 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-2020-36776 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/thermal/cpufreq_cooling.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/c24a20912eef00587416628149c438e885eb1304 https://git.kernel.org/stable/c/876a5f33e5d961d879c5436987c09b3d9ef70379 https://git.kernel.org/stable/c/6bf443acf6ca4f666d0e4225614ba9993a3aa1a9 https://git.kernel.org/stable/c/34ab17cc6c2c1ac93d7e5d53bb972df9a968f085