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

Dmitry V. Levin ldv at altlinux.org
Sat Nov 1 00:52:19 UTC 2014


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.
> 
> Further, the decoding of SIOCSIFNAME is incorrect.  It does not use
> the ifr_index field to look things up, but ifr_name.

I've split your commit into %.*s fix and ifr_newname fix, and
added a change that moves SIOCSIFNAME decoding on entering syscall.


-- 
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20141101/1e505391/attachment.bin>


More information about the Strace-devel mailing list