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 2550B2563F for ; Wed, 28 Feb 2024 08:17:05 +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=1709108225; cv=none; b=WpFKechxGiXVgMXSatWj+K5XqI7Oej29TCatCk7H/SDJfdaleq7IQ2vKXuDWW/eDMCyTv2Oe74Zby1806vScrXgBYSyMucm+Tzaw0kGQT0JaB8kspauthniLNVQcib4yvmMpyk0FlTsRN+DG6YMMEYdRBbghw6yz2g6Sp3o/+CU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709108225; c=relaxed/simple; bh=bO4PLnkG1FmV1cstqQd3RpVJnqymIT0IATQSOvNyQMQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=qB9areEWc+LfiNUwNnibHo6DvG3/z3b3BFsJQkBpNnVTL1lvbharpbs7RRQiKnZB4ZWgJ0aqcirDNokafbbxic5cxZTvDAmFGVbm7q1EHP03NHYaQk7oZEndVUeqlVW0VEsD2tbPbOIba9eeCrsk+ApoJ9LsgKhFJSAl/a+Ez7c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Vs5lvmwp; 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="Vs5lvmwp" Received: by smtp.kernel.org (Postfix) with ESMTPSA id AC734C433F1; Wed, 28 Feb 2024 08:17:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1709108225; bh=bO4PLnkG1FmV1cstqQd3RpVJnqymIT0IATQSOvNyQMQ=; h=From:To:Cc:Subject:Date:Reply-to:From; b=Vs5lvmwpc/LZ3PPP6uZLYMyxO9bs1gnAgar9JW4TaMGYZ5qa+KEGbBWFyGako9p2l LDK/bq784fFQRpnLNkXB5XK/1ct7+7T2yXH84J5wjCb/ICNWBCdDgsco4fzAUfyexu eNNnhjbmZ2wayaPeEx6vr3adx0MgUxt3iIz/yOWs= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: gregkh@kernel.org Subject: CVE-2021-47024: vsock/virtio: free queued packets when closing socket Date: Wed, 28 Feb 2024 09:15:12 +0100 Message-ID: <2024022833-CVE-2021-47024-c116@gregkh> X-Mailer: git-send-email 2.44.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=2542; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=OfVxLmPg6cNP4kqz5l2U9m0Z+ymBi7A6EmtJdEv4/5I=; b=owGbwMvMwCRo6H6F97bub03G02pJDKn3XmcxnIqtPT+nMa5m8+VZsjdCT2yx5vx0c4/t5CbhF 2rflILndsSyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmcCGcHEKwERuTmOYK7BE6q+DW+TkcHkB ixUf76qaadQ/ZVhwYd4sjVm/m6x2Hv0e5ZV9Zush/b2/AQ== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: gregkh@kernel.org Description =========== In the Linux kernel, the following vulnerability has been resolved: vsock/virtio: free queued packets when closing socket As reported by syzbot [1], there is a memory leak while closing the socket. We partially solved this issue with commit ac03046ece2b ("vsock/virtio: free packets during the socket release"), but we forgot to drain the RX queue when the socket is definitely closed by the scheduled work. To avoid future issues, let's use the new virtio_transport_remove_sock() to drain the RX queue before removing the socket from the af_vsock lists calling vsock_remove_sock(). [1] https://syzkaller.appspot.com/bug?extid=24452624fc4c571eedd9 The Linux kernel CVE team has assigned CVE-2021-47024 to this issue. Affected and fixed versions =========================== Issue introduced in 5.2 with commit ac03046ece2b and fixed in 5.10.37 with commit b605673b523f Issue introduced in 5.2 with commit ac03046ece2b and fixed in 5.11.21 with commit 27691665145e Issue introduced in 5.2 with commit ac03046ece2b and fixed in 5.12.4 with commit 37c38674ef2f Issue introduced in 5.2 with commit ac03046ece2b and fixed in 5.13 with commit 8432b8114957 Please see https://www.kernel.org or 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-2021-47024 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/virtio_transport_common.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/b605673b523fe33abeafb2136759bcbc9c1e6ebf https://git.kernel.org/stable/c/27691665145e74a45034a9dccf1150cf1894763a https://git.kernel.org/stable/c/37c38674ef2f8d7e8629e5d433c37d6c1273d16b https://git.kernel.org/stable/c/8432b8114957235f42e070a16118a7f750de9d39