CVE-2021-47497
Linux Kernel vulnerability analysis and mitigation

Overview

CVE-2021-47497 affects the Linux kernel's NVMEM (Non-Volatile Memory) subsystem. The vulnerability involves a shift-out-of-bounds condition that occurs when a cell has 'nbits' equal to a multiple of BITS_PER_BYTE, leading to undefined behavior in the nvmem_shift_read_buffer_in_place function (Kernel Git).

Technical details

The vulnerability occurs in drivers/nvmem/core.c where the logic '*p &= GENMASK((cell->nbits%BITS_PER_BYTE) - 1, 0)' becomes undefined behavior. This happens because when nbits modulo BITS_PER_BYTE is 0, subtracting 1 creates a large number that is then shifted more than the number of bits that fit into an unsigned long. The issue was detected by UBSAN (Undefined Behavior Sanitizer) which reported a shift-out-of-bounds error with shift exponent 64 being too large for a 64-bit type unsigned long (NVD).

Impact

The vulnerability could lead to undefined behavior in the Linux kernel's NVMEM subsystem when reading memory cells with specific bit configurations. This primarily affects systems using NVMEM drivers for accessing non-volatile memory (Ubuntu Security).

Exploitability

The vulnerability was discovered during system testing with UBSAN enabled. It requires specific conditions where a memory cell's nbits value is a multiple of BITS_PER_BYTE. The issue was triggered in a test environment on Google Lazor hardware during component initialization (Kernel Git).

Mitigation and workarounds

The issue has been fixed by adding a condition to check if there are any bits to mask out before performing the operation. The fix involves adding an if statement to verify cell->nbits % BITS_PER_BYTE before applying the GENMASK operation. The patch has been integrated into various Linux kernel versions and distributions (Kernel Git).

Additional resources


SourceThis report was generated using AI

Related Linux Kernel vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-74730CRITICAL9.8
  • Linux Kernel logoLinux Kernel
  • linux
NoYesAug 22, 2026
CVE-2026-74733HIGH7.8
  • Linux Kernel logoLinux Kernel
  • kernel-64k-debug-devel-matched
NoYesAug 22, 2026
CVE-2026-74726HIGH7.3
  • Linux Kernel logoLinux Kernel
  • kernel
NoYesAug 22, 2026
CVE-2026-74732MEDIUM5.5
  • Linux Kernel logoLinux Kernel
  • kernel-selftests-internal
NoYesAug 22, 2026
CVE-2026-74728NONEN/A
  • Linux Kernel logoLinux Kernel
  • kernel-debug-modules-core
NoNoAug 22, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management