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 16282156C72 for ; Wed, 26 Feb 2025 02:15:25 +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=1740536126; cv=none; b=QaCl0SY9kC8DrzHYjfizwb6oDCIIvMFJZLwyAbDcxOkvjtjNLFVvXwDz2X+ZsKKDztRbrkzmjTd8eQ0zgjeUKysps9bMQ+aLiGy2Clh6U7tAqbBX0cfondZ3UYF1BhxBg/zBNP5kXxIs/xPX8rzEkjtyF4JaSlylag0dFEA4bV8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740536126; c=relaxed/simple; bh=PrJw6I6vdUt9aqwmib6lBHPYvkEM4Tu+OY03iUTLXtQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=FKUMj042iwdwLaKi7OhWz2CwkfYXS6f1cx40dQjrr8oGgrVvUM/EAg8mRTS9eLDwHkRU/mC8FKn4cXRFC83h9J2Nznjjt8VRAUOQtEJG6/eP8u47fLSNkMfJzNwlQ6mhMbA/E2kiKxAlvcUecrxNMa+ozR4HwIr38xJ3lyyxm6I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=NItX4cwI; 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="NItX4cwI" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8253DC4CEDD; Wed, 26 Feb 2025 02:15:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1740536125; bh=PrJw6I6vdUt9aqwmib6lBHPYvkEM4Tu+OY03iUTLXtQ=; h=From:To:Cc:Subject:Date:Reply-to:From; b=NItX4cwIUeoaGs9hPNyT7UQ2djyzruR0nwciI+jCJzcTuahe1monRzkYyAjfWiynN THGkLqOmj91pCujkJDHPP1MnveU+eS8HAjEeT83gjjtwFtn/50mvVtJUv2/RSEUa9u NlawRlFlFfUEys4ctVmUalqC1Oa5K99p0oCFNvEQ= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-49529: drm/amdgpu/pm: fix the null pointer while the smu is disabled Date: Wed, 26 Feb 2025 03:13:23 +0100 Message-ID: <2025022612-CVE-2022-49529-39ba@gregkh> X-Mailer: git-send-email 2.48.1 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=3807; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=PrJw6I6vdUt9aqwmib6lBHPYvkEM4Tu+OY03iUTLXtQ=; b=owGbwMvMwCRo6H6F97bub03G02pJDOn7KlhC3rFkPlgRyaC4oTjn72mhY0eW/GHIvzpn2VNrS aV7JmtWdMSyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBEHm1kmKf7/8Zpte8sz5cU /i051Lwl12kJowTDPGu17u5ti0Uan1zie/9248berlkdWQA= 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: drm/amdgpu/pm: fix the null pointer while the smu is disabled It needs to check if the pp_funcs is initialized while release the context, otherwise it will trigger null pointer panic while the software smu is not enabled. [ 1109.404555] BUG: kernel NULL pointer dereference, address: 0000000000000078 [ 1109.404609] #PF: supervisor read access in kernel mode [ 1109.404638] #PF: error_code(0x0000) - not-present page [ 1109.404657] PGD 0 P4D 0 [ 1109.404672] Oops: 0000 [#1] PREEMPT SMP NOPTI [ 1109.404701] CPU: 7 PID: 9150 Comm: amdgpu_test Tainted: G OEL 5.16.0-custom #1 [ 1109.404732] Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006 [ 1109.404765] RIP: 0010:amdgpu_dpm_force_performance_level+0x1d/0x170 [amdgpu] [ 1109.405109] Code: 5d c3 44 8b a3 f0 80 00 00 eb e5 66 90 0f 1f 44 00 00 55 48 89 e5 41 57 41 56 41 55 41 54 53 48 83 ec 08 4c 8b b7 f0 7d 00 00 <49> 83 7e 78 00 0f 84 f2 00 00 00 80 bf 87 80 00 00 00 48 89 fb 0f [ 1109.405176] RSP: 0018:ffffaf3083ad7c20 EFLAGS: 00010282 [ 1109.405203] RAX: 0000000000000000 RBX: ffff9796b1c14600 RCX: 0000000002862007 [ 1109.405229] RDX: ffff97968591c8c0 RSI: 0000000000000001 RDI: ffff9796a3700000 [ 1109.405260] RBP: ffffaf3083ad7c50 R08: ffffffff9897de00 R09: ffff979688d9db60 [ 1109.405286] R10: 0000000000000000 R11: ffff979688d9db90 R12: 0000000000000001 [ 1109.405316] R13: ffff9796a3700000 R14: 0000000000000000 R15: ffff9796a3708fc0 [ 1109.405345] FS: 00007ff055cff180(0000) GS:ffff9796bfdc0000(0000) knlGS:0000000000000000 [ 1109.405378] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 1109.405400] CR2: 0000000000000078 CR3: 000000000a394000 CR4: 00000000000506e0 [ 1109.405434] Call Trace: [ 1109.405445] [ 1109.405456] ? delete_object_full+0x1d/0x20 [ 1109.405480] amdgpu_ctx_set_stable_pstate+0x7c/0xa0 [amdgpu] [ 1109.405698] amdgpu_ctx_fini.part.0+0xcb/0x100 [amdgpu] [ 1109.405911] amdgpu_ctx_do_release+0x71/0x80 [amdgpu] [ 1109.406121] amdgpu_ctx_ioctl+0x52d/0x550 [amdgpu] [ 1109.406327] ? _raw_spin_unlock+0x1a/0x30 [ 1109.406354] ? drm_gem_handle_delete+0x81/0xb0 [drm] [ 1109.406400] ? amdgpu_ctx_get_entity+0x2c0/0x2c0 [amdgpu] [ 1109.406609] drm_ioctl_kernel+0xb6/0x140 [drm] The Linux kernel CVE team has assigned CVE-2022-49529 to this issue. Affected and fixed versions =========================== Fixed in 5.18.3 with commit 49ec3441aa5e5940f3e82dd2f0205b9c856e399d Fixed in 5.19 with commit eea5c7b3390c6e006ba4cbd906447dd8cea8cfbf 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-49529 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/gpu/drm/amd/pm/amdgpu_dpm.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/49ec3441aa5e5940f3e82dd2f0205b9c856e399d https://git.kernel.org/stable/c/eea5c7b3390c6e006ba4cbd906447dd8cea8cfbf