Skip to content

Signals control #8

Closed
Closed

Description

@l0kod

A sandboxed process is currently not restricted to send signals (e.g. SIGKILL) to processes outside the sandbox. A simple way to control that would be to scope signals the same way ptrace is restricted (but this time it would be opt-in).

See https://lore.kernel.org/all/20231023.ahphah4Wii4v@digikod.net/

Approach similar to #7

v2: https://lore.kernel.org/all/cover.1722966592.git.fahimitahera@gmail.com/
v1: https://lore.kernel.org/all/36958dbc486e1f975f4d4ecdfa51ae65c2c4ced0.1720213293.git.fahimitahera@gmail.com/

Activity

  1. changed the title [-]Signal control[/-] [+]Signals control[/+] on Jan 18, 2024
  2. moved this to Ready in Landlockon Feb 1, 2024
  3. maryagiamah commented on Mar 6, 2024

    @maryagiamah

    Hello, can I work on this ?

  4. l0kod commented on Mar 6, 2024

    @l0kod
    MemberAuthor

    Hi @maryagiamah! Yes, you can start working on signals control.

  5. moved this from Ready to In Progress in Landlockon Mar 6, 2024
  6. moved this from In Progress to Ready in Landlockon Mar 7, 2024
  7. l0kod commented on Mar 7, 2024

    @l0kod
    MemberAuthor

    What is your plan to work on this?

  8. maryagiamah commented on Mar 7, 2024

    @maryagiamah
  9. l0kod commented on Mar 7, 2024

    @l0kod
    MemberAuthor

    I have little idea about what it entails as I have experimented with signals prior but I am still reading up on what the task is all about. Do you have any route or path I should go searching for?

    You first need to familiarize yourself with the Linux kernel development as explained in the Outreachy documentation. Then, you can start tweaking the code and test it with the test tools. If you have questions about that, please send emails to the Outreachy mailing list (CCing me and @pcmoore).

    Before patching the kernel, you can start by thinking about attack scenarios using signals, describing them, and write such tests in a new file here.

    About the kernel changes, we need to add a new scoped field to the landlock_ruleset_attr struct. This field will optionally contain a LANDLOCK_RULESET_SCOPED_SIGNAL flag to specify that this ruleset will deny any signal from within the sandbox to its parents (i.e. any parent sandbox or not-sandboxed processes).

    This kind of restriction should be pretty similar to the ptrace ones, but we need to keep in mind that not all layers (i.e. nested sandboxes) of a Landlock domain may have this restriction. It could be seen as a roadblock for signals.

    There is an LSM hook dedicated to control signals, and the Landlock scope logic is defined in ptrace.c (being renamed to task.c).

    This GitHub issue is dedicated to track progress on signal control. As a reminder, no Linux kernel code change nor review should happen on GitHub because kernel reviewers are only following the dedicated mailing lists.

  10. l0kod commented on Mar 27, 2024

    @l0kod
    MemberAuthor

    Any news @maryagiamah?

  11. 20 remaining items

  12. moved this from Done to In review in Landlockon May 19, 2025
  13. moved this from In review to Done in Landlockon May 19, 2025
  14. added a commit that references this issue on Dec 6, 2025
  15. added a commit that references this issue on Jan 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

  • Status
    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions