Skip to content

[SECURITY] xfrm: xfrm_policy: fix double put in policy expansion (CVE-2022-36879)#130

Open
Mifacopy wants to merge 1 commit intofacebookincubator:oculus-go-kernel-masterfrom
Mifacopy:patch-27
Open

[SECURITY] xfrm: xfrm_policy: fix double put in policy expansion (CVE-2022-36879)#130
Mifacopy wants to merge 1 commit intofacebookincubator:oculus-go-kernel-masterfrom
Mifacopy:patch-27

Conversation

@Mifacopy
Copy link

Fix CVE-2022-36879.

Upstream commit: f85daf0e725358be78dfd208dea5fd665d8cb901

xfrm_expand_policies() may drop policy references in its error paths without
resetting the policy count, so callers may subsequently call xfrm_pols_put()
again and drop the same reference twice. This can lead to double free / kernel
crash (DoS).

Ensure *num_pols is set to 0 on error paths so callers do not double-release.

Reference: CVE-2022-36879

@meta-cla meta-cla bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Feb 14, 2026
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