]> granicus.if.org Git - strace/commit
sock: fix decoding of struct ifreq.ifr_name
authorMike Frysinger <vapier@gentoo.org>
Tue, 21 Oct 2014 12:34:08 +0000 (08:34 -0400)
committerDmitry V. Levin <ldv@altlinux.org>
Fri, 31 Oct 2014 15:17:31 +0000 (15:17 +0000)
commit8b5fbeea993f63d15d88f58693eaf0bb207907ef
tree7248f6f252040c2c3469ada00cbdb211e60b20d9
parent22e34b98578b8fab6be7fb608579e4fc601b2ed0
sock: fix decoding of struct ifreq.ifr_name

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.

* sock.c (sock_ioctl): Add explicit length limits to ifr_name printfs.
sock.c