]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r309027:
authorbrooks <brooks@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Wed, 30 Nov 2016 01:22:12 +0000 (01:22 +0000)
committerbrooks <brooks@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Wed, 30 Nov 2016 01:22:12 +0000 (01:22 +0000)
commit5725d1304d0d9cf314e774b0a68f0596f8f787c1
treef67908952970fbcc4bcc47d7ea76d23d358975ba
parente7650ff7a9f7e19cbceff53ff8e723c2e1838b0b
MFC r309027:

Allocate a struct ifreq rather than using a (wrong) computed size for
the BIOCSETIF ioctl.

The kernel always copies an entire struct ifreq and IPv4 addresses will
always fit in an ifreq.

On systems with pointers larger than 64-bits, the computed size will be
less than the size of struct ifreq, potentially resulting in the kernel
attempting to copyin memory from outside the allocation.

Reviewed by: jhb
Obtained from: CheriBSD
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D8445

git-svn-id: svn://svn.freebsd.org/base/stable/10@309304 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sbin/dhclient/dispatch.c