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)
Thu, Aug 13, 9:17 PM
Unknown Object (File)
Mon, Aug 10, 4:09 AM
Unknown Object (File)
Sat, Aug 8, 6:56 AM
Unknown Object (File)
Mon, Aug 3, 1:54 AM
Unknown Object (File)
Tue, Jul 21, 5:43 PM
Unknown Object (File)
Mon, Jul 20, 11:37 PM
Unknown Object (File)
Jul 7 2026, 11:32 AM
Unknown Object (File)
Jul 5 2026, 7:03 AM

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