Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 7DCD4408029 for ; Wed, 27 May 2026 13:05:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779887104; cv=none; b=GhXfLqzCOJQY24/HSwXLJTwusq/Ic6QUpjOrg1NNcvmgQYmKiLLvrVuclfCVuS6gfPpwAqHwj9SUCpMXAqC8GcDVAm4bhzVwQJJMPQiAMBLJyRohBbBYIUEdK+GbSwFMYwzWHpl5BeicieGVMsVoSihsIctq6fZPhHhlbBOs01Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779887104; c=relaxed/simple; bh=ce6RZU2KQ6DUI9SpbVAjYZSg6nl3X/NrN7lg88IVvik=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=tUQ9KbBiQB9lmwQHMglzEmfLBBwiLk3iiEgIb0AFaC33/aBIYAAV6TG/aEX44Pw9AkzcrXhRIU3joLvsD1IpsSfUVaiNXEByK7qxE/aWGfqBqxQ2fGBabwUlJcZalWdAsVBrZSDxkrBSjMTP6lZ4OMXU5cSF00NFAizUsqa89uU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=pI/Pl4zQ; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="pI/Pl4zQ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0A7CE1F000E9; Wed, 27 May 2026 13:05:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1779887103; bh=bQZzZA5++Uj10FhbJHojobpDOvdfyUuMM/X9hd/U8Jo=; h=From:To:Cc:Subject:Date:Reply-To; b=pI/Pl4zQ6ux9YX9jbSr/EQm+IbLxMj/1eLuGleIPQP4vCZuTyevvyApcgxQBCSJAW Qq6z66fwDbLtnWE0DAcBRcbwGmrlRebJT9ET2cYOVMaFdZLKZNfjjasxAiyrgXg1Vf wDbPVki1OyQEd/mo0YapODchLyswZFs8gO9IHomI= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-46041: greybus: gb-beagleplay: fix sleep in atomic context in hdlc_tx_frames() Date: Wed, 27 May 2026 14:59:32 +0200 Message-ID: <2026052751-CVE-2026-46041-d696@gregkh> X-Mailer: git-send-email 2.54.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3197; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=MamreiEr9oYXy1AjU3XRnLE4SAAoZuWw2oSGN0ot7P8=; b=owGbwMvMwCRo6H6F97bub03G02pJDFlir7q1Pwr/mb/bPjtWmmnOjY0hVof7fjBN5VSQD0hZ9 NNDsXNLRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAEzE5DzDgjWqv8zWyUfv+/z5 dsvdrCBh7ef8jgwLuhzaWz2eCvPlF3wsOqHNkyvhKh4EAA== 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: greybus: gb-beagleplay: fix sleep in atomic context in hdlc_tx_frames() hdlc_append() calls usleep_range() to wait for circular buffer space, but it is called with tx_producer_lock (a spinlock) held via hdlc_tx_frames() -> hdlc_append_tx_frame()/hdlc_append_tx_u8()/etc. Sleeping while holding a spinlock is illegal and can trigger "BUG: scheduling while atomic". Fix this by moving the buffer-space wait out of hdlc_append() and into hdlc_tx_frames(), before the spinlock is acquired. The new flow: 1. Pre-calculate the worst-case encoded frame length. 2. Wait (with sleep) outside the lock until enough space is available, kicking the TX consumer work to drain the buffer. 3. Acquire the spinlock, re-verify space, and write the entire frame atomically. This ensures that sleeping only happens without any lock held, and that frames are either fully enqueued or not written at all. This bug is found by CodeQL static analysis tool (interprocedural sleep-in-atomic query) and my code review. The Linux kernel CVE team has assigned CVE-2026-46041 to this issue. Affected and fixed versions =========================== Issue introduced in 6.7 with commit ec558bbfea671ac020a6dc6be8bf8f0ee556cce0 and fixed in 6.12.86 with commit 9f2b87bcdfed55145acbf932dc12f2c057145cad Issue introduced in 6.7 with commit ec558bbfea671ac020a6dc6be8bf8f0ee556cce0 and fixed in 6.18.27 with commit b2801647c203a38e013802e9e9616b5bfac64968 Issue introduced in 6.7 with commit ec558bbfea671ac020a6dc6be8bf8f0ee556cce0 and fixed in 7.0.4 with commit 51667fe2d9294d66e0228b9f51d1f01b6680a641 Issue introduced in 6.7 with commit ec558bbfea671ac020a6dc6be8bf8f0ee556cce0 and fixed in 7.1-rc1 with commit 6b526dca0966f2370835765019a54319b78fca8d 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-2026-46041 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/greybus/gb-beagleplay.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/9f2b87bcdfed55145acbf932dc12f2c057145cad https://git.kernel.org/stable/c/b2801647c203a38e013802e9e9616b5bfac64968 https://git.kernel.org/stable/c/51667fe2d9294d66e0228b9f51d1f01b6680a641 https://git.kernel.org/stable/c/6b526dca0966f2370835765019a54319b78fca8d