Skip to content

BPF verification fails due to register offset #4358

Answered by nela
nela asked this question in Q&A
Discussion options

You must be logged in to vote

So, I've found the solution. It seems that I didn't properly check for the bounds of *curr_state. So the solution is to simply add the following snippet, prior to indexing aut.function.

if (*curr_state < 0 || *curr_state >= 4)
    return -1;

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@nela
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by nela
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants