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 171D318C31 for ; Fri, 31 Jan 2025 11:31:43 +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=1738323104; cv=none; b=eCSFW7SZK3m7az8yVnv4n+dcaUyu/RPI5peBpGz/o8A4FwGKiC3o4wLURcYZiG18Ci90a8vwLWhiTLpR4N2Yw0DqD6B2R7v00UN97v84c+uGntq9FAt0Lzc3yrWdt7nKf4YEPc0yLRCEWUrmigieW62fL1OI+6pZrl5aVa8U55w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738323104; c=relaxed/simple; bh=oK6xeV1jrlzl37+vA3cjm0onlRUKtlB+Ag/HQzAi/is=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=R8no7dRFsA7njrsH5l1mbf4xqwvM9JM4Ppl0Pte7X+DugMfdSaOiv5mS1Hov9EKG0bhQSAmj2eEzTPqk/9BB2xqvppvRj3V1KO4lkeSGe4iwdIcfdoYjr9NKgXRTCy6mNtaceRQ2qWdSeDORxC+zFYakhKz5LehDN4fK05I4l0Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=wRfsKy+g; 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="wRfsKy+g" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 299B9C4CED1; Fri, 31 Jan 2025 11:31:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1738323103; bh=oK6xeV1jrlzl37+vA3cjm0onlRUKtlB+Ag/HQzAi/is=; h=From:To:Cc:Subject:Date:Reply-to:From; b=wRfsKy+gr4pFIYALfS8em2MZ4hK9olasyuHsQA+KoQyzhAUhpvJAd6rHu4gB7/N3n XcCJs0yzClKfbb2jeFiriDAnqwJbGQ23HfbLy+BGrgsgHQau0uX9BKFcjuAanmGldu RZWskP6q0zEhvManZ+nI4YGSvR4xAW5cYOcnRe5A= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-21666: vsock: prevent null-ptr-deref in vsock_*[has_data|has_space] Date: Fri, 31 Jan 2025 12:30:58 +0100 Message-ID: <2025013157-CVE-2025-21666-465a@gregkh> X-Mailer: git-send-email 2.48.1 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=2941; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=oK6xeV1jrlzl37+vA3cjm0onlRUKtlB+Ag/HQzAi/is=; b=owGbwMvMwCRo6H6F97bub03G02pJDOlzthSJX1DgCxZvWhpbbZA57+Glet8bcvXxd+6uiN85Y eXScDXdjlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZjI0XyGBReOFSvMtbwVYCSo VfRfROR+cxfjRYb5MaceTmFepBqlMylx47sFZ59nrZhxAAA= 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: vsock: prevent null-ptr-deref in vsock_*[has_data|has_space] Recent reports have shown how we sometimes call vsock_*_has_data() when a vsock socket has been de-assigned from a transport (see attached links), but we shouldn't. Previous commits should have solved the real problems, but we may have more in the future, so to avoid null-ptr-deref, we can return 0 (no space, no data available) but with a warning. This way the code should continue to run in a nearly consistent state and have a warning that allows us to debug future problems. The Linux kernel CVE team has assigned CVE-2025-21666 to this issue. Affected and fixed versions =========================== Issue introduced in 5.5 with commit c0cfa2d8a788fcf45df5bf4070ab2474c88d543a and fixed in 5.15.177 with commit 9e5fed46ccd2c34c5fa5a9c8825ce4823fdc853e Issue introduced in 5.5 with commit c0cfa2d8a788fcf45df5bf4070ab2474c88d543a and fixed in 6.1.127 with commit b52e50dd4fabd12944172bd486a4f4853b7f74dd Issue introduced in 5.5 with commit c0cfa2d8a788fcf45df5bf4070ab2474c88d543a and fixed in 6.6.74 with commit bc9c49341f9728c31fe248c5fbba32d2e81a092b Issue introduced in 5.5 with commit c0cfa2d8a788fcf45df5bf4070ab2474c88d543a and fixed in 6.12.11 with commit c23d1d4f8efefb72258e9cedce29de10d057f8ca Issue introduced in 5.5 with commit c0cfa2d8a788fcf45df5bf4070ab2474c88d543a and fixed in 6.13 with commit 91751e248256efc111e52e15115840c35d85abaf 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-21666 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: net/vmw_vsock/af_vsock.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/9e5fed46ccd2c34c5fa5a9c8825ce4823fdc853e https://git.kernel.org/stable/c/b52e50dd4fabd12944172bd486a4f4853b7f74dd https://git.kernel.org/stable/c/bc9c49341f9728c31fe248c5fbba32d2e81a092b https://git.kernel.org/stable/c/c23d1d4f8efefb72258e9cedce29de10d057f8ca https://git.kernel.org/stable/c/91751e248256efc111e52e15115840c35d85abaf