Skip to content

Conversation

@Mifacopy
Copy link

Background

In drivers/video/fbdev/uvesafb.c, uvesafb_setcmap() could allocate entries with kmalloc(sizeof(*entries) * cmap->len) where cmap->len may become large enough to overflow the multiplication, leading to an undersized allocation and potential kernel crash or privilege impact; this is tracked as CVE-2018-13406.

Changes

Replace the overflow-prone allocation with kmalloc_array(cmap->len, sizeof(*entries), GFP_KERNEL) so the size calculation is checked and allocation fails safely on overflow.

Security Impact

Prevents integer-overflow-driven undersized allocation in the generic VESA framebuffer driver colormap path, addressing CVE-2018-13406.

References

Upstream commit: 9f645bcc566a1e9f921bdae7528a01ced5bc3713; CVE: CVE-2018-13406

@meta-cla meta-cla bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Dec 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed Do not delete this pull request or issue due to inactivity.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant