Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only permit jumps within sub-programs #581

Merged
merged 2 commits into from
Oct 22, 2024
Merged

Conversation

Alan-Jowett
Copy link
Collaborator

This pull request includes several changes to improve the robustness and functionality of the eBPF verifier and the UBPF virtual machine. The most significant changes involve adding error handling to the fuzzer harness, updating the submodule for the eBPF verifier, and enhancing the UBPF VM to ensure the integrity of sub-programs.

Error Handling Improvements:

Submodule Update:

  • external/ebpf-verifier: Updated the submodule commit to a newer version, likely including various improvements and bug fixes.

UBPF VM Enhancements:

  • vm/ubpf_vm.c: Introduced a new function check_for_self_contained_sub_programs to ensure that sub-programs only enter via calls and exit properly, preventing jumps out of one program into another. This change includes several helper functions for sorting and deduplicating arrays. [1] [2] [3]
  • Removed checks for undefined behavior related to local function calls, simplifying the code and relying on the new sub-program validation logic. [1] [2]

Test Data Update:

  • tests/err-call0.data: Added an error message to the test data to reflect the new validation logic for sub-programs.

@Alan-Jowett Alan-Jowett requested a review from hawkinsw October 22, 2024 18:26
@coveralls
Copy link

coveralls commented Oct 22, 2024

Coverage Status

coverage: 79.25% (-0.09%) from 79.342%
when pulling 5bdc413 on Alan-Jowett:issue580
into 29bbad0 on iovisor:main.

Signed-off-by: Alan Jowett <[email protected]>
@Alan-Jowett Alan-Jowett merged commit 36e862f into iovisor:main Oct 22, 2024
41 of 43 checks passed
@Alan-Jowett Alan-Jowett deleted the issue580 branch October 22, 2024 20:20
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