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)
Fri, Sep 11, 4:19 AM
Unknown Object (File)
Mon, Sep 7, 4:07 AM
Unknown Object (File)
Sat, Sep 5, 7:29 PM
Unknown Object (File)
Sat, Sep 5, 7:29 PM
Unknown Object (File)
Sat, Sep 5, 3:25 PM
Unknown Object (File)
Sat, Sep 5, 3:03 PM
Unknown Object (File)
Fri, Sep 4, 11:33 PM
Unknown Object (File)
Fri, Sep 4, 10:31 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