Skip to content

Adding driver tests for proof of verification#4975

Open
nmlud21 wants to merge 43 commits intomicrosoft:mainfrom
nmlud21:issue4715
Open

Adding driver tests for proof of verification#4975
nmlud21 wants to merge 43 commits intomicrosoft:mainfrom
nmlud21:issue4715

Conversation

@nmlud21
Copy link
Copy Markdown
Contributor

@nmlud21 nmlud21 commented Feb 2, 2026

Description

Resolves #4715

Adding driver tests to validate that production signed eBPF programs can be loaded, and that non-production-signed programs are correctly rejected. Pulling production signed binaries from 1es Azure storage blobs.

  • Added positive and negative driver tests for proof of verification, one loads a production-signed driver (should succeed), the other loads a test-signed driver (should be rejected).
  • Added a proof of verification registry toggle during test that allows for dynamically enabling/disabling production signature checks on native eBPF drivers, even when test signing is enabled, so CI tests can validate the signature verification path.
  • Added CI infrastructure to provision signed binaries to 1es test runners, signed drivers are copied from the host into runners so the tests can find them at runtime.

Testing

This is adding a new test for proof of verification driver loading.

Documentation

None

Installation

None

@nmlud21 nmlud21 force-pushed the issue4715 branch 2 times, most recently from 31244b4 to 2d504c3 Compare February 3, 2026 17:56
@nmlud21 nmlud21 changed the title Issue4715 Adding driver tests for proof of verification Feb 4, 2026
nmlud21 and others added 4 commits February 10, 2026 13:48
Signed-off-by: Nicholas L <nickl239@att.net>
Signed-off-by: Nicholas Ludwig <nludwig@microsoft.com>
Signed-off-by: Nicholas Ludwig <nludwig@microsoft.com>
Signed-off-by: Nicholas Ludwig <nludwig@microsoft.com>
Nicholas Ludwig and others added 8 commits February 10, 2026 14:44
Signed-off-by: Nicholas Ludwig <nludwig@microsoft.com>
Signed-off-by: Nicholas Ludwig <nludwig@microsoft.com>
Signed-off-by: Nicholas Ludwig <nludwig@microsoft.com>
Signed-off-by: Nicholas Ludwig <nludwig@microsoft.com>
Signed-off-by: Nicholas Ludwig <nludwig@microsoft.com>
Signed-off-by: Nicholas Ludwig <nludwig@microsoft.com>
Signed-off-by: Nicholas Ludwig <nludwig@microsoft.com>
Signed-off-by: Nicholas Ludwig <nludwig@microsoft.com>
Copy link
Copy Markdown
Member

@Alan-Jowett Alan-Jowett left a comment

Choose a reason for hiding this comment

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

Minor nit for overall test hygiene: if any of the REQUIRE() assertions below this point fail, bpf_object__close(object) on line 3661 will never execute, leaking the loaded driver.

Other tests in this file already use the RAII pattern to avoid this (e.g. line 1926, 2350, 2505):

auto object_cleanup = std::unique_ptr<bpf_object, decltype(&bpf_object__close)>(object, bpf_object__close);

Would be nice to use the same pattern here so cleanup is guaranteed regardless of assertion outcomes.

Nicholas Ludwig and others added 2 commits April 1, 2026 13:25
Signed-off-by: Nicholas Ludwig <nludwig@microsoft.com>

Exit:
ebpf_close_registry_key(root_key);
return result;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Use EBPF_RETURN_RESULT

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@shankarseal EBPF_RETURN_RESULT is not used in ebpf_store_helper.c Should all functions be updated to use this as well?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

Add test for proof of verification

3 participants