mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-08 18:57:22 +00:00
bpf: Verify scalar ids mapping in regsafe() using check_ids()
[ Upstream commit 1ffc85d929 ]
Make sure that the following unsafe example is rejected by verifier:
1: r9 = ... some pointer with range X ...
2: r6 = ... unbound scalar ID=a ...
3: r7 = ... unbound scalar ID=b ...
4: if (r6 > r7) goto +1
5: r6 = r7
6: if (r6 > X) goto ...
This commit is contained in:
parent
919dcc2e95
commit
ae3c237881
2 changed files with 79 additions and 29 deletions
Loading…
Add table
Add a link
Reference in a new issue