CVE Database›CVE-2022-49819

CVE-2022-49819

kernel: octeon_ep: fix potential memory leak in octep_device_setup()

Loading…

Severity

Moderate

Red Hat Product Security

5.5

CVSS 3.1

Review impact separately from score.

Published · May 1, 2025

Updated · June 30, 2026

Description

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

octeon_ep: fix potential memory leak in octep_device_setup()

When occur unsupported_dev and mbox init errors, it did not free oct->conf and iounmap() oct->mmio[i].hw_addr. That would trigger memory leak problem. Add kfree() for oct->conf and iounmap() for oct->mmio[i].hw_addr under unsupported_dev and mbox init errors to fix the problem.

Statement

The patch fixes a memory leak in the octep_device_setup() function of the octeon_ep Ethernet driver. On error paths (such as unsupported_dev or mailbox initialization failure), previously allocated memory (oct->conf) and memory-mapped I/O (oct->mmio[i].hw_addr) were not released, leading to a resource leak. The patch adds cleanup using kfree() and iounmap() in those paths.

CVSS score applicability

The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.

Mitigation

No mitigation is specified in collected source.

CVSS / CWE

CVSS 3.1 · 5.5
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

CWE not specified