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
F86156783: D36794.id.diff
Sun, Jun 16, 7:16 AM
Unknown Object (File)
Thu, Jun 6, 4:47 PM
Unknown Object (File)
Mon, May 27, 2:21 PM
Unknown Object (File)
May 11 2024, 10:59 PM
Unknown Object (File)
Feb 9 2024, 3:51 AM
Unknown Object (File)
Dec 23 2023, 1:25 AM
Unknown Object (File)
Dec 12 2023, 12:12 PM
Unknown Object (File)
Oct 9 2023, 4:24 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