Skip to contentSkip to conversation

CVE-2022-49289: uaccess: fix integer overflow on access_ok()

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Feb 26, 2025

lore
Share & tools
lore
#0 lore raw

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

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

uaccess: fix integer overflow on access_ok()

Three architectures check the end of a user access against the address limit without taking a possible overflow into account. Passing a negative length or another overflow in here returns success when it should not.

Use the most common correct implementation here, which optimizes for a constant 'size' argument, and turns the common case into a single comparison.

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

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

	Issue introduced in 3.2 with commit 7567746e1c0d66ac0ef8a9d8816ca694462c7370 and fixed in 5.15.32 with commit e65d28d4e9bf90a35ba79c06661a572a38391dec
	Issue introduced in 3.2 with commit 7567746e1c0d66ac0ef8a9d8816ca694462c7370 and fixed in 5.16.18 with commit 99801e2f457824955da4aadaa035913a6dede03a
	Issue introduced in 3.2 with commit 7567746e1c0d66ac0ef8a9d8816ca694462c7370 and fixed in 5.17.1 with commit a1ad747fc1a0e06d1bf26b996ee8a56b5c8d02d8
	Issue introduced in 3.2 with commit 7567746e1c0d66ac0ef8a9d8816ca694462c7370 and fixed in 5.18 with commit 222ca305c9fd39e5ed8104da25c09b2b79a516a8

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-49289

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:
arch/csky/include/asm/uaccess.h
arch/hexagon/include/asm/uaccess.h
arch/microblaze/include/asm/uaccess.h

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/e65d28d4e9bf90a35ba79c06661a572a38391dec
	https://git.kernel.org/stable/c/99801e2f457824955da4aadaa035913a6dede03a
	https://git.kernel.org/stable/c/a1ad747fc1a0e06d1bf26b996ee8a56b5c8d02d8
	https://git.kernel.org/stable/c/222ca305c9fd39e5ed8104da25c09b2b79a516a8