Subject: CVE-2022-48938: CDC-NCM: avoid overflow in sanity checking

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

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

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

CDC-NCM: avoid overflow in sanity checking

A broken device may give an extreme offset like 0xFFF0
and a reasonable length for a fragment. In the sanity
check as formulated now, this will create an integer
overflow, defeating the sanity check. Both offset
and offset + len need to be checked in such a manner
that no overflow can occur.
And those quantities should be unsigned.

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

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

	Fixed in 5.10.103 with commit 69560efa0013
	Fixed in 5.15.26 with commit 49909c9f8458
	Fixed in 5.16.12 with commit 7b737e47b875
	Fixed in 5.17 with commit 8d2b1a1ec9f5

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-48938
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/usb/cdc_ncm.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/69560efa001397ebb8dc1c3e6a3ce00302bb9f7f
	https://git.kernel.org/stable/c/49909c9f8458cacb5b241106cba65aba5a6d8f4c
	https://git.kernel.org/stable/c/7b737e47b87589031f0d4657f6d7b0b770474925
	https://git.kernel.org/stable/c/8d2b1a1ec9f559d30b724877da4ce592edc41fdc