# CVE-2021-47263: gpio: wcd934x: Fix shift-out-of-bounds error

- Severity: Medium 5.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.22%, higher than 14% of CVEs (2026-12-01)
- Published: 2024-05-21T14:19:55.318Z
- Modified: 2026-06-17T04:17:02.833Z
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## Description

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

gpio: wcd934x: Fix shift-out-of-bounds error

bit-mask for pins 0 to 4 is BIT(0) to BIT(4) however we ended up with BIT(n - 1)
which is not right, and this was caught by below usban check

UBSAN: shift-out-of-bounds in drivers/gpio/gpio-wcd934x.c:34:14

(As written by CVE List.)

## Affected

- Linux Linux: from 59c324683400b41caa6d85b091e812ee3d5415c3 before e0b518a2eb44d8a74c19e50f79a8ed393e96d634; from 59c324683400b41caa6d85b091e812ee3d5415c3 before dd55331d493b7ea75c5db1f24d6822946fde2862; from 59c324683400b41caa6d85b091e812ee3d5415c3 before dbec64b11c65d74f31427e2b9d5746fbf17bf840; 5.6 (not affected: before 5.6; from 5.10.44 up to 5.10.*; from 5.12.11 up to 5.12.*; from 5.13 up to *)
- linux linux_kernel: from 5.6 before 5.10.44; from 5.11 before 5.12.11; 5.13

## References

- <https://git.kernel.org/stable/c/e0b518a2eb44d8a74c19e50f79a8ed393e96d634> (patch)
- <https://git.kernel.org/stable/c/dd55331d493b7ea75c5db1f24d6822946fde2862> (patch)
- <https://git.kernel.org/stable/c/dbec64b11c65d74f31427e2b9d5746fbf17bf840> (patch)

## Sources

- CVE List: [CVE-2021-47263](https://www.cve.org/CVERecord?id=CVE-2021-47263), CVE Terms of Use, modified 2026-05-11
- NVD: [CVE-2021-47263](https://nvd.nist.gov/vuln/detail/CVE-2021-47263), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-47263 · Whole record: https://cve.day/CVE-2021-47263.json · Rebuilt by cve.day 2026-11-25T22:58:08.763Z
