CVE-2021-47288: media: ngene: Fix out-of-bounds bug in ngene_command_config_free_buf()
In the Linux kernel, the following vulnerability has been resolved:
media: ngene: Fix out-of-bounds bug in ngene_command_config_free_buf()
Fix an 11-year old bug in ngene_command_config_free_buf() while
addressing the following warnings caught with -Warray-bounds:
arch/alpha/include/asm/string.h:22:16: warning: '__builtin_memcpy' offset [12, 16] from the object at 'com' is out of the bounds of referenced subobject 'config' with type 'unsigned char' at offset 10 [-Warray-bounds]
arch/x86/include/asm/string_32.h:182:25: warning: '__builtin_memcpy' offset [12, 16] from the object at 'com' is out of the bounds of referenced subobject 'config' with type 'unsigned char' at offset 10 [-Warray-bounds]
The problem is that the original code is trying to copy 6 bytes of
data into a one-byte size member _config_ of the wrong structue
FW_CONFIGURE_BUFFERS, in a single call to memcpy(). This causes a
legitimate compiler warning because memcpy() overruns the length
of &com.cmd.ConfigureBuffers.config. It seems that the right
structure is FW_CONFIGURE_FREE_BUFFERS, instead, because it contains
6 more members apart from the header _hdr_. Also, the name of
the function ngene_command_config_free_buf() suggests that the actual
intention is to ConfigureFreeBuffers, instead of ConfigureBuffers
(which takes place in the function ngene_command_config_buf(), above).
Fix this by enclosing those 6 members of struct FW_CONFIGURE_FREE_BUFFERS
into new struct config, and use &com.cmd.ConfigureFreeBuffers.config as
the destination address, instead of &com.cmd.ConfigureBuffers.config,
when calling memcpy().
This also helps with the ongoing efforts to globally enable
-Warray-bounds and get us closer to being able to tighten the
FORTIFY_SOURCE routines on memcpy().
Security readout for executives and security teams
Plain-English summary
CVE-2021-47288 is a Linux kernel bug in the ngene media driver. A buffer-copy operation used the wrong structure field and could write beyond a one-byte member. The public record says this was fixed in stable kernel commits, but gives no CVSS score or confirmed exploitation.
Executive priority
Track this as a kernel hygiene issue unless local exposure analysis shows the ngene driver is present and reachable. There is no provided evidence of exploitation or severity scoring, so prioritize patching through normal kernel maintenance workflows.
Technical view
The flaw is in ngene_command_config_free_buf(). The original code copied six bytes into the config member of FW_CONFIGURE_BUFFERS, where the destination was too small. The fix uses FW_CONFIGURE_FREE_BUFFERS.config instead. The issue was identified through compiler array-bounds warnings and relates to memcpy/FORTIFY_SOURCE hardening.
Likely exposure
Exposure appears limited to Linux systems containing affected kernel versions and the ngene media driver code path. The source bundle does not define required hardware, privilege level, local versus remote reachability, or whether default builds load the vulnerable path.
Exploitation context
No active exploitation is cited. The CVE is not marked KEV in the provided bundle, and no source in the bundle describes public exploitation, proof-of-concept activity, or attacker preconditions.
Researcher notes
The record is specific about the coding defect and fix rationale, but incomplete for exploitability. Useful research questions are reachable call paths, required device context, whether unprivileged users can trigger the command path, and which vendor kernels backported the stable commits.
Mitigation direction
Identify Linux kernel versions across servers, appliances, and embedded systems.
Check whether kernels include the ngene media driver.
Apply vendor kernel updates containing the referenced stable fixes.
Prioritize systems where media drivers are enabled or exposed to untrusted input.
If no vendor advisory exists, follow distributor kernel guidance.
Validation and detection
Confirm deployed kernel versions against vendor fixed releases or referenced stable commits.
Inventory loaded and built kernel modules for ngene driver presence.
Review distribution advisories for backported fixes under CVE-2021-47288.
Run regression tests after kernel updates on systems using media hardware.
Document systems where the driver is absent or unreachable.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cve · low confidence lookup
CVE-2021-47288 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.