NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/60975: NPF rules are almost never BPF JIT compiled since 2014



>Number:         60975
>Category:       kern
>Synopsis:       NPF rules are almost never BPF JIT compiled since 2014
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Nov 06 22:45:00 +0000 2026
>Originator:     Emmanuel Nyarko
>Release:        NetBSD 11
>Organization:
NetBSD
>Environment:
NetBSD  11.0_STABLE NetBSD 11.0_STABLE 
>Description:

wrong size is passed to npf_bpf_compile. the compile function expects a instruction size count 
but the byte count of the nvlist blob is what is sent to BPF JIT.

This almost always leads to RET instructions not falling on the last BPF code
or random crashes rules count are more than the blob size.


so setting bpf jit to 1 or on almost always sets it back to BPF interpretion or crash with some randomly odd number of rules.
>How-To-Repeat:


code inspection.
>Fix:

Yes please.




Home | Main Index | Thread Index | Old Index