Page MenuHomeFreeBSD

capsicumUmbrella
ActivePublic

Recent Activity

May 22 2024

yan.jurak_gmail.com removed a watcher for capsicum: yan.jurak_gmail.com.
May 22 2024, 9:10 PM

May 20 2024

yan.jurak_gmail.com added a watcher for capsicum: yan.jurak_gmail.com.
May 20 2024, 10:12 PM

May 1 2024

gallatin added a comment to D40676: ktrace: Record detailed ECAPMODE violations.

After this change, ktrace output is littered with 'CAP system call not allowed: $SYSCALL' on systems w/o capsicum enabled, which is confusing and distracting. Can this please be reverted to behave without CAP output for systems w/o capsicum ?

This was done already in commit f239db4800ee9e7ff8485f96b7a68e6c38178c3b.

May 1 2024, 6:05 PM · capsicum
imp added a comment to D40676: ktrace: Record detailed ECAPMODE violations.

After this change, ktrace output is littered with 'CAP system call not allowed: $SYSCALL' on systems w/o capsicum enabled

Are systems without Capsicum still supported? I thought that option was removed in 14.

May 1 2024, 4:17 PM · capsicum
theraven added a comment to D40676: ktrace: Record detailed ECAPMODE violations.

After this change, ktrace output is littered with 'CAP system call not allowed: $SYSCALL' on systems w/o capsicum enabled

May 1 2024, 4:10 PM · capsicum
markj added a comment to D40676: ktrace: Record detailed ECAPMODE violations.

After this change, ktrace output is littered with 'CAP system call not allowed: $SYSCALL' on systems w/o capsicum enabled, which is confusing and distracting. Can this please be reverted to behave without CAP output for systems w/o capsicum ?

May 1 2024, 3:59 PM · capsicum
gallatin added a comment to D40676: ktrace: Record detailed ECAPMODE violations.

After this change, ktrace output is littered with 'CAP system call not allowed: $SYSCALL' on systems w/o capsicum enabled, which is confusing and distracting. Can this please be reverted to behave without CAP output for systems w/o capsicum ?

May 1 2024, 3:56 PM · capsicum
def removed a watcher for capsicum: def.
May 1 2024, 10:53 AM

Apr 7 2024

jfree closed D40682: tests: Add ktrace capability violation test cases.
Apr 7 2024, 11:58 PM · capsicum
jfree closed D40681: ktrace: Record socket violations with KTR_CAPFAIL.
Apr 7 2024, 11:58 PM · capsicum
jfree closed D40680: ktrace: Record namei violations with KTR_CAPFAIL.
Apr 7 2024, 11:58 PM · capsicum
jfree closed D40679: ktrace: Record signal violations with KTR_CAPFAIL.
Apr 7 2024, 11:58 PM · capsicum
jfree closed D40678: ktrace: Record syscall violations with KTR_CAPFAIL.
Apr 7 2024, 11:58 PM · capsicum
jfree closed D40677: ktrace: Record cpuset violations with KTR_CAPFAIL.
Apr 7 2024, 11:58 PM · capsicum
jfree closed D40676: ktrace: Record detailed ECAPMODE violations.
Apr 7 2024, 11:58 PM · capsicum

Mar 29 2024

oshogbo accepted D40676: ktrace: Record detailed ECAPMODE violations.
Mar 29 2024, 4:19 PM · capsicum
markj accepted D40680: ktrace: Record namei violations with KTR_CAPFAIL.
Mar 29 2024, 3:34 PM · capsicum
markj accepted D40676: ktrace: Record detailed ECAPMODE violations.
Mar 29 2024, 3:33 PM · capsicum

Mar 10 2024

jfree updated the diff for D40680: ktrace: Record namei violations with KTR_CAPFAIL.
  • Record *namei* violations instead of vfs. Slight wording change for clarity.
  • Rebase on main after several months
Mar 10 2024, 4:25 AM · capsicum
jfree retitled D40680: ktrace: Record namei violations with KTR_CAPFAIL from ktrace: Record vfs violations with KTR_CAPFAIL to ktrace: Record namei violations with KTR_CAPFAIL.
Mar 10 2024, 4:23 AM · capsicum
jfree updated the summary of D40682: tests: Add ktrace capability violation test cases.
Mar 10 2024, 4:21 AM · capsicum
jfree updated the diff for D40682: tests: Add ktrace capability violation test cases.
  • Rename all instances of CAPFAIL_VFS to CAPFAIL_NAMEI
  • Rebase on main after several months
Mar 10 2024, 4:21 AM · capsicum
jfree updated the summary of D40676: ktrace: Record detailed ECAPMODE violations.
Mar 10 2024, 4:15 AM · capsicum
jfree updated the diff for D40676: ktrace: Record detailed ECAPMODE violations.
  • Address Mark's comments
  • Rebase on main after several months
Mar 10 2024, 4:15 AM · capsicum
jfree added inline comments to D40676: ktrace: Record detailed ECAPMODE violations.
Mar 10 2024, 4:13 AM · capsicum

Jan 18 2024

markj accepted D40682: tests: Add ktrace capability violation test cases.
Jan 18 2024, 3:46 PM · capsicum
markj accepted D40680: ktrace: Record namei violations with KTR_CAPFAIL.
Jan 18 2024, 3:46 PM · capsicum

Jan 9 2024

jfree updated the diff for D40680: ktrace: Record namei violations with KTR_CAPFAIL.

Replace all instances of "AT_FDCWD" with "<AT_FDCWD>" when reporting a violation via ktrcapfail().

Jan 9 2024, 4:28 AM · capsicum
jfree added inline comments to D40680: ktrace: Record namei violations with KTR_CAPFAIL.
Jan 9 2024, 4:22 AM · capsicum
jfree added inline comments to D40680: ktrace: Record namei violations with KTR_CAPFAIL.
Jan 9 2024, 4:14 AM · capsicum
jfree added a comment to D40677: ktrace: Record cpuset violations with KTR_CAPFAIL.

I would frown at that. :) It introduces hidden control flow which makes it hard to see quickly what a function does.

Consider the common case where a function allocates some memory and is supposed to free it before returning: if I'm reviewing the code and want to verify it behaves properly with respect to that free() call, it's much easier to check if I just have to look for the "return" keyword in the function.

Once in a while it's handy, but it should be avoided if possible.

Jan 9 2024, 12:52 AM · capsicum

Jan 8 2024

markj accepted D40677: ktrace: Record cpuset violations with KTR_CAPFAIL.

Actually, scratch that. I just understood your comment and this is a better solution.

As a side note though... Is returning in macros usually frowned upon?

Jan 8 2024, 2:55 PM · capsicum

Jan 7 2024

jfree updated the diff for D40677: ktrace: Record cpuset violations with KTR_CAPFAIL.

Actually, scratch that. I just understood your comment and this is a better solution.

Jan 7 2024, 8:24 AM · capsicum
jfree updated the diff for D40677: ktrace: Record cpuset violations with KTR_CAPFAIL.

It feels wrong to return inside of a macro, but I did not see any comments about it in style(9). This seems to be the solution that is most elegant in minimizing code duplication. Let me know your thoughts.

Jan 7 2024, 7:53 AM · capsicum

Oct 6 2023

oshogbo added a comment to D40676: ktrace: Record detailed ECAPMODE violations.

Hello Jake,

Oct 6 2023, 7:27 AM · capsicum
theraven added a comment to D40676: ktrace: Record detailed ECAPMODE violations.

I created this patch to make the Capsicumization experience less intimidating for inexperienced developers. Both David and Mariusz may not be the target audience for this change

Oct 6 2023, 7:04 AM · capsicum

Oct 5 2023

jfree added a comment to D40676: ktrace: Record detailed ECAPMODE violations.

I created this patch to make the Capsicumization experience less intimidating for inexperienced developers. Both David and Mariusz may not be the target audience for this change because they already know how to extract the information that the tracing provides. Developers that are unfamiliar with Capsicum's semantics could use this tracing mode to easily determine why their program is not working in capability mode. I think it provides a solid starting point so new developers don't get lost and discouraged.

Oct 5 2023, 11:50 PM · capsicum

Oct 4 2023

theraven added a comment to D40676: ktrace: Record detailed ECAPMODE violations.

It's doable in principle, but in practice dtrace's inability to resolve backtraces in the face of fork/exec makes it mostly unusable

Oct 4 2023, 3:44 PM · capsicum
markj added a comment to D40676: ktrace: Record detailed ECAPMODE violations.

Are these events exposed to DTrace? When sandboxing, the thing I really want is a stack trace in userspace at the point where the violation happened. If so, it would be great to include a script that logged them. Ideally with an option of an explicit start marker so you can put in a fake cap_enter and be told what you still need to fix.

Oct 4 2023, 2:57 PM · capsicum

Sep 29 2023

theraven added a comment to D40676: ktrace: Record detailed ECAPMODE violations.

Are these events exposed to DTrace? When sandboxing, the thing I really want is a stack trace in userspace at the point where the violation happened. If so, it would be great to include a script that logged them. Ideally with an option of an explicit start marker so you can put in a fake cap_enter and be told what you still need to fix.

Sep 29 2023, 6:55 AM · capsicum

Sep 28 2023

oshogbo added a comment to D40676: ktrace: Record detailed ECAPMODE violations.

Ah, ok I thought it was printed by default.
Then I don't think I have any complaints through the idea.

Sep 28 2023, 7:47 PM · capsicum
markj added a comment to D40676: ktrace: Record detailed ECAPMODE violations.

If I understand correctly, for application like:

localtime();
open();
cap_enter()
openat()

The first two operations will always cause ktrace to report insufficient capabilities. Which is a false-postive statement, and will be misleading for "normal" users.

Sep 28 2023, 7:39 PM · capsicum
oshogbo added a comment to D40676: ktrace: Record detailed ECAPMODE violations.

If I understand correctly, for application like:

localtime();
open();
cap_enter()
openat()
Sep 28 2023, 7:31 PM · capsicum
markj added a comment to D40676: ktrace: Record detailed ECAPMODE violations.

To summarize the patch very briefly, this lets you ktrace an application that does not run in capability mode, and ktrace will log all events which would have triggered a Capsicum violation.

I haven't looked into the code, to be honest. However, I don't see a real application for this approach, or maybe I misread how this is supposed to work.
Is this a tool for improving debugging sandboxed applications or sandboxing new applications?

Sep 28 2023, 6:45 PM · capsicum
jfree added a comment to D40676: ktrace: Record detailed ECAPMODE violations.

Again, maybe I just need some more context to understand the reasoning behind this change.

Sep 28 2023, 6:39 PM · capsicum
oshogbo added a comment to D40676: ktrace: Record detailed ECAPMODE violations.

To summarize the patch very briefly, this lets you ktrace an application that does not run in capability mode, and ktrace will log all events which would have triggered a Capsicum violation.

Sep 28 2023, 5:38 PM · capsicum
markj added a comment to D40676: ktrace: Record detailed ECAPMODE violations.

To summarize the patch very briefly, this lets you ktrace an application that does not run in capability mode, and ktrace will log all events which would have triggered a Capsicum violation.

So this traces the system calls that are not on the allowed-in-cap-mode list?

Sep 28 2023, 5:06 PM · capsicum
theraven added a comment to D40676: ktrace: Record detailed ECAPMODE violations.

To summarize the patch very briefly, this lets you ktrace an application that does not run in capability mode, and ktrace will log all events which would have triggered a Capsicum violation.

Sep 28 2023, 4:54 PM · capsicum
markj updated subscribers of D40676: ktrace: Record detailed ECAPMODE violations.

Overall this looks good to me. I wonder if @emaste, @oshogbo or @theraven have any thoughts on it? To summarize the patch very briefly, this lets you ktrace an application that does not run in capability mode, and ktrace will log all events which would have triggered a Capsicum violation.

Sep 28 2023, 4:45 PM · capsicum
markj added inline comments to D40680: ktrace: Record namei violations with KTR_CAPFAIL.
Sep 28 2023, 4:42 PM · capsicum