Cloudanix VulnDB

CVE-2025-38274

None

CVSS

—

EPSS

0.2%

Published

Jul 10, 2025

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

A Linux kernel bug in FPGA test code can make the system crash if memory runs low during certain checks.

Exploitation
Local Privilege
Attacker needs
Local User
Complexity
Theoretical
Impact
Denial Of Service
Component
OS kernel
Class
Memory Corruption
Remediation
Patch
Effort
Low
Patch risk
None

What it actually does

Unchecked kunit_kzalloc failure in fpga_mgr_test_img_load_sgt passes NULL to sg_alloc_table which performs memset on it, resulting in a NULL pointer dereference.

Why it matters to the business

Kernel crash or panic possible on systems running FPGA-related kunit tests under memory pressure; limited operational impact outside development and testing environments.

How an attack unfolds

An attacker with local access forces low-memory conditions then invokes the affected kunit test path, causing the allocation to fail and the subsequent memset to dereference NULL.

How to fix it

Upgrade linux-lts (Alpaquita) to 6.1.56-r0 or apply commit e69e2cfd8b38d9463a250e153ef4963a604d61e9 from the stable git tree.

How to confirm the fix worked

Verify kernel version matches fixed release or confirm presence of KUNIT_ASSERT_NOT_ERR_OR_NULL check in fpga_mgr_test_img_load_sgt source.

Typical attack path

  1. Obtain local execution on a vulnerable kernel build with kunit enabled
  2. Trigger memory exhaustion to force kunit_kzalloc failure
  3. Invoke fpga_mgr_test_img_load_sgt via the test harness
  4. sg_alloc_table receives NULL and calls memset triggering dereference

How to detect it

Inspect kernel logs for oops or panic messages referencing fpga_mgr_test_img_load_sgt or sg_alloc_table under memory-pressure conditions.

  • fpga_mgr_test_img_load_sgt
  • kunit_kzalloc
  • sg_alloc_table
  • NULL pointer dereference

What your security team should do

  • Apply the listed kernel updates to all affected Alpaquita and stable builds
  • Disable kunit tests in production kernel configurations
  • Monitor for kernel oops involving fpga_mgr_test_img_load_sgt

The record

In the Linux kernel, the following vulnerability has been resolved: fpga: fix potential null pointer deref in fpga_mgr_test_img_load_sgt() fpga_mgr_test_img_load_sgt() allocates memory for sgt using kunit_kzalloc() however it does not check if the allocation failed. It then passes sgt to sg_alloc_table(), which passes it to __sg_alloc_table(). This function calls memset() on sgt in an attempt to zero it out. If the allocation fails then sgt will be NULL and the memset will trigger a NULL pointer dereference. Fix this by checking the allocation with KUNIT_ASSERT_NOT_ERR_OR_NULL().

Affected packages

Ecosystem Package Introduced Fixed
Debian:13 linux 0 6.12.35-1
Linux Kernel 6.6.0 6.6.94
Mageia:9 kernel 0 6.6.101-1.mga9
Mageia:9 kernel-linus 0 6.6.101-1.mga9
Mageia:9 kmod-virtualbox 0 7.1.10-7.mga9
Mageia:9 kmod-xtables-addons 0 3.24-83.mga9
Mageia:9 wireless-regdb 0 20250710-1.mga9
openSUSE:Leap 16.0 dtb-aarch64 0 6.12.0-160000.6.1
openSUSE:Leap 16.0 kernel-64kb 0 6.12.0-160000.6.1
openSUSE:Leap 16.0 kernel-default 0 6.12.0-160000.6.1
openSUSE:Leap 16.0 kernel-default-base 0 6.12.0-160000.6.1.160000.2.4
openSUSE:Leap 16.0 kernel-docs 0 6.12.0-160000.6.1
openSUSE:Leap 16.0 kernel-kvmsmall 0 6.12.0-160000.6.1
openSUSE:Leap 16.0 kernel-obs-build 0 6.12.0-160000.6.1
openSUSE:Leap 16.0 kernel-obs-qa 0 6.12.0-160000.6.1
openSUSE:Leap 16.0 kernel-rt 0 6.12.0-160000.6.1
openSUSE:Leap 16.0 kernel-source 0 6.12.0-160000.6.1
openSUSE:Leap 16.0 kernel-syms 0 6.12.0-160000.6.1
openSUSE:Leap 16.0 kernel-zfcpdump 0 6.12.0-160000.6.1

Related vulnerabilities