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)
Wed, Sep 9, 2:17 AM
Unknown Object (File)
Tue, Sep 8, 7:14 AM
Unknown Object (File)
Tue, Sep 8, 1:03 AM
Unknown Object (File)
Sun, Sep 6, 4:09 PM
Unknown Object (File)
Sun, Sep 6, 6:00 AM
Unknown Object (File)
Sun, Sep 6, 2:11 AM
Unknown Object (File)
Sat, Sep 5, 11:35 AM
Unknown Object (File)
Sat, Sep 5, 6:36 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