Skip to content

Conversation

@ovalenti
Copy link
Contributor

@ovalenti ovalenti commented Nov 18, 2025

Description

Listen for chown LSM events.

Known limitations:

  • We grab both previous and new ownership information although only the newer is part of the protobuf events.
  • Grabbing of string representation of the user and group names is not happening yet.

Checklist

  • Investigated and inspected CI test results
  • Updated documentation accordingly

Automated testing

  • Added unit tests
  • Added integration tests
  • Added regression tests

@ovalenti ovalenti self-assigned this Nov 18, 2025
@ovalenti ovalenti force-pushed the ovalenti/ROX-30258-ownership-tracking branch from e94e169 to f0c48bd Compare November 18, 2025 10:58
@ovalenti ovalenti force-pushed the ovalenti/ROX-30258-ownership-tracking branch 2 times, most recently from 39cf241 to f15de82 Compare November 18, 2025 15:45
@ovalenti ovalenti changed the base branch from main to mauro/ROX-30257/track-mode-change November 18, 2025 15:45
@Molter73 Molter73 force-pushed the mauro/ROX-30257/track-mode-change branch from f1e642b to aa0399a Compare December 17, 2025 11:25
@ovalenti ovalenti force-pushed the ovalenti/ROX-30258-ownership-tracking branch 2 times, most recently from 003e113 to bbabdca Compare December 17, 2025 18:04
@Molter73 Molter73 force-pushed the mauro/ROX-30257/track-mode-change branch 3 times, most recently from 3a8ef28 to b948cef Compare December 18, 2025 17:27
@Molter73 Molter73 force-pushed the mauro/ROX-30257/track-mode-change branch 3 times, most recently from b96120b to 1746a5f Compare December 19, 2025 13:43
@ovalenti ovalenti force-pushed the ovalenti/ROX-30258-ownership-tracking branch from 223faed to 9af8d73 Compare January 6, 2026 09:41
@Molter73 Molter73 force-pushed the mauro/ROX-30257/track-mode-change branch 3 times, most recently from aeee08e to ff2f6db Compare January 9, 2026 11:36
Base automatically changed from mauro/ROX-30257/track-mode-change to main January 12, 2026 16:44
@ovalenti ovalenti force-pushed the ovalenti/ROX-30258-ownership-tracking branch from a362c36 to 57a6cb3 Compare January 13, 2026 14:13
@ovalenti ovalenti force-pushed the ovalenti/ROX-30258-ownership-tracking branch from 57a6cb3 to 16cc780 Compare January 13, 2026 17:00
@ovalenti ovalenti marked this pull request as ready for review January 14, 2026 16:29
@ovalenti ovalenti requested a review from Molter73 January 14, 2026 16:29
Copy link
Collaborator

@Molter73 Molter73 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few comments but nothing major really. Feel free to ignore the ones marked with [nit].

}

SEC("lsm/path_chown")
int BPF_PROG(trace_path_chown, struct path* path, unsigned long long uid, unsigned long long gid) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nit] It'd be nice to have a small comment here explaining why uid and gid are unsigned long long instead of kuid_t and kgid_t, in case someone comes in without the context in the future and attempts to change it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a comment in b381565 . I hope it makes sense.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's fine, maybe we can mention the verifier does not allow struct types as arguments, so we do this instead.

ovalenti and others added 11 commits January 15, 2026 16:02
Co-authored-by: Mauro Ezequiel Moltrasio <mmoltras@redhat.com>
... to submit_ownership_event()
Co-authored-by: Mauro Ezequiel Moltrasio <mmoltras@redhat.com>
Co-authored-by: Mauro Ezequiel Moltrasio <mmoltras@redhat.com>
Co-authored-by: Mauro Ezequiel Moltrasio <mmoltras@redhat.com>
Copy link
Collaborator

@Molter73 Molter73 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@ovalenti ovalenti merged commit f164738 into main Jan 15, 2026
21 checks passed
@ovalenti ovalenti deleted the ovalenti/ROX-30258-ownership-tracking branch January 15, 2026 17:21
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

Successfully merging this pull request may close these issues.

2 participants