Page MenuHomeFreeBSD
Feed Advanced Search

Sep 28 2022

sebastien.bini_stormshield.eu added a comment to D34622: init: allow to start script executions with sh -o verify.
In D34622#834000, @wma wrote:

@sebastien.bini_stormshield.eu could you confirm if this changes still apply to HEAD? I was trying to find anything related to -oVERIFY in init.c but there is none such string. Is there anything missing which needs to be merged before this patch?

Sep 28 2022, 12:33 PM

Sep 26 2022

sebastien.bini_stormshield.eu abandoned D36678: veriexec: add strict mode.
In D36678#833237, @sjg wrote:

I should probably elaborate: if the manifest verifies ok - the manifest is legitimate.
We deliver our s/w in immutable iso images - which mitigates a lot of problems, but in general; upgrading a box after 10 years, provides lots of scope for innocent failure modes.
Being unnecessarily strict can do be counter productive.

Sep 26 2022, 1:27 PM

Sep 23 2022

sebastien.bini_stormshield.eu added reviewers for D36678: veriexec: add strict mode: wma, mw, sjg.
Sep 23 2022, 3:11 PM
sebastien.bini_stormshield.eu updated the summary of D36678: veriexec: add strict mode.
Sep 23 2022, 3:11 PM
sebastien.bini_stormshield.eu requested review of D36678: veriexec: add strict mode.
Sep 23 2022, 3:11 PM

Sep 19 2022

sebastien.bini_stormshield.eu added a comment to D36311: MLD group state string conversion fix.

@emaste Yes, it's good.

Sep 19 2022, 7:36 AM

Sep 16 2022

sebastien.bini_stormshield.eu added a comment to D34622: init: allow to start script executions with sh -o verify.

@wma @sjg can we commit this?

Sep 16 2022, 12:48 PM

Sep 14 2022

sebastien.bini_stormshield.eu requested review of D36567: Use %lld and %llu instead of %ld and %lu in time format.
Sep 14 2022, 3:48 PM

Sep 12 2022

sebastien.bini_stormshield.eu added inline comments to D27364: mac_grantbylabel focused priv escallation via maclabel.
Sep 12 2022, 9:44 AM
sebastien.bini_stormshield.eu added a comment to D36506: veriexec: add syscall to retrieve veriexec label.
In D36506#829337, @sjg wrote:

Sorry, I already have a methon in mac_veriexec to provide access to label - part of the changes for mac_grantbylabel, which don't appear to be committed to main.
Hmm if I had a patch for main I seem to have lost it.
Will have to get that sorted first.

Sep 12 2022, 9:37 AM
sebastien.bini_stormshield.eu added inline comments to D27364: mac_grantbylabel focused priv escallation via maclabel.
Sep 12 2022, 9:02 AM

Sep 9 2022

sebastien.bini_stormshield.eu updated the diff for D36506: veriexec: add syscall to retrieve veriexec label.
  • code improvement
Sep 9 2022, 3:14 PM
sebastien.bini_stormshield.eu updated the diff for D36506: veriexec: add syscall to retrieve veriexec label.
  • fixed usage
Sep 9 2022, 2:12 PM
sebastien.bini_stormshield.eu added reviewers for D36506: veriexec: add syscall to retrieve veriexec label: sjg, mw, wma.
Sep 9 2022, 2:04 PM
sebastien.bini_stormshield.eu requested review of D36506: veriexec: add syscall to retrieve veriexec label.
Sep 9 2022, 2:02 PM

Sep 7 2022

sebastien.bini_stormshield.eu updated the summary of D36477: veriexec: fixed usage and getopt issue on armv6.
Sep 7 2022, 8:12 AM
sebastien.bini_stormshield.eu requested review of D36477: veriexec: fixed usage and getopt issue on armv6.
Sep 7 2022, 8:06 AM

Aug 23 2022

sebastien.bini_stormshield.eu updated the diff for D36311: MLD group state string conversion fix.
  • Code review comments
Aug 23 2022, 2:11 PM
sebastien.bini_stormshield.eu added inline comments to D36311: MLD group state string conversion fix.
Aug 23 2022, 2:07 PM
sebastien.bini_stormshield.eu retitled D36311: MLD group state string conversion fix from The ipv6 MLD group state string conversion function is broken (only used if KTR is turned on). to MLD group state string conversion fix.
Aug 23 2022, 1:59 PM
sebastien.bini_stormshield.eu requested review of D36311: MLD group state string conversion fix.
Aug 23 2022, 1:57 PM

Jul 15 2022

sebastien.bini_stormshield.eu accepted D35758: Add -S option to veriexec.

Okay, thanks for the clarification.

Jul 15 2022, 7:50 AM

Jul 11 2022

sebastien.bini_stormshield.eu added a comment to D35758: Add -S option to veriexec.

On our systems ve_utc is set to a fixed constant timestamp, and certificate expiration is always checked against that fixed clock.

Jul 11 2022, 8:14 AM

May 17 2022

sebastien.bini_stormshield.eu accepted D33246: Improve parameters handling in veriexec.

Looks good, thanks!

May 17 2022, 7:34 AM

May 16 2022

sebastien.bini_stormshield.eu added inline comments to D33246: Improve parameters handling in veriexec.
May 16 2022, 8:20 AM

May 6 2022

sebastien.bini_stormshield.eu added a comment to D33956: clockcalib: Fix an overflow bug.

Thank you for the backport :) !

May 6 2022, 7:34 AM

May 5 2022

sebastien.bini_stormshield.eu added a comment to D33956: clockcalib: Fix an overflow bug.

@markj could it be possible to backport this fix to the FreeBSD 13.1 while there is still time?
My FreeBSD 13.1 VM (virtualbox) freezes randomly during boot and this commit fixes it.

May 5 2022, 4:01 PM

Mar 28 2022

sebastien.bini_stormshield.eu updated the diff for D34622: init: allow to start script executions with sh -o verify.

Comments from sjg

Mar 28 2022, 3:29 PM

Mar 21 2022

sebastien.bini_stormshield.eu added reviewers for D34623: hardware: added Dell H840 raid support: mw, wma.
Mar 21 2022, 2:52 PM
sebastien.bini_stormshield.eu requested review of D34623: hardware: added Dell H840 raid support.
Mar 21 2022, 2:51 PM
sebastien.bini_stormshield.eu updated the summary of D34622: init: allow to start script executions with sh -o verify.
Mar 21 2022, 2:32 PM
sebastien.bini_stormshield.eu requested review of D34622: init: allow to start script executions with sh -o verify.
Mar 21 2022, 2:17 PM

Feb 28 2022

sebastien.bini_stormshield.eu added reviewers for D34394: Fix mvneta driver that doesn't handle fixed link properly: mw, zbb, mkm_semihalf.com, bsz_semihalf.com.
Feb 28 2022, 3:35 PM
sebastien.bini_stormshield.eu updated the summary of D34394: Fix mvneta driver that doesn't handle fixed link properly.
Feb 28 2022, 3:28 PM
sebastien.bini_stormshield.eu requested review of D34394: Fix mvneta driver that doesn't handle fixed link properly.
Feb 28 2022, 3:27 PM

Feb 21 2022

sebastien.bini_stormshield.eu retitled D34327: mac_veriexec: Authorize reads of secured sysctls from Writes to sysctls flagged with CTLFLAG_SECURE are blocked if the appropriate secure level is set. mac_veriexec does not behave this way, it blocks such sysctls in read-only mode as well. to mac_veriexec: Authorize reads of secured sysctls.
Feb 21 2022, 10:23 AM
sebastien.bini_stormshield.eu requested review of D34327: mac_veriexec: Authorize reads of secured sysctls.
Feb 21 2022, 10:21 AM

Feb 17 2022

sebastien.bini_stormshield.eu planned changes to D33926: This change allows the veriexec binary to (optionally) load its CA store from a verified tarball..

Thank you for your input, I believe we will think it over.

Feb 17 2022, 8:50 AM

Feb 16 2022

sebastien.bini_stormshield.eu added a comment to D33926: This change allows the veriexec binary to (optionally) load its CA store from a verified tarball..
In D33926#776097, @sjg wrote:
In D33926#775631, @sjg wrote:

Also I'm curious; if you are ok embedding trust anchors in the loader, what is the problem with embedding them in veriexec?

Legacy build system basically :s

It's much more convenient for us to separate the program compilation from its cryptographic configuration. This way the program can be compiled once and be used with various (trusted) CA stores.

When I originally designed the trust model for veriexec's signed manifest, I end up with embedded trust anchors because I could not come up with an alternative that could not be compromised. Of course as an embedded vendor, the set of trust anchors required is quite small and virtually static, so it is an easy choice.
What about a pre-loaded kernel module to hold your initial trust anchor(s)? need only be a sysctl ? not bullet proof, but a bit harder to spoof than kenv?

Feb 16 2022, 1:20 PM

Feb 15 2022

sebastien.bini_stormshield.eu added inline comments to D33926: This change allows the veriexec binary to (optionally) load its CA store from a verified tarball..
Feb 15 2022, 9:20 AM
sebastien.bini_stormshield.eu added a comment to D33926: This change allows the veriexec binary to (optionally) load its CA store from a verified tarball..
In D33926#775630, @sjg wrote:

Thanks for clarifying. The problem is; how does the kernel know/trust that the loader really verified anything ? rather than simply a loader.conf putting a hash into kenv?
It is one thing for the loader to verify the kernel before loading it (we also verify the kernel's rootfs) but the kernel cannot really verify the loader - or trust anything in kenv.

Feb 15 2022, 9:18 AM
sebastien.bini_stormshield.eu added a comment to D33926: This change allows the veriexec binary to (optionally) load its CA store from a verified tarball..
In D33926#775631, @sjg wrote:

Also I'm curious; if you are ok embedding trust anchors in the loader, what is the problem with embedding them in veriexec?

Feb 15 2022, 9:13 AM
sebastien.bini_stormshield.eu added inline comments to D33246: Improve parameters handling in veriexec.
Feb 15 2022, 8:46 AM

Feb 14 2022

sebastien.bini_stormshield.eu added inline comments to D33926: This change allows the veriexec binary to (optionally) load its CA store from a verified tarball..
Feb 14 2022, 8:49 AM
sebastien.bini_stormshield.eu added a comment to D33926: This change allows the veriexec binary to (optionally) load its CA store from a verified tarball..
In D33926#773586, @sjg wrote:

The basic premise here is incorrect. There is a circular dependency.
veriexec cannot rely on O_VERIFY since veriexec is responsible for seeding mac_veriexec to enable O_VERIFY.
You would need to verify a detached signature of the archive - but then where do you get the trust anchors for that...

Feb 14 2022, 8:46 AM

Jan 18 2022

sebastien.bini_stormshield.eu requested review of D33926: This change allows the veriexec binary to (optionally) load its CA store from a verified tarball..
Jan 18 2022, 4:27 PM

May 31 2021

sebastien.bini_stormshield.eu added a comment to D30464: sh: Add -o verify to use O_VERIFY when sourcing scripts.
In D30464#686471, @imp wrote:

$1 is a local variable to vdot. Who could possibly change it?

$1 does not change :) But it represents a filename and it may not be resolved to the same inode when passed to _rc_verify and to dot :/ I know it's probably hard to exploit, but it remains a race condition nonetheless.

May 31 2021, 1:42 PM
sebastien.bini_stormshield.eu added a comment to D30464: sh: Add -o verify to use O_VERIFY when sourcing scripts.
In D30464#686275, @sjg wrote:
vdot()
{
        if test -s $1 && _rc_verify $1 > /dev/null 2>&1; then
                . $1
        fi
}

Besides I believe there is race condition here. The file $1 can be tampered with after the call to _rc_verify and before the source call (.)

May 31 2021, 10:03 AM
sebastien.bini_stormshield.eu added a comment to D30464: sh: Add -o verify to use O_VERIFY when sourcing scripts.
In D30464#686275, @sjg wrote:

Neat, but not going to be portable.
FWIW I use veriexec -x some/file to test whether the file is verified.
Eg. we modify rc.subr to provide a couple of functions is_verified and vdot which does . only after verify file.
This allows shell scripts to be careful about what they consume, while still being portable (not that big. a deal really ;-)

AFAIK mac_veriexec does not block the opening of files with O_VERIFY if inactive. (i.e. the new sh verify option blocks nothing if mac_veriexec is inactive / not loaded).
Could you elaborate more on the portability issue?

May 31 2021, 9:17 AM