CVE-2021-47263
Linux Kernel vulnerability analysis and mitigation

Overview

CVE-2021-47263 is a vulnerability in the Linux kernel's GPIO WCD934x driver that was discovered and resolved in 2024. The issue involves a shift-out-of-bounds error in the bit-mask calculation for pins 0 to 4, where BIT(n - 1) was incorrectly used instead of BIT(n) (NVD, Kernel Commit).

Technical details

The vulnerability exists in the drivers/gpio/gpio-wcd934x.c file at line 34, where the WCDPINMASK macro incorrectly calculated bit masks for GPIO pins. The original code used BIT(p - 1) which could result in undefined behavior when accessing pin 0, as detected by UBSAN (Undefined Behavior Sanitizer). The fix involved changing the macro to use BIT(p) instead, ensuring proper bit mask calculations for all pins from 0 to 4 (Kernel Commit).

Impact

The shift-out-of-bounds error could potentially lead to undefined behavior in the Linux kernel's GPIO subsystem when interacting with WCD934x hardware. This could affect systems using the WCD934x GPIO controller (NVD).

Mitigation and workarounds

The vulnerability has been fixed through a patch that corrects the bit mask calculation in the WCD934x GPIO driver. The fix was committed to the Linux kernel and is available in updated kernel versions. Users should update their Linux kernel to a version that includes this fix (Kernel Commit).

Additional resources


SourceThis report was generated using AI

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