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 94FBE1F4FD9 for ; Mon, 21 Oct 2024 12:19:25 +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=1729513165; cv=none; b=lrzrzFDfca/JB5PzUU1IOnJ2W/2p8Oaa+pjxxl8Ylg9pWm/wYcBvk6K4n13Xl7YJTdJ3dAgHm7KGk3quroA/GzZnp4Glr0c9M7K3v8kTdrvIkHRisdlVgbR0/QdhgjzNrWEhM0RC6fwyNwd+EzF8URoZPHiOnwsNsqHtSdUPAmg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729513165; c=relaxed/simple; bh=LVNaHu0hsCUqJulQwvmDtZ1+fMrVmcRcf4B/nwLdYUo=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=ujbRGhjDDpr/s4DTCYj6FieGb7KnRyN7HFTKp7vIgQGboaw4lhWY45ME/KghXOMJm+gz5AKTPmjNWCWf6c8DWbfts32B0b9TcwFz5YhVnqaSx2SufRpWnWztcyhXcF9rNX1Lg+Urz5JgEhJhoI2w/iYSBqjvhgly4pC+1xpOXl8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=oUjTBL6R; 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="oUjTBL6R" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 147A0C4CEC3; Mon, 21 Oct 2024 12:19:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1729513165; bh=LVNaHu0hsCUqJulQwvmDtZ1+fMrVmcRcf4B/nwLdYUo=; h=From:To:Cc:Subject:Date:Reply-to:From; b=oUjTBL6Rnp+Js0CmLP8N0D3suyK3T+RZoPxA4luOcermylzCvBYQjFne339ScuJdu M81MFMKJ54OyJmdLxTE2rGakSHNE8a12j5GQOZD2JZvZBV0z5LWW6ouEuJy3mk6xmV ZAJkS+4njjLF1jGCkb7Y6A0FAHbu8wCrfEuP7EkU= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-49855: nbd: fix race between timeout and normal completion Date: Mon, 21 Oct 2024 14:18:57 +0200 Message-ID: <2024102153-CVE-2024-49855-8997@gregkh> X-Mailer: git-send-email 2.47.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=2603; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=LVNaHu0hsCUqJulQwvmDtZ1+fMrVmcRcf4B/nwLdYUo=; b=owGbwMvMwCRo6H6F97bub03G02pJDOlibmtfVZeac76bUau+JVhjbcXs5Ztry2YsLt7WaOL55 HyAxs6ojlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZiIliXDgjOnbW75tZiUvuSx y9tjNrOjpip6FcOCZTt5N5xc/uU095ec/e1Lff9unO22BgA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit Description =========== In the Linux kernel, the following vulnerability has been resolved: nbd: fix race between timeout and normal completion If request timetout is handled by nbd_requeue_cmd(), normal completion has to be stopped for avoiding to complete this requeued request, other use-after-free can be triggered. Fix the race by clearing NBD_CMD_INFLIGHT in nbd_requeue_cmd(), meantime make sure that cmd->lock is grabbed for clearing the flag and the requeue. The Linux kernel CVE team has assigned CVE-2024-49855 to this issue. Affected and fixed versions =========================== Issue introduced in 5.19 with commit 2895f1831e91 and fixed in 6.1.113 with commit 9c25faf72d78 Issue introduced in 5.19 with commit 2895f1831e91 and fixed in 6.6.54 with commit 6e73b946a379 Issue introduced in 5.19 with commit 2895f1831e91 and fixed in 6.10.13 with commit 5236ada8ebbd Issue introduced in 5.19 with commit 2895f1831e91 and fixed in 6.11.2 with commit 9a74c3e6c0d6 Issue introduced in 5.19 with commit 2895f1831e91 and fixed in 6.12-rc1 with commit c9ea57c91f03 Issue introduced in 5.17.15 with commit cdf62c535a9b Issue introduced in 5.18.4 with commit 5171ef20bae8 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-2024-49855 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/block/nbd.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/9c25faf72d780a9c71081710cd48759d61ff6e9b https://git.kernel.org/stable/c/6e73b946a379a1dfbb62626af93843bdfb53753d https://git.kernel.org/stable/c/5236ada8ebbd9e7461f17477357582f5be4f46f7 https://git.kernel.org/stable/c/9a74c3e6c0d686c26ba2aab66d15ddb89dc139cc https://git.kernel.org/stable/c/c9ea57c91f03bcad415e1a20113bdb2077bcf990