Subject: CVE-2023-52658: Revert "net/mlx5: Block entering switchdev mode with ns inconsistency"

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

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

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

Revert "net/mlx5: Block entering switchdev mode with ns inconsistency"

This reverts commit 662404b24a4c4d839839ed25e3097571f5938b9b.
The revert is required due to the suspicion it is not good for anything
and cause crash.

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

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

	Issue introduced in 6.3 with commit 662404b24a4c and fixed in 6.6.22 with commit 3fba8eab2cfc
	Issue introduced in 6.3 with commit 662404b24a4c and fixed in 6.7.10 with commit 1bcdd66d33ed
	Issue introduced in 6.3 with commit 662404b24a4c and fixed in 6.8 with commit 8deeefb24786
	Issue introduced in 6.1.22 with commit 93260bd809e0
	Issue introduced in 6.2.9 with commit 882b988a3897

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-52658
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/ethernet/mellanox/mlx5/core/eswitch_offloads.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/3fba8eab2cfc7334e0f132d29dfd2552f2f2a579
	https://git.kernel.org/stable/c/1bcdd66d33edb446903132456c948f0b764ef2f9
	https://git.kernel.org/stable/c/8deeefb24786ea7950b37bde4516b286c877db00