Skip to content

[SECURITY] PCI: rpadlpar: fix drc_name stack corruption in sysfs store (CVE-2021-28972)#129

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

[SECURITY] PCI: rpadlpar: fix drc_name stack corruption in sysfs store (CVE-2021-28972)#129
Mifacopy wants to merge 1 commit intofacebookincubator:oculus-go-kernel-masterfrom
Mifacopy:patch-26

Conversation

@Mifacopy
Copy link

Fix CVE-2021-28972.

Upstream commit: cc7a0bb058b85ea03db87169c60c7cfdd5d34678

The RPA PCI Hotplug sysfs handlers add_slot_store() and remove_slot_store()
mishandled drc_name '\0' termination when copying userspace input. This can
lead to a user-tolerable stack buffer overflow / stack corruption (aka
CID-cc7a0bb058b8), allowing userspace to write data into the kernel stack
frame.

Switch to strscpy() to ensure NUL termination and only replace '\n' with '\0'
when present.

Reference: CVE-2021-28972

@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