• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

vbpf / prevail / 29018859372
87%

Build:
DEFAULT BRANCH: main
Ran 09 Jul 2026 12:56PM UTC
Jobs 2
Files 79
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

09 Jul 2026 12:39PM UTC coverage: 86.649% (+0.04%) from 86.611%
29018859372

push

github

elazarg
Model direct socket reads conservatively

After stale type-dependent numeric facts are discarded, previously
hidden paths reach socket-returning helpers such as skc_lookup_tcp().
Those helpers can produce a non-null T_SOCKET, and real accepted
programs read fields such as `state` from that socket value. Before this
change the checker required dereference sources to be
{ctx, stack, packet, shared}, so a valid socket read was rejected as a
type error.

Give T_SOCKET its own direct-access rule instead of pretending it is one
of the existing pointer kinds:

- Introduce a generic EbpfStructFieldDescriptor/EbpfStructDescriptor
  typed-memory access model (src/spec/type_descriptors.hpp) and describe
  the safe common bpf_sock field subset with it. The existing packet-
  pointer ctx-write overlap logic is refactored through the same
  write_may_touch_readonly_field helper.
- Split TypeGroup::pointer (ctx|packet|stack|shared, region pointers with
  modeled arithmetic) from a new TypeGroup::dereferenceable
  (+socket +alloc_mem), whose members are load/store-checkable.
- Socket memory is read-only, precise-offset, in-struct-bounds, and
  null-checked unless or_null; contents remain havoced. The kernel's
  32-bit read at dst_port is modeled via extra_read_width_at_start.
- Atomics now gate on dereferenceable and havoc r0/src for non-stack
  memory, so T_ALLOC_MEM fetch/CMPXCHG no longer leave stale constants;
  atomic writes to a read-only socket are still rejected.
- Initialize socket_offset for socket-returning helpers so later access
  checks do not depend on stale or absent kind facts.

Part of the #1152 stack; does not close #1152 by itself.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Elazar Gershuni <elazarg@gmail.com>

60 of 64 new or added lines in 4 files covered. (93.75%)

3 existing lines in 2 files now uncovered.

9313 of 10748 relevant lines covered (86.65%)

6391920.93 hits per line

Uncovered Changes

Lines Coverage ∆ File
4
89.29
0.09% src/crab/ebpf_checker.cpp

Coverage Regressions

Lines Coverage ∆ File
2
89.29
0.09% src/crab/ebpf_checker.cpp
1
91.53
0.39% src/crab/type_domain.cpp
Jobs
ID Job ID Ran Files Coverage
1 run-Release - 29018859372.1 09 Jul 2026 12:56PM UTC 79
85.76
GitHub Action Run
2 run-Debug - 29018859372.2 09 Jul 2026 01:50PM UTC 77
84.91
GitHub Action Run
Source Files on build 29018859372
  • Tree
  • List 79
  • Changed 8
  • Source Changed 8
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #29018859372
  • 697f5808 on github
  • Prev Build on main (#28980383561)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc