lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <2025022616-CVE-2022-49551-4fc9@gregkh>
Date: Wed, 26 Feb 2025 03:13:45 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-cve-announce@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: CVE-2022-49551: usb: isp1760: Fix out-of-bounds array access

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

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

usb: isp1760: Fix out-of-bounds array access

Running the driver through kasan gives an interesting splat:

  BUG: KASAN: global-out-of-bounds in isp1760_register+0x180/0x70c
  Read of size 20 at addr f1db2e64 by task swapper/0/1
  (...)
  isp1760_register from isp1760_plat_probe+0x1d8/0x220
  (...)

This happens because the loop reading the regmap fields for the
different ISP1760 variants look like this:

  for (i = 0; i < HC_FIELD_MAX; i++) { ... }

Meaning it expects the arrays to be at least HC_FIELD_MAX - 1 long.

However the arrays isp1760_hc_reg_fields[], isp1763_hc_reg_fields[],
isp1763_hc_volatile_ranges[] and isp1763_dc_volatile_ranges[] are
dynamically sized during compilation.

Fix this by putting an empty assignment to the [HC_FIELD_MAX]
and [DC_FIELD_MAX] array member at the end of each array.
This will make the array one member longer than it needs to be,
but avoids the risk of overwriting whatever is inside
[HC_FIELD_MAX - 1] and is simple and intuitive to read. Also
add comments explaining what is going on.

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


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

	Issue introduced in 5.14 with commit 1da9e1c06873350c99ba49a052f92de85f2c69f2 and fixed in 5.15.46 with commit bf2558bbdce3ab1d6bcba09f354914e4515d0a2b
	Issue introduced in 5.14 with commit 1da9e1c06873350c99ba49a052f92de85f2c69f2 and fixed in 5.17.14 with commit 47d39cb57e8669e507d17d9e0d067d2b3e3a87ae
	Issue introduced in 5.14 with commit 1da9e1c06873350c99ba49a052f92de85f2c69f2 and fixed in 5.18.3 with commit 463bddd3ff1acf4036ddb80c34a715eb99debf46
	Issue introduced in 5.14 with commit 1da9e1c06873350c99ba49a052f92de85f2c69f2 and fixed in 5.19 with commit 26ae2c942b5702f2e43d36b2a4389cfb7d616b6a

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-49551
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/usb/isp1760/isp1760-core.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/bf2558bbdce3ab1d6bcba09f354914e4515d0a2b
	https://git.kernel.org/stable/c/47d39cb57e8669e507d17d9e0d067d2b3e3a87ae
	https://git.kernel.org/stable/c/463bddd3ff1acf4036ddb80c34a715eb99debf46
	https://git.kernel.org/stable/c/26ae2c942b5702f2e43d36b2a4389cfb7d616b6a

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ