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)
Sat, Apr 19, 3:40 AM
Unknown Object (File)
Mon, Apr 14, 8:30 AM
Unknown Object (File)
Mon, Apr 14, 3:47 AM
Unknown Object (File)
Mon, Apr 14, 12:48 AM
Unknown Object (File)
Sun, Apr 13, 11:37 PM
Unknown Object (File)
Wed, Apr 9, 11:12 AM
Unknown Object (File)
Wed, Apr 9, 11:12 AM
Unknown Object (File)
Tue, Apr 1, 2:52 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