Page MenuHomeFreeBSD

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

Authored by brooks on Mar 30 2018, 10:09 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Oct 10, 8:54 PM
Unknown Object (File)
Thu, Oct 9, 1:57 AM
Unknown Object (File)
Wed, Oct 1, 12:20 AM
Unknown Object (File)
Sep 11 2025, 3:54 PM
Unknown Object (File)
Jul 27 2025, 1:51 AM
Unknown Object (File)
Jul 18 2025, 12:58 AM
Unknown Object (File)
Jul 7 2025, 11:09 AM
Unknown Object (File)
Jun 22 2025, 12:57 PM
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