Re: [PATCH v2] socket: fix struct ifreq size in compat ioctl

2018-09-13 Thread David Miller
From: Johannes Berg Date: Thu, 13 Sep 2018 14:40:55 +0200 > From: Johannes Berg > > As reported by Reobert O'Callahan, since Viro's commit to kill > dev_ifsioc() we attempt to copy too much data in compat mode, > which may lead to EFAULT when the 32-bit version of struct ifreq > sits at/near th

[PATCH v2] socket: fix struct ifreq size in compat ioctl

2018-09-13 Thread Johannes Berg
From: Johannes Berg As reported by Reobert O'Callahan, since Viro's commit to kill dev_ifsioc() we attempt to copy too much data in compat mode, which may lead to EFAULT when the 32-bit version of struct ifreq sits at/near the end of a page boundary, and the next page isn't mapped. Fix this by p