Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756669AbcCBBd5 (ORCPT ); Tue, 1 Mar 2016 20:33:57 -0500 Received: from mail333.us4.mandrillapp.com ([205.201.137.77]:34623 "EHLO mail333.us4.mandrillapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754838AbcCAXy2 (ORCPT ); Tue, 1 Mar 2016 18:54:28 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; q=dns; s=mandrill; d=linuxfoundation.org; b=DMeL/eozWkVqbxQHMTE7zvclX68ckm+ccW6OZmuvmExy+6OlQu/YZBWWtoXPm+s6uKsIgjMaTR4w fk0tIwHZ9PFdKTPx7Gk1iIp9pRfDnr0VNR/eA55IrXLJL8O9g2mueo7ipGpgFdDgHvsauDJsRQnu rjD8bCn4d/RCIGqzFvk=; From: Greg Kroah-Hartman Subject: [PATCH 4.4 001/342] af_iucv: Validate socket address length in iucv_sock_bind() X-Mailer: git-send-email 2.7.2 To: Cc: Greg Kroah-Hartman , , Ursula Braun , Dmitry Vyukov , Evgeny Cherkashin , "David S. Miller" Message-Id: <20160301234528.040481709@linuxfoundation.org> In-Reply-To: <20160301234527.990448862@linuxfoundation.org> References: <20160301234527.990448862@linuxfoundation.org> X-Report-Abuse: Please forward a copy of this message, including all headers, to abuse@mandrill.com X-Report-Abuse: You can also report abuse here: http://mandrillapp.com/contact/abuse?id=30481620.73508cfc53ef4b539426f54d2c3634b9 X-Mandrill-User: md_30481620 Date: Tue, 01 Mar 2016 23:53:46 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 863 Lines: 29 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Ursula Braun [ Upstream commit 52a82e23b9f2a9e1d429c5207f8575784290d008 ] Signed-off-by: Ursula Braun Reported-by: Dmitry Vyukov Reviewed-by: Evgeny Cherkashin Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- net/iucv/af_iucv.c | 3 +++ 1 file changed, 3 insertions(+) --- a/net/iucv/af_iucv.c +++ b/net/iucv/af_iucv.c @@ -708,6 +708,9 @@ static int iucv_sock_bind(struct socket if (!addr || addr->sa_family != AF_IUCV) return -EINVAL; + if (addr_len < sizeof(struct sockaddr_iucv)) + return -EINVAL; + lock_sock(sk); if (sk->sk_state != IUCV_OPEN) { err = -EBADFD;