Double Free Vulnerability in ocxl

Kernel Updated 02 Oct 2025

Summary

28/06/2022
N/A
No i
Unrated
Not published

GSD-2022-1003739: misc: ocxl: fix possible double free in ocxl_file_register_afu. Affects Kernel versions >= 75ca758adbafc81804c39b2c200ecdc819a6c042, < de65c32ace9aa70d51facc61ba986607075e3a25. 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 Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The ocxl package is a component of the Linux Kernel that provides support for Open Coherent Accelerator Processor Interface (OpenCAPI) devices. OpenCAPI is a high-performance bus interface that allows accelerators, such as Field Programmable Gate Arrays (FPGAs), to be connected to the CPU. The ocxl_file_register_afu function in ocxl allows users to register an Accelerator Function Unit (AFU) with the kernel. This function is vulnerable to a double free issue, which can lead to memory corruption and potentially allow an attacker to execute arbitrary code.

Vulnerability Detail

The double free vulnerability in ocxl_file_register_afu occurs when the function is called multiple times with the same file descriptor. This can result in the same memory being freed twice, leading to memory corruption. An attacker who can trigger this vulnerability may be able to exploit it to execute arbitrary code with kernel privileges. The vulnerability was introduced in version v5.2 of the Linux Kernel and has been fixed in version v5.4.198.

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

There is no known workaround for this vulnerability. It is recommended to update the Linux Kernel to the fixed version as soon as possible.

Conclusion

The double free vulnerability in ocxl_file_register_afu can lead to memory corruption and potential code execution with kernel privileges. Users should update their Linux Kernel to version v5.4.198 or later to mitigate this vulnerability. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for Kernel →

Share this vulnerability

FAQ

ocxl is a component of the Linux Kernel that provides support for Open Coherent Accelerator Processor Interface (OpenCAPI) devices. It allows accelerators, such as FPGAs, to be connected to the CPU.

ocxl_file_register_afu is a function in ocxl that allows users to register an Accelerator Function Unit (AFU) with the kernel. This function is vulnerable to a double free issue.

A double free vulnerability occurs when the same memory is freed twice, leading to memory corruption. This can potentially be exploited by an attacker to execute arbitrary code.

To fix this vulnerability, update your Linux Kernel to version v5.4.198 or later. Download the latest stable version from the official repository and follow the installation instructions.

There is no known workaround for this vulnerability. It is recommended to update the Linux Kernel to the fixed version.

Related vulnerabilities

Recent vulnerabilities recorded for Kernel.

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