[PATCH v2] net: ping: check minimum size on ICMP header length

2016-12-05 Thread Kees Cook
Prior to commit c0371da6047a ("put iov_iter into msghdr") in v3.19, there was no check that the iovec contained enough bytes for an ICMP header, and the read loop would walk across neighboring stack contents. Since the iov_iter conversion, bad arguments are noticed, but the returned error is EFAULT

Re: [PATCH v2] net: ping: check minimum size on ICMP header length

2016-12-05 Thread David Miller
From: Kees Cook Date: Mon, 5 Dec 2016 10:34:38 -0800 > Prior to commit c0371da6047a ("put iov_iter into msghdr") in v3.19, there > was no check that the iovec contained enough bytes for an ICMP header, > and the read loop would walk across neighboring stack contents. Since the > iov_iter conversi