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 372C325B1ED for ; Fri, 2 May 2025 15:59:33 +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=1746201573; cv=none; b=DwKSVIzxDGZP9IT63EJySinHkC0fsgWmd+CpBXHAjEzYdG+OTDWQJFDy/xxNSFMubrj0Q13nvhVQXX8ct3F2Q8ohIzgi0obzM4FaF3s6hzstwIj0VFpkuhp85ECo+fUTdFOKWOmGi0bzUrRrArDQLZ3/52fkYU4AFWI4fncjXg0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746201573; c=relaxed/simple; bh=fneU/rDvj12LDAMdBlge5uBxTOYbgXWibmnfisUlF5k=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=eWyP2zsEZNiF9btZD2M269MmSy2dkyLfLrmejtMfAvmXhQ+yMypATubcGh0jlgHJklFzfoRYx3U/deZ2qsl/Y2ST4I0OqdNrEN83l17TQ3/yG3i95+dhln/4EN4p8x9SVFQs8inA7S7p/kAd0X1CusrNVmGOyC/hElUa9x27C8o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=oNWEJ/wM; 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="oNWEJ/wM" Received: by smtp.kernel.org (Postfix) with ESMTPSA id AA8F5C4CEE4; Fri, 2 May 2025 15:59:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1746201573; bh=fneU/rDvj12LDAMdBlge5uBxTOYbgXWibmnfisUlF5k=; h=From:To:Cc:Subject:Date:Reply-to:From; b=oNWEJ/wMNkhBWjmWQxNsiK5msPG1ItpKMQJJnS+pGP6LiDUAfhDsKDINITYIB2n9w wkuGr4uObO72X+awzkGYxO0GHNlPSlITJaRKKlIDGLMW+pHEakAuhGGDioawAu7AW0 sQVG/rm+Z6pg7qFXxABELVWVWA9dS7xwouMs/ly8= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-53099: firmware: xilinx: don't make a sleepable memory allocation from an atomic context Date: Fri, 2 May 2025 17:56:04 +0200 Message-ID: <2025050223-CVE-2023-53099-0987@gregkh> X-Mailer: git-send-email 2.49.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=5426; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=2qhEDZlybrqsf9xcgsK8fa2f5d0ewcZtbeHM17Wpkdg=; b=owGbwMvMwCRo6H6F97bub03G02pJDBkir17ff7jMccnfBy2f5Nwm/F6YdW99g3RI3wRe7y+vu 2d+0uj61RHLwiDIxCArpsjyZRvP0f0VhxS9DG1Pw8xhZQIZwsDFKQAT2XaTYX7+zbJX+msWF29J num9l2fnde6Ag7wMc2X3G24Kjpqx+p3CAobg3ht9CwvrawA= 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: xilinx: don't make a sleepable memory allocation from an atomic context The following issue was discovered using lockdep: [ 6.691371] BUG: sleeping function called from invalid context at include/linux/sched/mm.h:209 [ 6.694602] in_atomic(): 1, irqs_disabled(): 128, non_block: 0, pid: 1, name: swapper/0 [ 6.702431] 2 locks held by swapper/0/1: [ 6.706300] #0: ffffff8800f6f188 (&dev->mutex){....}-{3:3}, at: __device_driver_lock+0x4c/0x90 [ 6.714900] #1: ffffffc009a2abb8 (enable_lock){....}-{2:2}, at: clk_enable_lock+0x4c/0x140 [ 6.723156] irq event stamp: 304030 [ 6.726596] hardirqs last enabled at (304029): [] _raw_spin_unlock_irqrestore+0xc0/0xd0 [ 6.736142] hardirqs last disabled at (304030): [] clk_enable_lock+0xfc/0x140 [ 6.744742] softirqs last enabled at (303958): [] _stext+0x4f0/0x894 [ 6.752655] softirqs last disabled at (303951): [] irq_exit+0x238/0x280 [ 6.760744] CPU: 1 PID: 1 Comm: swapper/0 Tainted: G U 5.15.36 #2 [ 6.768048] Hardware name: xlnx,zynqmp (DT) [ 6.772179] Call trace: [ 6.774584] dump_backtrace+0x0/0x300 [ 6.778197] show_stack+0x18/0x30 [ 6.781465] dump_stack_lvl+0xb8/0xec [ 6.785077] dump_stack+0x1c/0x38 [ 6.788345] ___might_sleep+0x1a8/0x2a0 [ 6.792129] __might_sleep+0x6c/0xd0 [ 6.795655] kmem_cache_alloc_trace+0x270/0x3d0 [ 6.800127] do_feature_check_call+0x100/0x220 [ 6.804513] zynqmp_pm_invoke_fn+0x8c/0xb0 [ 6.808555] zynqmp_pm_clock_getstate+0x90/0xe0 [ 6.813027] zynqmp_pll_is_enabled+0x8c/0x120 [ 6.817327] zynqmp_pll_enable+0x38/0xc0 [ 6.821197] clk_core_enable+0x144/0x400 [ 6.825067] clk_core_enable+0xd4/0x400 [ 6.828851] clk_core_enable+0xd4/0x400 [ 6.832635] clk_core_enable+0xd4/0x400 [ 6.836419] clk_core_enable+0xd4/0x400 [ 6.840203] clk_core_enable+0xd4/0x400 [ 6.843987] clk_core_enable+0xd4/0x400 [ 6.847771] clk_core_enable+0xd4/0x400 [ 6.851555] clk_core_enable_lock+0x24/0x50 [ 6.855683] clk_enable+0x24/0x40 [ 6.858952] fclk_probe+0x84/0xf0 [ 6.862220] platform_probe+0x8c/0x110 [ 6.865918] really_probe+0x110/0x5f0 [ 6.869530] __driver_probe_device+0xcc/0x210 [ 6.873830] driver_probe_device+0x64/0x140 [ 6.877958] __driver_attach+0x114/0x1f0 [ 6.881828] bus_for_each_dev+0xe8/0x160 [ 6.885698] driver_attach+0x34/0x50 [ 6.889224] bus_add_driver+0x228/0x300 [ 6.893008] driver_register+0xc0/0x1e0 [ 6.896792] __platform_driver_register+0x44/0x60 [ 6.901436] fclk_driver_init+0x1c/0x28 [ 6.905220] do_one_initcall+0x104/0x590 [ 6.909091] kernel_init_freeable+0x254/0x2bc [ 6.913390] kernel_init+0x24/0x130 [ 6.916831] ret_from_fork+0x10/0x20 Fix it by passing the GFP_ATOMIC gfp flag for the corresponding memory allocation. The Linux kernel CVE team has assigned CVE-2023-53099 to this issue. Affected and fixed versions =========================== Issue introduced in 5.10 with commit acfdd18591eaac25446e976a0c0d190f8b3dbfb1 and fixed in 5.10.176 with commit b37d3ccbd549494890672136a0e623eb010d46a7 Issue introduced in 5.10 with commit acfdd18591eaac25446e976a0c0d190f8b3dbfb1 and fixed in 5.15.104 with commit 86afb633beaa02ee95b5126a14c9f22cfade4fd9 Issue introduced in 5.10 with commit acfdd18591eaac25446e976a0c0d190f8b3dbfb1 and fixed in 6.1.21 with commit 162049c31eb64308afa22e341a257a723526eb5c Issue introduced in 5.10 with commit acfdd18591eaac25446e976a0c0d190f8b3dbfb1 and fixed in 6.2.8 with commit 9bbab2843f2d1337a268499a1c02b435d2985a17 Issue introduced in 5.10 with commit acfdd18591eaac25446e976a0c0d190f8b3dbfb1 and fixed in 6.3 with commit 38ed310c22e7a0fc978b1f8292136a4a4a8b3051 Issue introduced in 5.9.12 with commit a38a99930883fb1e24f2a34b78a05a6598e86150 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-53099 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/xilinx/zynqmp.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/b37d3ccbd549494890672136a0e623eb010d46a7 https://git.kernel.org/stable/c/86afb633beaa02ee95b5126a14c9f22cfade4fd9 https://git.kernel.org/stable/c/162049c31eb64308afa22e341a257a723526eb5c https://git.kernel.org/stable/c/9bbab2843f2d1337a268499a1c02b435d2985a17 https://git.kernel.org/stable/c/38ed310c22e7a0fc978b1f8292136a4a4a8b3051