Re: [PATCH v2] sock: clean up handling of ifr_name/ifr_newname

2014-10-31 Thread Dmitry V. Levin
Hi, On Tue, Oct 21, 2014 at 08:34:08AM -0400, Mike Frysinger wrote: > The ifr name fields of the ifreq structure might not be NUL terminated. > If the user makes an ioctl call where they aren't, then strace ends up > reading random content from its own stack. Limit the printf lengths. > > Furthe

[PATCH v2] sock: clean up handling of ifr_name/ifr_newname

2014-10-21 Thread Mike Frysinger
The ifr name fields of the ifreq structure might not be NUL terminated. If the user makes an ioctl call where they aren't, then strace ends up reading random content from its own stack. Limit the printf lengths. Further, the decoding of SIOCSIFNAME is incorrect. It does not use the ifr_index fie