Subject: CVE-2022-48841: ice: fix NULL pointer dereference in ice_update_vsi_tx_ring_stats()

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

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

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

ice: fix NULL pointer dereference in ice_update_vsi_tx_ring_stats()

It is possible to do NULL pointer dereference in routine that updates
Tx ring stats. Currently only stats and bytes are updated when ring
pointer is valid, but later on ring is accessed to propagate gathered Tx
stats onto VSI stats.

Change the existing logic to move to next ring when ring is NULL.

The Linux kernel CVE team has assigned CVE-2022-48841 to this issue.

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

	Issue introduced in 5.16 with commit e72bba21355d and fixed in 5.16.17 with commit 2397270ec97c
	Issue introduced in 5.16 with commit e72bba21355d and fixed in 5.17 with commit f153546913ba

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-48841
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/intel/ice/ice_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/2397270ec97c5e3009a58ac110a25e1869e9d6ff
	https://git.kernel.org/stable/c/f153546913bada41a811722f2c6d17c3243a0333