Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix alignment issue in KernelPatch #116

Closed
wants to merge 1 commit into from
Closed

Fix alignment issue in KernelPatch #116

wants to merge 1 commit into from

Conversation

SakuraKyuo
Copy link

On certain devices, KernelPatch was reading offset without ensuring proper alignment before storing it in the inst variable. This misalignment could cause errors in subsequent operations that rely on the offset, leading to incorrect patching, throwing Segmentation fault in the end. This commit adds automatic alignment checks and adjustments to ensure that the offset is properly aligned before use.

On certain devices, KernelPatch was reading offset without ensuring proper alignment before storing it in the `inst` variable. This misalignment could cause errors in subsequent operations that rely on the offset, leading to incorrect patching, throwing Segmentation fault in the end. This commit adds automatic alignment checks and adjustments to ensure that the offset is properly aligned before use.

Signed-off-by: SakuraKyuo <[email protected]>
@SakuraKyuo SakuraKyuo closed this Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant