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

linux kernel module IMPORTs #554

Open
atlas0fd00m opened this issue Nov 25, 2022 · 0 comments
Open

linux kernel module IMPORTs #554

atlas0fd00m opened this issue Nov 25, 2022 · 0 comments

Comments

@atlas0fd00m
Copy link
Contributor

currently Vivisect doesn't have a good way to handle .ko IMPORTs.
the name doesn't exist, and so a call to makeImport() should handle the problem... however, for x86 kernel modules, the compiler uses a 32-bit offset branch, and uses R_X86_64_PLT32 to jam in an offset into the opcode itself.

without an actual target to point to, we currently just leave the branch alone (which branches to the next instruction).

in hellokernel, that appears like this:

image

@rakuy0 , we need to determine the best way to handle that. one option we started to discuss, is putting in the idea of an "extern" function that we can define and branch to that (making that the IMPORT, which would work with viv_loader as well), and jamming in the offset to that.

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

No branches or pull requests

1 participant