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 E4C9021ADD1 for ; Wed, 26 Feb 2025 02:24:46 +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=1740536687; cv=none; b=k8qhP3vzA92xEhiIBnhxBc3n1EbCn6NVsZ1rGtKkVHw5V0UxdLdUHQmrP+/UbSgHngaykvdveT7F1Ao9U/YdSNHqxLpRqRSrGmM10XF3Mrypu/kyOwvp3reBLYf1ZKBOzMD9uXvYTBdkFZDFLr8COhUA2z8mxjFDlHDQ3zuXgZo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740536687; c=relaxed/simple; bh=TIc/MkPtr8joezQMwG8WXlhky0/C9RqfRhej4F9Ygwo=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=fCgwt77QNjmqImluuxykbrglnN/8uw4UZhj3zWN/zTxC5iQAyktZr0M8IwUZPyM4eEjtni7pTY55j6kVS9EqnmyKfTM6OOfNMZF8wZFdRyHk97Mg+oJZ8kXIU+mLUQ+XoAN11AlZTJtNDq9XqjqSOU6qjhf/tYSHUY1awVI7nRY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=2XpBYKHe; 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="2XpBYKHe" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BC472C4CEE6; Wed, 26 Feb 2025 02:24:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1740536686; bh=TIc/MkPtr8joezQMwG8WXlhky0/C9RqfRhej4F9Ygwo=; h=From:To:Cc:Subject:Date:Reply-to:From; b=2XpBYKHedI3QomLqNeiAZA0QHc8yEP0X+Vm6k8PVdLIOhV1367S7m0bcTQFjRKIth YFFNnhzUj789LHklk8P1nJsUuY6KepmvCCE37xIn0YCk2uSY3izcUgUZyVeS3c4nlN yHRV9FY6TeRi1cOJUwk0XF1voi3OrfqoXyXOLzd0= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-49649: xen/netback: avoid entering xenvif_rx_next_skb() with an empty rx queue Date: Wed, 26 Feb 2025 03:23:32 +0100 Message-ID: <2025022620-CVE-2022-49649-7285@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=4873; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=TIc/MkPtr8joezQMwG8WXlhky0/C9RqfRhej4F9Ygwo=; b=owGbwMvMwCRo6H6F97bub03G02pJDOn7qu7Y79JiXju16di1tzbsd3VDwr+eKI7YvfGoeqvny gVV6yfs64hlYRBkYpAVU2T5so3n6P6KQ4pehranYeawMoEMYeDiFICJnJ/KME+rdLJtTnrh3HMW v/ZmvLOfnCN92JthwRb2y+1ObsmrNmn+XPdqv+yP7hNz9wMA 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: xen/netback: avoid entering xenvif_rx_next_skb() with an empty rx queue xenvif_rx_next_skb() is expecting the rx queue not being empty, but in case the loop in xenvif_rx_action() is doing multiple iterations, the availability of another skb in the rx queue is not being checked. This can lead to crashes: [40072.537261] BUG: unable to handle kernel NULL pointer dereference at 0000000000000080 [40072.537407] IP: xenvif_rx_skb+0x23/0x590 [xen_netback] [40072.537534] PGD 0 P4D 0 [40072.537644] Oops: 0000 [#1] SMP NOPTI [40072.537749] CPU: 0 PID: 12505 Comm: v1-c40247-q2-gu Not tainted 4.12.14-122.121-default #1 SLE12-SP5 [40072.537867] Hardware name: HP ProLiant DL580 Gen9/ProLiant DL580 Gen9, BIOS U17 11/23/2021 [40072.537999] task: ffff880433b38100 task.stack: ffffc90043d40000 [40072.538112] RIP: e030:xenvif_rx_skb+0x23/0x590 [xen_netback] [40072.538217] RSP: e02b:ffffc90043d43de0 EFLAGS: 00010246 [40072.538319] RAX: 0000000000000000 RBX: ffffc90043cd7cd0 RCX: 00000000000000f7 [40072.538430] RDX: 0000000000000000 RSI: 0000000000000006 RDI: ffffc90043d43df8 [40072.538531] RBP: 000000000000003f R08: 000077ff80000000 R09: 0000000000000008 [40072.538644] R10: 0000000000007ff0 R11: 00000000000008f6 R12: ffffc90043ce2708 [40072.538745] R13: 0000000000000000 R14: ffffc90043d43ed0 R15: ffff88043ea748c0 [40072.538861] FS: 0000000000000000(0000) GS:ffff880484600000(0000) knlGS:0000000000000000 [40072.538988] CS: e033 DS: 0000 ES: 0000 CR0: 0000000080050033 [40072.539088] CR2: 0000000000000080 CR3: 0000000407ac8000 CR4: 0000000000040660 [40072.539211] Call Trace: [40072.539319] xenvif_rx_action+0x71/0x90 [xen_netback] [40072.539429] xenvif_kthread_guest_rx+0x14a/0x29c [xen_netback] Fix that by stopping the loop in case the rx queue becomes empty. The Linux kernel CVE team has assigned CVE-2022-49649 to this issue. Affected and fixed versions =========================== Issue introduced in 4.9 with commit 98f6d57ced73b723551568262019f1d6c8771f20 and fixed in 4.9.324 with commit c0fcceb5f3f1ec197c014fe218c2f28108cacd27 Issue introduced in 4.9 with commit 98f6d57ced73b723551568262019f1d6c8771f20 and fixed in 4.14.289 with commit d5320c6a27aa975aff740f9cb481dcbde48f4348 Issue introduced in 4.9 with commit 98f6d57ced73b723551568262019f1d6c8771f20 and fixed in 4.19.253 with commit 5a071aefd6414af5a20321ab58a0557b81993687 Issue introduced in 4.9 with commit 98f6d57ced73b723551568262019f1d6c8771f20 and fixed in 5.4.207 with commit 7425479d20f9e96f7c3ec8e8a93fe0d7478724cb Issue introduced in 4.9 with commit 98f6d57ced73b723551568262019f1d6c8771f20 and fixed in 5.10.132 with commit b9c32a6886af79d6e0ad87a7b01800ed079cdd02 Issue introduced in 4.9 with commit 98f6d57ced73b723551568262019f1d6c8771f20 and fixed in 5.15.56 with commit b99174ac57fe5d8867448c03b23828e63f24cb1c Issue introduced in 4.9 with commit 98f6d57ced73b723551568262019f1d6c8771f20 and fixed in 5.18.13 with commit f0b5c819b062df8bf5f2acf4697e3871cb3722da Issue introduced in 4.9 with commit 98f6d57ced73b723551568262019f1d6c8771f20 and fixed in 5.19 with commit 94e8100678889ab428e68acadf042de723f094b9 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-49649 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/net/xen-netback/rx.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/c0fcceb5f3f1ec197c014fe218c2f28108cacd27 https://git.kernel.org/stable/c/d5320c6a27aa975aff740f9cb481dcbde48f4348 https://git.kernel.org/stable/c/5a071aefd6414af5a20321ab58a0557b81993687 https://git.kernel.org/stable/c/7425479d20f9e96f7c3ec8e8a93fe0d7478724cb https://git.kernel.org/stable/c/b9c32a6886af79d6e0ad87a7b01800ed079cdd02 https://git.kernel.org/stable/c/b99174ac57fe5d8867448c03b23828e63f24cb1c https://git.kernel.org/stable/c/f0b5c819b062df8bf5f2acf4697e3871cb3722da https://git.kernel.org/stable/c/94e8100678889ab428e68acadf042de723f094b9