Page MenuHomeFreeBSD

if_vxlan(4): Check the size of data available in mbuf before using them
ClosedPublic

Authored by zlei on Sep 29 2022, 2:08 PM.
Referenced Files
Unknown Object (File)
Tue, Sep 23, 6:34 AM
Unknown Object (File)
Tue, Sep 16, 5:44 AM
Unknown Object (File)
Fri, Sep 12, 4:22 PM
Unknown Object (File)
Aug 19 2025, 4:45 AM
Unknown Object (File)
Aug 15 2025, 9:24 PM
Unknown Object (File)
Aug 12 2025, 1:24 PM
Unknown Object (File)
Jul 1 2025, 7:36 PM
Unknown Object (File)
Jun 30 2025, 8:59 PM

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

zlei requested review of this revision.Sep 29 2022, 2:08 PM
sys/net/if_vxlan.c
2852

Check it lazily may be better, i.e. after checking if running status.

This looks sane to me. We really do have to make sure there's enough contiguous data before we access it.

sys/net/if_vxlan.c
2852

I'm not sure it's worth having this check. m_pullup() simply won't do anything if the mbuf already has sufficient contiguous space.

sys/net/if_vxlan.c
2852

VXLAN over wireguard or some other setups that have deeper tunnels should be rare.
The m_pullup() is not defined as a macro or an inline function, thus a pre-check should be valuable.

This revision is now accepted and ready to land.Sep 30 2022, 9:54 AM