]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/commit
MFC r309027:
authorbrooks <brooks@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Wed, 30 Nov 2016 01:41:40 +0000 (01:41 +0000)
committerbrooks <brooks@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Wed, 30 Nov 2016 01:41:40 +0000 (01:41 +0000)
commita31d90f845b8cb7218812c0681c46b556566d90a
tree5d1b603e525cbe12a5f6898ef47279f9716c7e6f
parent9d3c3db98608b7987ca2e1c1be302b2fedb4b1b4
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/9@309305 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sbin/dhclient/dispatch.c