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

Add memory writer implementation for Linux kernel #325

Open
Tracked by #323
osandov opened this issue Jul 5, 2023 · 0 comments
Open
Tracked by #323

Add memory writer implementation for Linux kernel #325

osandov opened this issue Jul 5, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@osandov
Copy link
Owner

osandov commented Jul 5, 2023

/dev/kmem is gone since torvalds/linux@bbcd53c. Any reasonable production kernel has CONFIG_DEVMEM=n or CONFIG_STRICT_DEVMEM=y, so we can't use /dev/mem either. Most production configs have CONFIG_KGDB=n, so we probably can't use kgdb.

This leaves creating our own kernel module. The tricky part will be providing a way for drgn to write to arbitrary kernel memory without making a giant back door for rootkits. I think it'd be good enough if we allow you to write to kernel memory if and only if you'd have permission to load a kernel module yourself; if you can load a kernel module, you can write to arbitrary memory anyways. Kernel module signing will need some extra consideration.

@osandov osandov added the enhancement New feature or request label Jul 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant