From mboxrd@z Thu Jan 1 00:00:00 1970 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 B99CB1E766D for ; Wed, 4 Sep 2024 19:57:22 +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=1725479842; cv=none; b=V3QOu1P0NCc4yORfdbPhkVge8hcs2Ln7/Pz7WqOj5b5rNQWcI6buIB4PSgnHnT5d+CU7cRpVA2Z3H56gTkJgOwT+yKE8LSdS5nyJgDEliAiq2W2tqlmySNrfFfrJA5lZTYyyw+EYxQI6zu529GjkheAeAmTTO3DaVGi2x2JQUOM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725479842; c=relaxed/simple; bh=UGCo2vaI3E3iz0dCeGsDpVyPXZOT+GYBF/8J0dU9/JA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=bfufWKrCHYiscFH93uOzWT00cyQlAgfgE+VL/TkFW/hB4MnZarCzwUKqtG/hWNyUz9QhgwbmHNLi0zeyvmmZig4uAsP/q+CltqdwfiVAwRH6Ckj94yprX1jEGdV9LRBoN0EcnMMEc739eYkIM2jm+8XQJZ1z03kpOiAdyxbk4jE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=mCStN4Lz; 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="mCStN4Lz" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DBE68C4CEC2; Wed, 4 Sep 2024 19:57:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1725479842; bh=UGCo2vaI3E3iz0dCeGsDpVyPXZOT+GYBF/8J0dU9/JA=; h=From:To:Cc:Subject:Date:Reply-to:From; b=mCStN4Lzs5wSBivU2atdFZ5ZchTqlx8aw1ztzrW2n13TA7a7H5Aif335Ou14Zdbkp PYK06Kf1FRllzNvW+renBVokIV1AhKgeZYXoe3pGcuqHoF/SDynkuvCGXEacsvc3pn JId3uW4O+TJOZ51m7EObcbMtdD4AHkPUmhdGz9oE= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-44989: bonding: fix xfrm real_dev null pointer dereference Date: Wed, 4 Sep 2024 21:56:54 +0200 Message-ID: <2024090446-CVE-2024-44989-8a2d@gregkh> X-Mailer: git-send-email 2.46.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=5102; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=UGCo2vaI3E3iz0dCeGsDpVyPXZOT+GYBF/8J0dU9/JA=; b=owGbwMvMwCRo6H6F97bub03G02pJDGk3dtcxhZWqK+gUcvhK/GaI/P++/WJZiq+nzW3JvruT+ 0qk7k/qiGVhEGRikBVTZPmyjefo/opDil6Gtqdh5rAygQxh4OIUgInc/sowV8aHMzgid6fJyeK4 p4XbD99ZIyy3iGF+6W7FCwEvN+cuC3faIqRTscPlZtppAA== 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: bonding: fix xfrm real_dev null pointer dereference We shouldn't set real_dev to NULL because packets can be in transit and xfrm might call xdo_dev_offload_ok() in parallel. All callbacks assume real_dev is set. Example trace: kernel: BUG: unable to handle page fault for address: 0000000000001030 kernel: bond0: (slave eni0np1): making interface the new active one kernel: #PF: supervisor write access in kernel mode kernel: #PF: error_code(0x0002) - not-present page kernel: PGD 0 P4D 0 kernel: Oops: 0002 [#1] PREEMPT SMP kernel: CPU: 4 PID: 2237 Comm: ping Not tainted 6.7.7+ #12 kernel: Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-2.fc40 04/01/2014 kernel: RIP: 0010:nsim_ipsec_offload_ok+0xc/0x20 [netdevsim] kernel: bond0: (slave eni0np1): bond_ipsec_add_sa_all: failed to add SA kernel: Code: e0 0f 0b 48 83 7f 38 00 74 de 0f 0b 48 8b 47 08 48 8b 37 48 8b 78 40 e9 b2 e5 9a d7 66 90 0f 1f 44 00 00 48 8b 86 80 02 00 00 <83> 80 30 10 00 00 01 b8 01 00 00 00 c3 0f 1f 80 00 00 00 00 0f 1f kernel: bond0: (slave eni0np1): making interface the new active one kernel: RSP: 0018:ffffabde81553b98 EFLAGS: 00010246 kernel: bond0: (slave eni0np1): bond_ipsec_add_sa_all: failed to add SA kernel: kernel: RAX: 0000000000000000 RBX: ffff9eb404e74900 RCX: ffff9eb403d97c60 kernel: RDX: ffffffffc090de10 RSI: ffff9eb404e74900 RDI: ffff9eb3c5de9e00 kernel: RBP: ffff9eb3c0a42000 R08: 0000000000000010 R09: 0000000000000014 kernel: R10: 7974203030303030 R11: 3030303030303030 R12: 0000000000000000 kernel: R13: ffff9eb3c5de9e00 R14: ffffabde81553cc8 R15: ffff9eb404c53000 kernel: FS: 00007f2a77a3ad00(0000) GS:ffff9eb43bd00000(0000) knlGS:0000000000000000 kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 kernel: CR2: 0000000000001030 CR3: 00000001122ab000 CR4: 0000000000350ef0 kernel: bond0: (slave eni0np1): making interface the new active one kernel: Call Trace: kernel: kernel: ? __die+0x1f/0x60 kernel: bond0: (slave eni0np1): bond_ipsec_add_sa_all: failed to add SA kernel: ? page_fault_oops+0x142/0x4c0 kernel: ? do_user_addr_fault+0x65/0x670 kernel: ? kvm_read_and_reset_apf_flags+0x3b/0x50 kernel: bond0: (slave eni0np1): making interface the new active one kernel: ? exc_page_fault+0x7b/0x180 kernel: ? asm_exc_page_fault+0x22/0x30 kernel: ? nsim_bpf_uninit+0x50/0x50 [netdevsim] kernel: bond0: (slave eni0np1): bond_ipsec_add_sa_all: failed to add SA kernel: ? nsim_ipsec_offload_ok+0xc/0x20 [netdevsim] kernel: bond0: (slave eni0np1): making interface the new active one kernel: bond_ipsec_offload_ok+0x7b/0x90 [bonding] kernel: xfrm_output+0x61/0x3b0 kernel: bond0: (slave eni0np1): bond_ipsec_add_sa_all: failed to add SA kernel: ip_push_pending_frames+0x56/0x80 The Linux kernel CVE team has assigned CVE-2024-44989 to this issue. Affected and fixed versions =========================== Issue introduced in 5.9 with commit 18cb261afd7b and fixed in 5.10.225 with commit 21816b696c17 Issue introduced in 5.9 with commit 18cb261afd7b and fixed in 5.15.166 with commit 2f72c6a66bcd Issue introduced in 5.9 with commit 18cb261afd7b and fixed in 6.1.107 with commit 7fa9243391ad Issue introduced in 5.9 with commit 18cb261afd7b and fixed in 6.6.48 with commit 4582d4ff413a Issue introduced in 5.9 with commit 18cb261afd7b and fixed in 6.10.7 with commit 89fc1dca79db Issue introduced in 5.9 with commit 18cb261afd7b and fixed in 6.11-rc5 with commit f8cde9805981 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-44989 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/bonding/bond_main.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/21816b696c172c19d53a30d45ee005cce246ed21 https://git.kernel.org/stable/c/2f72c6a66bcd7e0187ec085237fee5db27145294 https://git.kernel.org/stable/c/7fa9243391ad2afe798ef4ea2e2851947b95754f https://git.kernel.org/stable/c/4582d4ff413a07d4ed8a4823c652dc5207760548 https://git.kernel.org/stable/c/89fc1dca79db5c3e7a2d589ecbf8a3661c65f436 https://git.kernel.org/stable/c/f8cde9805981c50d0c029063dc7d82821806fc44