Page MenuHomeFreeBSD

ipfilter: Interface name must not extend beyond end of buffer
Needs ReviewPublic

Authored by cy on Feb 5 2026, 5:50 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, May 17, 12:17 AM
Unknown Object (File)
Sun, May 17, 12:17 AM
Unknown Object (File)
Tue, Apr 28, 8:25 AM
Unknown Object (File)
Sun, Apr 26, 3:19 PM
Unknown Object (File)
Apr 17 2026, 10:30 AM
Unknown Object (File)
Apr 15 2026, 11:29 AM
Unknown Object (File)
Apr 14 2026, 11:43 PM
Unknown Object (File)
Apr 5 2026, 4:38 PM

Details

Summary

sifpidx (an interface name) cannot extend beyond the end of the
fr_names buffer.

We do the validation for fr_sifpidx here because it is a union that
contains an offset only when fr_sifpidx points to an interface name,
an offset into fr_names. The union is an offset into fr_names in this
case only.

interr_tbl now becomes a static variable outside a function to facilitate
its use by two functins within fil.c

Note that sifpidx is only used in ipf_sync() which implments ipf -y.

Reported by: Ilja Van Sprundel <ivansprundel@ioactive.com>
MFC after: 1 week

Diff Detail

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