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 163BF1AF0C8 for ; Tue, 20 May 2025 15:23:42 +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=1747754622; cv=none; b=dNS0KjVsfCBMK5sE5JcHmKpNN32euRzrmKLV9dMC4qP9s+cWPiWHblpM7YBubLyldJWOElAnt1gx82OJPYgLgnA7qOpMBFhEXlQ46+mnu3gjiBpk8ma/7p+ShNBd7wi75i/UuEYIJGyT9TmtMAnWG7+PXrcq+2h+UIXXtFX0Hy4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747754622; c=relaxed/simple; bh=vG/thCXjNOenm6NgWYr3DSW/V0qnNhOP51HD6N0OILo=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=oBkhYqA8G2oqBeCMKsE/Dtbly9T78YhzoVl0dbsYibrJQVsSKJ5OxM81YOwzEVAsF9Fenub2jIjdgmtDflIixgKgBX/Jo1u6KaHD92uQ19w6NSco/FIsrnEz/vS4oKGN/igOT3KkTLIljamkdDX7IMQZIKARhk9MvYpl55oLdyQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=ASQxDuA5; 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="ASQxDuA5" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4F8CFC4CEE9; Tue, 20 May 2025 15:23:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1747754621; bh=vG/thCXjNOenm6NgWYr3DSW/V0qnNhOP51HD6N0OILo=; h=From:To:Cc:Subject:Date:Reply-to:From; b=ASQxDuA5vCON5C3U/O2a/5gu7kVXLT4XqGNFRAAkQ1+KwUaZJBdMBqiX7nV1sXuFO 7iWkbTWqMKwIez4MJCBWPegpm7MV1eoZQ8CDSMD8DchVIRh2D1Xvy4C5f7cI30ZKdS CNwKZOi+9S1A+qnFUeem8cfZ+GSCbHwcUd0FJTeg= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-37928: dm-bufio: don't schedule in atomic context Date: Tue, 20 May 2025 17:22:24 +0200 Message-ID: <2025052005-CVE-2025-37928-66d3@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=5424; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=4CnFhakxBitCTyJPL4r3DcKOF0x2X6SBVO7qlJ8X2vY=; b=owGbwMvMwCRo6H6F97bub03G02pJDBk682TVRdLX2fg8zM59f28y9/s5GjfF+K3M01/86S5Kn H7Cp2ZzRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAEzkARfDXFlvPYmDr+/unbPz W3dKwUPZZ42R/QyzmJ4w+Ha/n1ep8LmCba9z1Mlf7V/eAwA= 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: dm-bufio: don't schedule in atomic context A BUG was reported as below when CONFIG_DEBUG_ATOMIC_SLEEP and try_verify_in_tasklet are enabled. [ 129.444685][ T934] BUG: sleeping function called from invalid context at drivers/md/dm-bufio.c:2421 [ 129.444723][ T934] in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 934, name: kworker/1:4 [ 129.444740][ T934] preempt_count: 201, expected: 0 [ 129.444756][ T934] RCU nest depth: 0, expected: 0 [ 129.444781][ T934] Preemption disabled at: [ 129.444789][ T934] [] shrink_work+0x21c/0x248 [ 129.445167][ T934] kernel BUG at kernel/sched/walt/walt_debug.c:16! [ 129.445183][ T934] Internal error: Oops - BUG: 00000000f2000800 [#1] PREEMPT SMP [ 129.445204][ T934] Skip md ftrace buffer dump for: 0x1609e0 [ 129.447348][ T934] CPU: 1 PID: 934 Comm: kworker/1:4 Tainted: G W OE 6.6.56-android15-8-o-g6f82312b30b9-debug #1 1400000003000000474e5500b3187743670464e8 [ 129.447362][ T934] Hardware name: Qualcomm Technologies, Inc. Parrot QRD, Alpha-M (DT) [ 129.447373][ T934] Workqueue: dm_bufio_cache shrink_work [ 129.447394][ T934] pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 129.447406][ T934] pc : android_rvh_schedule_bug+0x0/0x8 [sched_walt_debug] [ 129.447435][ T934] lr : __traceiter_android_rvh_schedule_bug+0x44/0x6c [ 129.447451][ T934] sp : ffffffc0843dbc90 [ 129.447459][ T934] x29: ffffffc0843dbc90 x28: ffffffffffffffff x27: 0000000000000c8b [ 129.447479][ T934] x26: 0000000000000040 x25: ffffff804b3d6260 x24: ffffffd816232b68 [ 129.447497][ T934] x23: ffffff805171c5b4 x22: 0000000000000000 x21: ffffffd816231900 [ 129.447517][ T934] x20: ffffff80306ba898 x19: 0000000000000000 x18: ffffffc084159030 [ 129.447535][ T934] x17: 00000000d2b5dd1f x16: 00000000d2b5dd1f x15: ffffffd816720358 [ 129.447554][ T934] x14: 0000000000000004 x13: ffffff89ef978000 x12: 0000000000000003 [ 129.447572][ T934] x11: ffffffd817a823c4 x10: 0000000000000202 x9 : 7e779c5735de9400 [ 129.447591][ T934] x8 : ffffffd81560d004 x7 : 205b5d3938373434 x6 : ffffffd8167397c8 [ 129.447610][ T934] x5 : 0000000000000000 x4 : 0000000000000001 x3 : ffffffc0843db9e0 [ 129.447629][ T934] x2 : 0000000000002f15 x1 : 0000000000000000 x0 : 0000000000000000 [ 129.447647][ T934] Call trace: [ 129.447655][ T934] android_rvh_schedule_bug+0x0/0x8 [sched_walt_debug 1400000003000000474e550080cce8a8a78606b6] [ 129.447681][ T934] __might_resched+0x190/0x1a8 [ 129.447694][ T934] shrink_work+0x180/0x248 [ 129.447706][ T934] process_one_work+0x260/0x624 [ 129.447718][ T934] worker_thread+0x28c/0x454 [ 129.447729][ T934] kthread+0x118/0x158 [ 129.447742][ T934] ret_from_fork+0x10/0x20 [ 129.447761][ T934] Code: ???????? ???????? ???????? d2b5dd1f (d4210000) [ 129.447772][ T934] ---[ end trace 0000000000000000 ]--- dm_bufio_lock will call spin_lock_bh when try_verify_in_tasklet is enabled, and __scan will be called in atomic context. The Linux kernel CVE team has assigned CVE-2025-37928 to this issue. Affected and fixed versions =========================== Issue introduced in 4.9 with commit 7cd326747f46ffe1c7bff5682e97dfbcb98990ec and fixed in 6.1.138 with commit a99f5bf4f7197009859dbce14c12f8e2ce5a5a69 Issue introduced in 4.9 with commit 7cd326747f46ffe1c7bff5682e97dfbcb98990ec and fixed in 6.6.90 with commit c8c83052283bcf2fdd467a33d1d2bd5ba36e935a Issue introduced in 4.9 with commit 7cd326747f46ffe1c7bff5682e97dfbcb98990ec and fixed in 6.12.28 with commit f45108257280e0a1cc951ce254853721b40c0812 Issue introduced in 4.9 with commit 7cd326747f46ffe1c7bff5682e97dfbcb98990ec and fixed in 6.14.6 with commit 69a37b3ba85088fc6b903b8e1db7f0a1d4d0b52d Issue introduced in 4.9 with commit 7cd326747f46ffe1c7bff5682e97dfbcb98990ec and fixed in 6.15-rc5 with commit a3d8f0a7f5e8b193db509c7191fefeed3533fc44 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-2025-37928 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/md/dm-bufio.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/a99f5bf4f7197009859dbce14c12f8e2ce5a5a69 https://git.kernel.org/stable/c/c8c83052283bcf2fdd467a33d1d2bd5ba36e935a https://git.kernel.org/stable/c/f45108257280e0a1cc951ce254853721b40c0812 https://git.kernel.org/stable/c/69a37b3ba85088fc6b903b8e1db7f0a1d4d0b52d https://git.kernel.org/stable/c/a3d8f0a7f5e8b193db509c7191fefeed3533fc44