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 06C0B75810 for ; Tue, 21 May 2024 15:25:41 +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=1716305141; cv=none; b=SFVTKSQhXh6pq71PywWicPewYQr76S5V2uRZsLhrwMpolW5HHUgXkWz/B/LuWbBX5G/DbijpL8UnKYOgGLMsO+IqG08pNSvwseD72ult1DVRVGvpOgH67bUvwx+yAP72QGFzcxNSDHFlwDTwdhktfmXQOmQosjtcIFyiUk4vf9M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716305141; c=relaxed/simple; bh=D+II1PIr2bfDhJ0i6MwCSySfjBCoEN+1SG3292ok+A0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=SBstTWOCdkWNEFtE74yYt1OjpUPJQzZRoGnF20e775UuXIaNNGUvAOlz/QTu7gjpndbU4jI7adGkJu6M4Zm66auWPQzfXmV+xKpW89vRLQjJnfOCDtA1wd0RZLHh1VM/QeQBDu6u+ZGpvBuNYe+5iepG2e60m2Ss41vtBi8Bgr4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=qnvwRwPN; 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="qnvwRwPN" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 862BCC2BD11; Tue, 21 May 2024 15:25:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1716305140; bh=D+II1PIr2bfDhJ0i6MwCSySfjBCoEN+1SG3292ok+A0=; h=From:To:Cc:Subject:Date:Reply-to:From; b=qnvwRwPNIM2IiddikE8cZLXvzW1Mx2dglsuye2p5tQWQxkPv80VKPl2J9AeywUh16 7VZCltiBuPNmGC41G4QoYjPyeEIOVzM+dRvKb5kBE4WvqGX6FkBBJDzuwmed5oFb1n skUz+NS4m2KX0KQljWHTLrvaL6rqmPttmlwPpIgQ= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-52745: IB/IPoIB: Fix legacy IPoIB due to wrong number of queues Date: Tue, 21 May 2024 17:23:22 +0200 Message-ID: <2024052103-CVE-2023-52745-3727@gregkh> X-Mailer: git-send-email 2.45.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=5170; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=D+II1PIr2bfDhJ0i6MwCSySfjBCoEN+1SG3292ok+A0=; b=owGbwMvMwCRo6H6F97bub03G02pJDGk+e8LvrF1Xq2rOy3rYO/vAmYwHOwq+WPzsMH74r7v/c yAP/9PqjlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZhIUSfDfGeGtjztO3sCnp4O XfpS/t96RYPt0xkWrJOpWHnUIOBKqdS1b/Pv8BTZz0pcBwA= 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: IB/IPoIB: Fix legacy IPoIB due to wrong number of queues The cited commit creates child PKEY interfaces over netlink will multiple tx and rx queues, but some devices doesn't support more than 1 tx and 1 rx queues. This causes to a crash when traffic is sent over the PKEY interface due to the parent having a single queue but the child having multiple queues. This patch fixes the number of queues to 1 for legacy IPoIB at the earliest possible point in time. BUG: kernel NULL pointer dereference, address: 000000000000036b PGD 0 P4D 0 Oops: 0000 [#1] SMP CPU: 4 PID: 209665 Comm: python3 Not tainted 6.1.0_for_upstream_min_debug_2022_12_12_17_02 #1 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 RIP: 0010:kmem_cache_alloc+0xcb/0x450 Code: ce 7e 49 8b 50 08 49 83 78 10 00 4d 8b 28 0f 84 cb 02 00 00 4d 85 ed 0f 84 c2 02 00 00 41 8b 44 24 28 48 8d 4a 01 49 8b 3c 24 <49> 8b 5c 05 00 4c 89 e8 65 48 0f c7 0f 0f 94 c0 84 c0 74 b8 41 8b RSP: 0018:ffff88822acbbab8 EFLAGS: 00010202 RAX: 0000000000000070 RBX: ffff8881c28e3e00 RCX: 00000000064f8dae RDX: 00000000064f8dad RSI: 0000000000000a20 RDI: 0000000000030d00 RBP: 0000000000000a20 R08: ffff8882f5d30d00 R09: ffff888104032f40 R10: ffff88810fade828 R11: 736f6d6570736575 R12: ffff88810081c000 R13: 00000000000002fb R14: ffffffff817fc865 R15: 0000000000000000 FS: 00007f9324ff9700(0000) GS:ffff8882f5d00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000000000036b CR3: 00000001125af004 CR4: 0000000000370ea0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: skb_clone+0x55/0xd0 ip6_finish_output2+0x3fe/0x690 ip6_finish_output+0xfa/0x310 ip6_send_skb+0x1e/0x60 udp_v6_send_skb+0x1e5/0x420 udpv6_sendmsg+0xb3c/0xe60 ? ip_mc_finish_output+0x180/0x180 ? __switch_to_asm+0x3a/0x60 ? __switch_to_asm+0x34/0x60 sock_sendmsg+0x33/0x40 __sys_sendto+0x103/0x160 ? _copy_to_user+0x21/0x30 ? kvm_clock_get_cycles+0xd/0x10 ? ktime_get_ts64+0x49/0xe0 __x64_sys_sendto+0x25/0x30 do_syscall_64+0x3d/0x90 entry_SYSCALL_64_after_hwframe+0x46/0xb0 RIP: 0033:0x7f9374f1ed14 Code: 42 41 f8 ff 44 8b 4c 24 2c 4c 8b 44 24 20 89 c5 44 8b 54 24 28 48 8b 54 24 18 b8 2c 00 00 00 48 8b 74 24 10 8b 7c 24 08 0f 05 <48> 3d 00 f0 ff ff 77 34 89 ef 48 89 44 24 08 e8 68 41 f8 ff 48 8b RSP: 002b:00007f9324ff7bd0 EFLAGS: 00000293 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 00007f9324ff7cc8 RCX: 00007f9374f1ed14 RDX: 00000000000002fb RSI: 00007f93000052f0 RDI: 0000000000000030 RBP: 0000000000000000 R08: 00007f9324ff7d40 R09: 000000000000001c R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000000 R13: 000000012a05f200 R14: 0000000000000001 R15: 00007f9374d57bdc The Linux kernel CVE team has assigned CVE-2023-52745 to this issue. Affected and fixed versions =========================== Issue introduced in 5.4.229 with commit d4bf3fcccd18 and fixed in 5.4.232 with commit 4a779187db39 Issue introduced in 5.10.163 with commit d21714134505 and fixed in 5.10.168 with commit b1afb666c329 Issue introduced in 5.15.86 with commit ca48174a7643 and fixed in 5.15.94 with commit 1b4ef90cbcfa Issue introduced in 6.1.2 with commit ee0e9b2c4b9c and fixed in 6.1.12 with commit 7197460dcd43 Issue introduced in 4.9.337 with commit 2aecfec735f1 Issue introduced in 4.14.303 with commit 8fa3ee8ef185 Issue introduced in 4.19.270 with commit bc2f5760b47c Issue introduced in 6.0.16 with commit bab775fa9c4f 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-2023-52745 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/infiniband/ulp/ipoib/ipoib_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/4a779187db39b2f32d048a752573e56e4e77807f https://git.kernel.org/stable/c/b1afb666c32931667c15ad1b58e7203f0119dcaf https://git.kernel.org/stable/c/1b4ef90cbcfa603b3bb536fbd6f261197012b6f6 https://git.kernel.org/stable/c/7197460dcd43ff0e4a502ba855dd82d37c2848cc https://git.kernel.org/stable/c/e632291a2dbce45a24cddeb5fe28fe71d724ba43