Page MenuHomeFreeBSD

dhclient: correct struct ifreq allocation
ClosedPublic

Authored by brooks on Jun 28 2024, 2:08 PM.
Tags
None
Referenced Files
F166853225: D45769.id.diff
Mon, Aug 17, 3:33 AM
Unknown Object (File)
Thu, Aug 13, 4:39 AM
Unknown Object (File)
Thu, Aug 13, 12:05 AM
Unknown Object (File)
Tue, Aug 11, 3:01 AM
Unknown Object (File)
Sat, Aug 8, 6:34 PM
Unknown Object (File)
Sat, Aug 8, 2:27 PM
Unknown Object (File)
Sat, Aug 8, 1:19 PM
Unknown Object (File)
Sat, Aug 8, 3:56 AM
Subscribers

Details

Summary

ioctl commands such as BIOCSETIF take a struct ifreq and due to
FreeBSD's ioctl implementation copy exactly sizeof(struct ifreq) bytes
in so allocate exactly that much space.

The over-allocaton was harmless, but useless.

Reported by: def
Fixes: e2dc8d789f68a dhclient: do not add 0.0.0.0 interface alias.
Sponsored by: DARPA, AFRL

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 58385
Build 55273: arc lint + arc unit

Event Timeline

This was previously been fixed in f2c99d387c4770a7516237d5829b140e41a748d9 where the under allocation was potentially not harmless.

This revision is now accepted and ready to land.Jun 28 2024, 2:19 PM
This revision was automatically updated to reflect the committed changes.