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 675E833E1 for ; Mon, 15 Sep 2025 14:48:26 +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=1757947706; cv=none; b=CGq2GPpz5VZ7gg5JHqb+JDQI3Mn/gNcbehaWt8j+YNdVjXYtYr5cBuARMiaOSLq3GlQLi4VFwZd2o22ja2J68yYSLMbrqmoCYlTsyCvOKXHbLp7LXNThhckCdwVrL5aosMSfLvPKz3LsbJOZFXSZNFD0RBYxh7i+ATrYGfHLWuU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757947706; c=relaxed/simple; bh=0T6PFR/hgvq5ToDvcaIZ8ZXSfczZWDXsb3t4f/RqlAc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=RgQ1j5cymFpMxy/mIU2PHqko+gf3gus+2R2HvE9oYX3MlnrHGxLThMkhGUnhsdF+DfH7fn0k3TBbl1v8kT43KQMDGgf54BOzBdMqx4o1+62xtR3Fp9f/XF1RJNY66CY/pdH94SnhFrYp4Ki9nNfH7JHZvhwqnaq0EUQyZAfSTXE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=OskO2Fmf; 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="OskO2Fmf" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8CEF1C4CEF1; Mon, 15 Sep 2025 14:48:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1757947706; bh=0T6PFR/hgvq5ToDvcaIZ8ZXSfczZWDXsb3t4f/RqlAc=; h=From:To:Cc:Subject:Date:Reply-to:From; b=OskO2FmfsPn1VAuc8vIJDuZMKyeIgX8nMIiGZ3cC2ELhegQNfvCpsZ6sh29hgpYNn zdDk3kNseHYfFmCE7I+9Sqh994BqUwnoI/BZh94HM85V8WgMfx9o1WzrCKHCa1toZh SrXwyoK2ho0jYbg82pOZ9JDx8FUsqKNrmzeRygIU= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-53250: firmware: dmi-sysfs: Fix null-ptr-deref in dmi_sysfs_register_handle Date: Mon, 15 Sep 2025 16:46:25 +0200 Message-ID: <2025091502-CVE-2023-53250-05ea@gregkh> X-Mailer: git-send-email 2.51.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=3851; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=WoGpP8FzYi3yoiANZGxXeu82NElEPS2xKaY3UnI2+7s=; b=owGbwMvMwCRo6H6F97bub03G02pJDBkn1FbNPWwns+dafM5En+yXcxeZv9xXP/XSahb1yvNHZ QWSEqN2dMSyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBE5l5lWLD9/y3WTbbzIlYz uPhETfbj3zl78XqG+YkPkrMc170uWbdNLzxlYdaSLwV+bwA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: firmware: dmi-sysfs: Fix null-ptr-deref in dmi_sysfs_register_handle KASAN reported a null-ptr-deref error: KASAN: null-ptr-deref in range [0x0000000000000008-0x000000000000000f] CPU: 0 PID: 1373 Comm: modprobe Hardware name: QEMU Standard PC (i440FX + PIIX, 1996) RIP: 0010:dmi_sysfs_entry_release ... Call Trace: kobject_put dmi_sysfs_register_handle (drivers/firmware/dmi-sysfs.c:540) dmi_sysfs dmi_decode_table (drivers/firmware/dmi_scan.c:133) dmi_walk (drivers/firmware/dmi_scan.c:1115) dmi_sysfs_init (drivers/firmware/dmi-sysfs.c:149) dmi_sysfs do_one_initcall (init/main.c:1296) ... Kernel panic - not syncing: Fatal exception Kernel Offset: 0x4000000 from 0xffffffff81000000 ---[ end Kernel panic - not syncing: Fatal exception ]--- It is because previous patch added kobject_put() to release the memory which will call dmi_sysfs_entry_release() and list_del(). However, list_add_tail(entry->list) is called after the error block, so the list_head is uninitialized and cannot be deleted. Move error handling to after list_add_tail to fix this. The Linux kernel CVE team has assigned CVE-2023-53250 to this issue. Affected and fixed versions =========================== Issue introduced in 5.15.47 with commit fdffa4ad8f6bf1ece877edfb807f2b2c729d8578 and fixed in 5.15.99 with commit b4fe158259fb5fead52ff2b55841ec5c39492604 Issue introduced in 5.19 with commit 660ba678f9998aca6db74f2dd912fa5124f0fa31 and fixed in 6.1.16 with commit e851996b32264e78a10863c2ac41a8689d7b9252 Issue introduced in 5.19 with commit 660ba678f9998aca6db74f2dd912fa5124f0fa31 and fixed in 6.2.3 with commit 5d0492d1d934642bdfd2057acc1b56f4b57be465 Issue introduced in 5.19 with commit 660ba678f9998aca6db74f2dd912fa5124f0fa31 and fixed in 6.3 with commit 18e126e97c961f7a93823795c879d7c085fe5098 Issue introduced in 4.9.318 with commit a9bfb37d6ba7c376b0d53337a4c5f5ff324bd725 Issue introduced in 4.14.283 with commit ed38d04342dfbe9e5aca745c8b5eb4188a74f0ef Issue introduced in 4.19.247 with commit c66cc3c62870a27ea8f060a7e4c1ad8d26dd3f0d Issue introduced in 5.4.198 with commit a724634b2a49f6ff0177a9e19a5a92fc1545e1b7 Issue introduced in 5.10.122 with commit 985706bd3bbeffc8737bc05965ca8d24837bc7db Issue introduced in 5.17.15 with commit 3ba359ebe914ac3f8c6c832b28007c14c39d3766 Issue introduced in 5.18.4 with commit ec752973aa721ee281d5441e497364637c626c7b 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-2023-53250 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/firmware/dmi-sysfs.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/b4fe158259fb5fead52ff2b55841ec5c39492604 https://git.kernel.org/stable/c/e851996b32264e78a10863c2ac41a8689d7b9252 https://git.kernel.org/stable/c/5d0492d1d934642bdfd2057acc1b56f4b57be465 https://git.kernel.org/stable/c/18e126e97c961f7a93823795c879d7c085fe5098