Page MenuHomeFreeBSD

igb(4): Fix out-of-bounds register access on VFs
ClosedPublic

Authored by kgalazka on Oct 8 2025, 8:10 AM.
Tags
None
Referenced Files
F164577885: D52976.id164999.diff
Sun, Aug 2, 4:35 AM
F164552917: D52976.id164700.diff
Sun, Aug 2, 1:40 AM
Unknown Object (File)
Sat, Aug 1, 5:39 AM
Unknown Object (File)
Sat, Aug 1, 12:01 AM
Unknown Object (File)
Fri, Jul 31, 5:33 AM
Unknown Object (File)
Thu, Jul 30, 12:50 AM
Unknown Object (File)
Mon, Jul 27, 5:05 AM
Unknown Object (File)
Sat, Jul 25, 1:53 PM

Details

Summary

Virtual Functions have access to a limited number of registers,
and their bus space size is lower. Use KASSERT to detect out-of-bounds
access and eliminate them to avoid kernel panics in production
environment.

Signed-off-by: Krzysztof Galazka <krzysztof.galazka@intel.com>

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 67639
Build 64522: arc lint + arc unit

Event Timeline

Wake-on-Lan configuration is not available for VFs.

sys/dev/e1000/if_em.c
1585

I wish these checks against !sc->vf_ifp were replaced with something like a E1000_IS_VF() macro, but is that what that check is for?

4380

Interesting...?

green light from validation point of view

This revision is now accepted and ready to land.Oct 23 2025, 10:46 AM
sys/dev/e1000/if_em.c
1585

Yeah, I was thinking about some refactoring, but I would prefer to do it as separate patch if you don't mind.

erj added inline comments.
sys/dev/e1000/if_em.c
1585

Sure.