Page MenuHomeFreeBSD

ifconf(): Always zero the whole struct ifreq.
ClosedPublic

Authored by brooks on Mar 30 2018, 10:09 PM.
Tags
None
Referenced Files
F135109493: D14912.id40928.diff
Thu, Nov 6, 2:00 PM
Unknown Object (File)
Mon, Oct 20, 2:05 PM
Unknown Object (File)
Mon, Oct 20, 2:05 PM
Unknown Object (File)
Mon, Oct 20, 2:05 PM
Unknown Object (File)
Mon, Oct 20, 12:24 AM
Unknown Object (File)
Fri, Oct 10, 8:54 PM
Unknown Object (File)
Thu, Oct 9, 1:57 AM
Unknown Object (File)
Oct 1 2025, 12:20 AM
Subscribers

Details

Summary

The previous split of zeroing ifr_name and ifr_addr seperately is safe
on current architectures, but would be unsafe if pointers were larger
than 8 bytes. Combining the zeroing adds no real cost (a few
instructions) and makes the security property easier to verify.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable