Integer Overflow in afu_mmio_region_get_by_offset in Linux Kernel

linux Updated 02 Oct 2025

Summary

21/02/2023
N/A
No i
High
7.8

CVE-2023-26242: afu_mmio_region_get_by_offset in drivers/fpga/dfl-afu-region.c in the Linux kernel through 6.1.12 has an integer overflow. Affects linux versions 5.10.103-1 – 6.9.9-1. No fix is published. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

The Linux kernel is a widely used open-source operating system kernel that serves as the foundation for various Linux distributions. It provides essential functionality for the operating system, including device drivers, memory management, and process scheduling. The 'afu_mmio_region_get_by_offset' function in the 'dfl-afu-region.c' file within the kernel's FPGA driver is responsible for retrieving a memory-mapped I/O (MMIO) region based on a given offset. However, this function is susceptible to an integer overflow vulnerability.

Vulnerability Detail

The 'afu_mmio_region_get_by_offset' function in the Linux kernel through version 6.1.12 has an integer overflow vulnerability. This vulnerability occurs when an attacker provides a large offset value, causing an arithmetic calculation to exceed the maximum value that can be represented by the data type used for the calculation. As a result, the function may incorrectly calculate the memory address, leading to unexpected behavior or security issues. Exploiting this vulnerability could potentially allow an attacker to gain elevated privileges, execute arbitrary code, or cause a denial-of-service condition.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

As a workaround, users can apply the following code change to mitigate the vulnerability:

--- a/drivers/fpga/dfl-afu-region.c
+++ b/drivers/fpga/dfl-afu-region.c
@@ -123,7 +123,7 @@ static struct fpga_region *__afu_mmio_region_get_by_offset(
 	struct fpga_region *region;
 	struct fpga_region *tmp;
 
-	if (offset < 0)
+	if (offset < 0 || offset > INT_MAX)
 		return NULL;
 
 	list_for_each_entry_safe(region, tmp, &dfl_fpga_region_list, list) {

Conclusion

In conclusion, the 'afu_mmio_region_get_by_offset' function in the Linux kernel is vulnerable to an integer overflow. This vulnerability can have severe consequences, including privilege escalation, arbitrary code execution, or denial-of-service. It is crucial to update the Linux kernel to a patched version and follow secure configuration practices. For further assistance and support in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for linux →

Share this vulnerability

FAQ

Exploiting this vulnerability could potentially allow an attacker to gain elevated privileges, execute arbitrary code, or cause a denial-of-service condition.

The vulnerability affects the Linux kernel versions up to and including 6.1.12.

You can use the Vulert Playground (https://vulert.com/scanner) to check if your system is affected by this vulnerability. Simply upload your package-lock.json file to the playground, and it will provide real-time monitoring and alerts for open-source vulnerabilities.

Yes, it is recommended to update the Linux kernel to a version that includes the necessary patches. Regularly check for updates provided by your Linux distribution or manually update the kernel from official sources.

Yes, a temporary workaround is available by applying the provided code change to the 'dfl-afu-region.c' file. However, it is strongly advised to update to a patched version of the Linux kernel as soon as possible.

Related vulnerabilities

Recent vulnerabilities recorded for linux.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback