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 6D463481D1 for ; Fri, 3 May 2024 17:46:25 +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=1714758385; cv=none; b=RnbYMOr8XU1twEKFsf3thZMXWm5xI9MfkgRAY9j+7eBkQoUAnhc8RaadmjvCB3+MmvfBYAnXmefS1OGMzKgmfvCX/BMGu1r5dcshzy8qX1Ger1nXtGnoh8H9WapkqWsMbfHethey8HRTT8QRKATl6lVgLNX0HNib4Qauy3RP34s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714758385; c=relaxed/simple; bh=d9yzDaiRlvnzpk2nmMTuDN/Yj0zgCiktC1TJwQY6Mjc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=RDuBQpuWxqKxK2jOZvprrvTUNlqkupKtQqwgqXZ4W6SDA/ZYP3XK8KjSw5lD/rVlqHtQRYEkkBVK2xgJv66NlvHSwkgoUhivDkrw/J3sq+22YJOgG6tiHnheVwVoxKWUxPxolgPw+QvHYGKuaKwC3AkGgcNN1/V/0mIOD5i800E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=NaSDn/4r; 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="NaSDn/4r" Received: by smtp.kernel.org (Postfix) with ESMTPSA id EC92FC116B1; Fri, 3 May 2024 17:46:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1714758385; bh=d9yzDaiRlvnzpk2nmMTuDN/Yj0zgCiktC1TJwQY6Mjc=; h=From:To:Cc:Subject:Date:Reply-to:From; b=NaSDn/4r449QXzm09BvVRVDIqqDVreSIH+KbCkncPLQ3wNbQEHa0t7euTSnQeMvnP YHa9z8ujey7Ezd9jBQiz1aYJ9nA3zsZvaNc7s53XVCTCHUFwkOZFLiFlXbUmgrWJcZ yTAcw82XpW5pQLEEt6Moj4IusxTzh79NFMIqWbMA= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-48692: RDMA/srp: Set scmnd->result only when scmnd is not NULL Date: Fri, 3 May 2024 19:45:48 +0200 Message-ID: <2024050346-CVE-2022-48692-6bc3@gregkh> X-Mailer: git-send-email 2.45.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=3412; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=d9yzDaiRlvnzpk2nmMTuDN/Yj0zgCiktC1TJwQY6Mjc=; b=owGbwMvMwCRo6H6F97bub03G02pJDGmmSqe3V27bJPVH80Hlp3Vb7WxYW1omWC/4orH6q2hO+ o33MoZxHbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjCR01MZFlwz6DA3vnWKXTRp iblowAe+vUvDjjDMj0vV9pnyK35fYPy/G7Jml3a9lGiVBQA= 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: RDMA/srp: Set scmnd->result only when scmnd is not NULL This change fixes the following kernel NULL pointer dereference which is reproduced by blktests srp/007 occasionally. BUG: kernel NULL pointer dereference, address: 0000000000000170 PGD 0 P4D 0 Oops: 0002 [#1] PREEMPT SMP NOPTI CPU: 0 PID: 9 Comm: kworker/0:1H Kdump: loaded Not tainted 6.0.0-rc1+ #37 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.15.0-29-g6a62e0cb0dfe-prebuilt.qemu.org 04/01/2014 Workqueue: 0x0 (kblockd) RIP: 0010:srp_recv_done+0x176/0x500 [ib_srp] Code: 00 4d 85 ff 0f 84 52 02 00 00 48 c7 82 80 02 00 00 00 00 00 00 4c 89 df 4c 89 14 24 e8 53 d3 4a f6 4c 8b 14 24 41 0f b6 42 13 <41> 89 87 70 01 00 00 41 0f b6 52 12 f6 c2 02 74 44 41 8b 42 1c b9 RSP: 0018:ffffaef7c0003e28 EFLAGS: 00000282 RAX: 0000000000000000 RBX: ffff9bc9486dea60 RCX: 0000000000000000 RDX: 0000000000000102 RSI: ffffffffb76bbd0e RDI: 00000000ffffffff RBP: ffff9bc980099a00 R08: 0000000000000001 R09: 0000000000000001 R10: ffff9bca53ef0000 R11: ffff9bc980099a10 R12: ffff9bc956e14000 R13: ffff9bc9836b9cb0 R14: ffff9bc9557b4480 R15: 0000000000000000 FS: 0000000000000000(0000) GS:ffff9bc97ec00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000170 CR3: 0000000007e04000 CR4: 00000000000006f0 Call Trace: __ib_process_cq+0xb7/0x280 [ib_core] ib_poll_handler+0x2b/0x130 [ib_core] irq_poll_softirq+0x93/0x150 __do_softirq+0xee/0x4b8 irq_exit_rcu+0xf7/0x130 sysvec_apic_timer_interrupt+0x8e/0xc0 The Linux kernel CVE team has assigned CVE-2022-48692 to this issue. Affected and fixed versions =========================== Issue introduced in 5.14 with commit ad215aaea4f9 and fixed in 5.15.68 with commit a8edd49c94b4 Issue introduced in 5.14 with commit ad215aaea4f9 and fixed in 5.19.9 with commit f2c70f56f762 Issue introduced in 5.14 with commit ad215aaea4f9 and fixed in 6.0 with commit 12f35199a2c0 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-48692 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/srp/ib_srp.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/f022576aa03c2385ea7f2b27ee5b331e43abf624 https://git.kernel.org/stable/c/a8edd49c94b4b08019ed7d6dd794fca8078a4deb https://git.kernel.org/stable/c/f2c70f56f762e5dc3b0d7dc438fbb137cb116413 https://git.kernel.org/stable/c/12f35199a2c0551187edbf8eb01379f0598659fa