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

identify missing calls from syscall() in libsr3shim #178

Open
petersilva opened this issue Nov 12, 2024 · 3 comments
Open

identify missing calls from syscall() in libsr3shim #178

petersilva opened this issue Nov 12, 2024 · 3 comments
Labels
enhancement New feature or request wishlist not a priority, but a long term wish... worries needs work to clarify status

Comments

@petersilva
Copy link
Contributor

The initial implementation has been fairly thoroughly investigated on redhat 8. We initially were only expecting to have the syscall() implementation active on redhat 8 and ubuntu 18, where there is a known very common case of syscall usage by a very common package (file-utils... aka mv.)

  • We expanded the solution to cover all possible calls to syscall() to prevent breakage of existing calls,
  • We decided to have the syscall implementation active on all OS's, not just the ones mentioned above, as it is a general vulnerability where files could be written that we would miss.
  • We now appreciate that newer kernels might have syscalls() we haven't implemented.
  • If we build libsr3shim on a new system, it just has a canned syscall() implementation using the calls we have found on all previous ones.

There should be some kind of audit script to warn that there is a syscall defined on the current system that isn't covered by what we do in libsr3shim.

@petersilva petersilva added enhancement New feature or request worries needs work to clarify status labels Nov 12, 2024
@reidsunderland
Copy link
Member

One of the main reasons that caused me to give up on making the generate_syscall_code.py script compatible with Ubuntu is that I couldn't find the syscall_64.tbl file.

I tried again this morning and still couldn't find it in any packages.

But it is available in the Ubuntu kernel git repos: https://wiki.ubuntu.com/Kernel/Dev/KernelGitGuide

e.g. https://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/jammy/plain/arch/x86/entry/syscalls/syscall_64.tbl

@petersilva petersilva added the wishlist not a priority, but a long term wish... label Nov 12, 2024
@petersilva
Copy link
Contributor Author

I think this is just a placeholder for when we are looking... it's not worth a real effort at the moment.
maybe I should put wishlist on it?

@reidsunderland
Copy link
Member

I made some small changes to get the generate_syscall_code script working on Ubuntu.

It would be nice if it could compare what it generates with the code in libsr3shim.c, or just automatically insert the generated code at compile time. Automatically modifying the code shouldn't be too hard, it just has to replace everything between // start of auto-generated code and // end of auto generated code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request wishlist not a priority, but a long term wish... worries needs work to clarify status
Projects
None yet
Development

No branches or pull requests

2 participants