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

Option to disable ptrace_scope security flag. #15971

Closed
giulianobelinassi opened this issue Apr 11, 2024 · 3 comments
Closed

Option to disable ptrace_scope security flag. #15971

giulianobelinassi opened this issue Apr 11, 2024 · 3 comments
Labels
Backend Things regarding the OBS backend Feature

Comments

@giulianobelinassi
Copy link

giulianobelinassi commented Apr 11, 2024

OpenSUSE Tumbleweed introduced a YAMA option as default to disable ptrace of sibling processes. This affects the behavior of gdb and Userspace Livepatching. We have two options in this case:

  • Run the tests as root.
  • Disable ptrace_scope by running:
sudo echo 0 > /proc/sys/kernel/yama/ptrace_scope

or setting kernel.yama.ptrace_scope = 0 in /etc/sysctl.conf.

This problem comes from this openSUSE bug bsc#1221763

What we expect is an option to disable the ptrace_scope flag in the *.spec file, so we can run the tests of gdb and libpulp as expected.

@vries
Copy link

vries commented Apr 11, 2024

A third, intermediate option is to use linux capabilities.

I've written a script using capsh, submitted here, that I used to run the gdb testsuite.

It's based on an example found here.

The benefits of this approach are:

  • you don't run tests with full root permissions (although you still need root permission to obtain the CAP_SYS_PTRACE capability).
  • you don't change system-wide settings.

@hellcp-work hellcp-work added Feature Backend Things regarding the OBS backend labels Apr 11, 2024
@darix
Copy link
Member

darix commented Apr 30, 2024

the kernel obs build package could just ship the sysctl file

@adrianschroeter
Copy link
Member

this is a content decision, please follow up with code stream maintainer as already happening in https://bugzilla.suse.com/show_bug.cgi?id=1221763

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backend Things regarding the OBS backend Feature
Projects
None yet
Development

No branches or pull requests

5 participants