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 DE1BC1E1C35 for ; Thu, 7 Nov 2024 09:36:32 +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=1730972192; cv=none; b=hWPweWDVOZ+92uHPCVvwmzIunq9xtaFzalAwqgTMvtPSOUymxaYlBtXglhqzyxp0ArnYbFxMqdLsdMPZ7YTv7iZm0lMpEvXxWTRK5M34ZPmcyc2ha/U33RKquVyj6YTZMsd3+Q2+3ZEaZYid5flOj/eFfYABykAtAo1H6oNr3bM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730972192; c=relaxed/simple; bh=8c1Lkdtrtev5HpU5EnhJqbsJ1ckf+O4YMJJR0nxaE3Q=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=TQwUr/q0msk9kAynDArYYiFm31GlkBFU26OSc1oF1bdCDi9x/LSKyhFm89nbm4l40quz7MGG8DQ4NXXBt6Ej2t+WoP4RvJraeLf+Ouh3Ucb2dGnSiYEeMiebqLSQO2D5W5nhFbu5zN3cqcHQUTBsXBQos6ZZgBOv/k+rWcd8HW8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=UUU2fiD8; 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="UUU2fiD8" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CCB5DC4CED0; Thu, 7 Nov 2024 09:36:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1730972192; bh=8c1Lkdtrtev5HpU5EnhJqbsJ1ckf+O4YMJJR0nxaE3Q=; h=From:To:Cc:Subject:Date:Reply-to:From; b=UUU2fiD8z/mvwN1rISypgC/ecN/b7ULFMdQPaAPuyluUicTx3ghljgTVxJg48/Bxy bQQyf688t/QScfr545eIxG0ucofB6K4CPa3STmSrmQlYNcvm+QOZBRVx4m1oKGzceT YE0aJVSUS5toNTyyyFMp1ZPFAGt1f/aH9jrAybFs= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-50169: vsock: Update rx_bytes on read_skb() Date: Thu, 7 Nov 2024 10:35:09 +0100 Message-ID: <2024110749-CVE-2024-50169-9df5@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=2334; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=8c1Lkdtrtev5HpU5EnhJqbsJ1ckf+O4YMJJR0nxaE3Q=; b=owGbwMvMwCRo6H6F97bub03G02pJDOk6nTsvJe5keRbjOS/3vsq0ZxMuXZos93T/HvE+z8DDL MLCcRP+dcSyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBEamYzzC/JncYyb8mTu/mi zfN8jt6zr7xip8owV8grXk/+4yyT6u5/HQqvVysUC1fwAgA= 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: Update rx_bytes on read_skb() Make sure virtio_transport_inc_rx_pkt() and virtio_transport_dec_rx_pkt() calls are balanced (i.e. virtio_vsock_sock::rx_bytes doesn't lie) after vsock_transport::read_skb(). While here, also inform the peer that we've freed up space and it has more credit. Failing to update rx_bytes after packet is dequeued leads to a warning on SOCK_STREAM recv(): [ 233.396654] rx_queue is empty, but rx_bytes is non-zero [ 233.396702] WARNING: CPU: 11 PID: 40601 at net/vmw_vsock/virtio_transport_common.c:589 The Linux kernel CVE team has assigned CVE-2024-50169 to this issue. Affected and fixed versions =========================== Issue introduced in 6.4 with commit 634f1a7110b4 and fixed in 6.6.59 with commit 66cd51de31c6 Issue introduced in 6.4 with commit 634f1a7110b4 and fixed in 6.11.6 with commit e5ca2b98090b Issue introduced in 6.4 with commit 634f1a7110b4 and fixed in 6.12-rc4 with commit 3543152f2d33 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-50169 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/66cd51de31c682a311c2fa25c580b7ea45859dd9 https://git.kernel.org/stable/c/e5ca2b98090b4bb1c393088c724af6c37812a829 https://git.kernel.org/stable/c/3543152f2d330141d9394d28855cb90b860091d2