Subject: CVE-2023-52573: net: rds: Fix possible NULL-pointer dereference

From: Greg Kroah-Hartman <[email-masked]>

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

net: rds: Fix possible NULL-pointer dereference

In rds_rdma_cm_event_handler_cmn() check, if conn pointer exists
before dereferencing it as rdma_set_service_type() argument

Found by Linux Verification Center (linuxtesting.org) with SVACE.

The Linux kernel CVE team has assigned CVE-2023-52573 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 5.1 with commit fd261ce6a30e and fixed in 5.4.258 with commit 812da2a08dc5
	Issue introduced in 5.1 with commit fd261ce6a30e and fixed in 5.10.198 with commit f515112e8337
	Issue introduced in 5.1 with commit fd261ce6a30e and fixed in 5.15.134 with commit ea82139e6e35
	Issue introduced in 5.1 with commit fd261ce6a30e and fixed in 6.1.56 with commit 51fa66024a5e
	Issue introduced in 5.1 with commit fd261ce6a30e and fixed in 6.5.6 with commit 069ac51c37a6
	Issue introduced in 5.1 with commit fd261ce6a30e and fixed in 6.6 with commit f1d95df0f310

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-52573
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/rds/rdma_transport.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/812da2a08dc5cc75fb71e29083ea20904510ac7a
	https://git.kernel.org/stable/c/f515112e833791001aaa8ab886af3ca78503617f
	https://git.kernel.org/stable/c/ea82139e6e3561100d38d14401d57c0ea93fc07e
	https://git.kernel.org/stable/c/51fa66024a5eabf270164f2dc82a48ffb35a12e9
	https://git.kernel.org/stable/c/069ac51c37a6f07a51f7134d8c34289075786a35
	https://git.kernel.org/stable/c/f1d95df0f31048f1c59092648997686e3f7d9478