Skip to content

Add checked shift and allocation size validation in COVER_map_init()#4627

Open
nidu-ninja wants to merge 1 commit intofacebook:devfrom
nidu-ninja:cover-map-init-overflow-checks
Open

Add checked shift and allocation size validation in COVER_map_init()#4627
nidu-ninja wants to merge 1 commit intofacebook:devfrom
nidu-ninja:cover-map-init-overflow-checks

Conversation

@nidu-ninja
Copy link
Contributor

This PR hardens COVER_map_init() in cover.c by adding validation for
bit shifts and allocation size computations.

The original implementation computed map size using a left shift and
performed a multiplication before malloc without validating whether
these operations could overflow.

@meta-cla meta-cla bot added the CLA Signed label Mar 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant