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 0789028751D for ; Wed, 18 Jun 2025 11:03:48 +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=1750244628; cv=none; b=tJXmwJOL5JgS/Zpb8hvhIxYRV1micBrRek73D7GXGBBMUsSIjLPMcJ/YX3znpCwnBw3gmw46t5y5/dEt8PFqRliLFI26fygdFx14Xk43dOF49lDlwxzx2IfLQIQYQ2NoK1nlZUbkPDUD6vhdAeSdHk9MN4ALbK5qCAs7dyet7h8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750244628; c=relaxed/simple; bh=SpyxGZdlcy7NJj5KWAN73WH4Wm1Yh8y+91t6tV/sF4U=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=tf7rPKY8O6yVQOinTuk2b3aiBK7qib8AtijkY7gHUt+qvhS7WO9V4qhBjaYPwl+U6fKaeEULjtRpYo1nZHks5fktlSZ8iTg0d8aMqoua4MvUiXZv7dgktSGhPnNaTi42GCzg11NawBNKDW4yc1udY7hPLt4iT6tIFgKplQvIPJY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=X7iu28or; 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="X7iu28or" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 82D60C4CEED; Wed, 18 Jun 2025 11:03:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1750244627; bh=SpyxGZdlcy7NJj5KWAN73WH4Wm1Yh8y+91t6tV/sF4U=; h=From:To:Cc:Subject:Date:Reply-to:From; b=X7iu28orvlLZ0jl6YWhvE9VPgHu557X6j2g1Q6/XaSVCBjnvdmHgiOVahpniqpCJI Zpzfmojze/P5DDo2Va8+PCIzK47ZfMTfXHlac852P69Q4H3mcQ0CWUCAdsOoAannyA 2XWEy5l2fy6nhyeZCbXXyOuwEaBKxCzYhd2hLMSM= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-49986: scsi: storvsc: Remove WQ_MEM_RECLAIM from storvsc_error_wq Date: Wed, 18 Jun 2025 13:00:51 +0200 Message-ID: <2025061823-CVE-2022-49986-d434@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=4638; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=TBoS3v12b7b+H/BgIPIdcLB9XM4M1txvhUjrGLFOEAw=; b=owGbwMvMwCRo6H6F97bub03G02pJDBlBc9yf3krcOb35b6oNF5Pdt5KC3Q0CCuY5qjJ9/xOdZ 51l5BfriGVhEGRikBVTZPmyjefo/opDil6Gtqdh5rAygQxh4OIUgImw/2eY73/qbFlCr+ilmUss mvesf8Q5TdboIsM8E8uaDxMrDz/Yv3bF1Xunbj7QufUhEAA= 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: scsi: storvsc: Remove WQ_MEM_RECLAIM from storvsc_error_wq storvsc_error_wq workqueue should not be marked as WQ_MEM_RECLAIM as it doesn't need to make forward progress under memory pressure. Marking this workqueue as WQ_MEM_RECLAIM may cause deadlock while flushing a non-WQ_MEM_RECLAIM workqueue. In the current state it causes the following warning: [ 14.506347] ------------[ cut here ]------------ [ 14.506354] workqueue: WQ_MEM_RECLAIM storvsc_error_wq_0:storvsc_remove_lun is flushing !WQ_MEM_RECLAIM events_freezable_power_:disk_events_workfn [ 14.506360] WARNING: CPU: 0 PID: 8 at <-snip->kernel/workqueue.c:2623 check_flush_dependency+0xb5/0x130 [ 14.506390] CPU: 0 PID: 8 Comm: kworker/u4:0 Not tainted 5.4.0-1086-azure #91~18.04.1-Ubuntu [ 14.506391] Hardware name: Microsoft Corporation Virtual Machine/Virtual Machine, BIOS Hyper-V UEFI Release v4.1 05/09/2022 [ 14.506393] Workqueue: storvsc_error_wq_0 storvsc_remove_lun [ 14.506395] RIP: 0010:check_flush_dependency+0xb5/0x130 <-snip-> [ 14.506408] Call Trace: [ 14.506412] __flush_work+0xf1/0x1c0 [ 14.506414] __cancel_work_timer+0x12f/0x1b0 [ 14.506417] ? kernfs_put+0xf0/0x190 [ 14.506418] cancel_delayed_work_sync+0x13/0x20 [ 14.506420] disk_block_events+0x78/0x80 [ 14.506421] del_gendisk+0x3d/0x2f0 [ 14.506423] sr_remove+0x28/0x70 [ 14.506427] device_release_driver_internal+0xef/0x1c0 [ 14.506428] device_release_driver+0x12/0x20 [ 14.506429] bus_remove_device+0xe1/0x150 [ 14.506431] device_del+0x167/0x380 [ 14.506432] __scsi_remove_device+0x11d/0x150 [ 14.506433] scsi_remove_device+0x26/0x40 [ 14.506434] storvsc_remove_lun+0x40/0x60 [ 14.506436] process_one_work+0x209/0x400 [ 14.506437] worker_thread+0x34/0x400 [ 14.506439] kthread+0x121/0x140 [ 14.506440] ? process_one_work+0x400/0x400 [ 14.506441] ? kthread_park+0x90/0x90 [ 14.506443] ret_from_fork+0x35/0x40 [ 14.506445] ---[ end trace 2d9633159fdc6ee7 ]--- The Linux kernel CVE team has assigned CVE-2022-49986 to this issue. Affected and fixed versions =========================== Issue introduced in 4.15 with commit 436ad941335386c5fc7faa915a8fbdfe8c908084 and fixed in 4.19.257 with commit b692c238ddfa61f00d97c4c1f021425d132ba96f Issue introduced in 4.15 with commit 436ad941335386c5fc7faa915a8fbdfe8c908084 and fixed in 5.4.212 with commit b4c928ace9a123629eeb14ec5d7ee8f73e5ac668 Issue introduced in 4.15 with commit 436ad941335386c5fc7faa915a8fbdfe8c908084 and fixed in 5.10.140 with commit 46fcb0fc884db78a0384be92cc2a51927e6581b8 Issue introduced in 4.15 with commit 436ad941335386c5fc7faa915a8fbdfe8c908084 and fixed in 5.15.64 with commit cd2a50d0a097a42b6de283377da98ff757505120 Issue introduced in 4.15 with commit 436ad941335386c5fc7faa915a8fbdfe8c908084 and fixed in 5.19.6 with commit 828f57ac75eaccd6607ee4d1468d34e983e32c68 Issue introduced in 4.15 with commit 436ad941335386c5fc7faa915a8fbdfe8c908084 and fixed in 6.0 with commit d957e7ffb2c72410bcc1a514153a46719255a5da 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-49986 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/scsi/storvsc_drv.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/b692c238ddfa61f00d97c4c1f021425d132ba96f https://git.kernel.org/stable/c/b4c928ace9a123629eeb14ec5d7ee8f73e5ac668 https://git.kernel.org/stable/c/46fcb0fc884db78a0384be92cc2a51927e6581b8 https://git.kernel.org/stable/c/cd2a50d0a097a42b6de283377da98ff757505120 https://git.kernel.org/stable/c/828f57ac75eaccd6607ee4d1468d34e983e32c68 https://git.kernel.org/stable/c/d957e7ffb2c72410bcc1a514153a46719255a5da