Skip to content

In the Linux kernel, the following vulnerability has been...

High severity Unreviewed Published Aug 19, 2025 to the GitHub Advisory Database • Updated Nov 26, 2025

Package

No package listedSuggest a package

Affected versions

Unknown

Patched versions

Unknown

Description

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

staging: media: atomisp: Fix stack buffer overflow in gmin_get_var_int()

When gmin_get_config_var() calls efi.get_variable() and the EFI variable
is larger than the expected buffer size, two behaviors combine to create
a stack buffer overflow:

  1. gmin_get_config_var() does not return the proper error code when
    efi.get_variable() fails. It returns the stale 'ret' value from
    earlier operations instead of indicating the EFI failure.

  2. When efi.get_variable() returns EFI_BUFFER_TOO_SMALL, it updates
    *out_len to the required buffer size but writes no data to the output
    buffer. However, due to bug #1, gmin_get_var_int() believes the call
    succeeded.

The caller gmin_get_var_int() then performs:

  • Allocates val[CFG_VAR_NAME_MAX + 1] (65 bytes) on stack
  • Calls gmin_get_config_var(dev, is_gmin, var, val, &len) with len=64
  • If EFI variable is >64 bytes, efi.get_variable() sets len=required_size
  • Due to bug #1, thinks call succeeded with len=required_size
  • Executes val[len] = 0, writing past end of 65-byte stack buffer

This creates a stack buffer overflow when EFI variables are larger than
64 bytes. Since EFI variables can be controlled by firmware or system
configuration, this could potentially be exploited for code execution.

Fix the bug by returning proper error codes from gmin_get_config_var()
based on EFI status instead of stale 'ret' value.

The gmin_get_var_int() function is called during device initialization
for camera sensor configuration on Intel Bay Trail and Cherry Trail
platforms using the atomisp camera stack.

References

Published by the National Vulnerability Database Aug 19, 2025
Published to the GitHub Advisory Database Aug 19, 2025
Last updated Nov 26, 2025

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Local
Attack complexity
Low
Privileges required
Low
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

EPSS score

Exploit Prediction Scoring System (EPSS)

This score estimates the probability of this vulnerability being exploited within the next 30 days. Data provided by FIRST.
(4th percentile)

Weaknesses

Out-of-bounds Write

The product writes data past the end, or before the beginning, of the intended buffer. Learn more on MITRE.

CVE ID

CVE-2025-38585

GHSA ID

GHSA-44rm-frxc-c6v7

Source code

No known source code

Dependabot alerts are not supported on this advisory because it does not have a package from a supported ecosystem with an affected and fixed version.

Learn more about GitHub language support

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.