Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3816596ybi; Mon, 29 Jul 2019 13:11:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqw7wLhVwGyI0aGbo3tymV0Zo2FKGjplrv8TU5f6SaqOdrvQq6mP94S+8TRZfKIGpyIOM32B X-Received: by 2002:a62:e815:: with SMTP id c21mr39815162pfi.244.1564431090581; Mon, 29 Jul 2019 13:11:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564431090; cv=none; d=google.com; s=arc-20160816; b=AvZjNCWx28/FwM9FLOWpb/Zk3nOhKh3nnb7xScuTYwDL1QWMlh0gRolGq15d8aEaOj FWgXxf560ezluexiPONDgn6qHz/QRMPTe2TGmgFA1NrVq+lb+hzPdGPx6zPAPdRKECO5 sryrWUoX19XZfY6X89EVXwGfO3QEZBilHpai5ZDvhVPvQYdn/qGbs4hOStnj2RkX8Msd mtr8m8YtMsC0SarNoYcDKOmgAU6BYZh6HyOiNxcVuU2EeQDMKRMSIjHnM9Q7pMWctjuH 8/94KVtHGJaWjdilSVqcgGtsFCO5Ld40eAwAMvHDO5gI+vh6MIbvCwALEWsbYxxAZHM2 AlwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ARUU7s5IzNub8fqaQO2k6zbmkAilKAl/X/5RNkDcRJk=; b=nD/vUwu9IZjxyIe8U7C+v4KaBUxZeQ+pUSU/LZwiA/JgjnbagSYmK7SNpsYR3vd9/U oJN8CnaJMNbgu0kyttulQtVwRsFGkBtnltWXXASZdQd/T4nFufkkfZBOuFsU8R9hqDMN MLojweLKFV8jJ/urk428qJXmFkTChlNcS31l592bKxfXvG4JwhC/9TFTUN9z2y1VluVH eGSaL71FAatr1lv9oq6EfH3iqoV8rcFt5cp6XN305mrnygwlIMe2BZEqTOH6pSX+ttMY q9HUXPxyqxF0LeGao1a+AlAkdST9FP73jM1k0BPNbvQJjto6YtzsHtjD+n8goX5okjAi p/Sg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=d40CFrdh; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ck13si24499866pjb.47.2019.07.29.13.11.15; Mon, 29 Jul 2019 13:11:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=d40CFrdh; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729485AbfG2Tf2 (ORCPT + 99 others); Mon, 29 Jul 2019 15:35:28 -0400 Received: from mail.kernel.org ([198.145.29.99]:49784 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388522AbfG2TfZ (ORCPT ); Mon, 29 Jul 2019 15:35:25 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3084D2070B; Mon, 29 Jul 2019 19:35:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564428924; bh=NZBYPz9/upGof+pf+7aPQwh2oUQ15oTbaqLDqA5xc1U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=d40CFrdhmvYe5bbr++SM/BhAHinpULqKVz5Hk8ss1HsHr3VbHnSjJQLdqzlRBREt3 bRTTM7TOK/on8XXEoBBrowasy3UY/WdaB0kIRwZIddk1BklHtNQynzJNXAw/quZ2ac bE1N4W9ChPtj5lmdjTNBx9kvIhnYXlxUJs1cMDi0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Yang Wei , "David S. Miller" Subject: [PATCH 4.14 190/293] nfc: fix potential illegal memory access Date: Mon, 29 Jul 2019 21:21:21 +0200 Message-Id: <20190729190839.038041809@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190729190820.321094988@linuxfoundation.org> References: <20190729190820.321094988@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Yang Wei [ Upstream commit dd006fc434e107ef90f7de0db9907cbc1c521645 ] The frags_q is not properly initialized, it may result in illegal memory access when conn_info is NULL. The "goto free_exit" should be replaced by "goto exit". Signed-off-by: Yang Wei Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- net/nfc/nci/data.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/net/nfc/nci/data.c +++ b/net/nfc/nci/data.c @@ -119,7 +119,7 @@ static int nci_queue_tx_data_frags(struc conn_info = nci_get_conn_info_by_conn_id(ndev, conn_id); if (!conn_info) { rc = -EPROTO; - goto free_exit; + goto exit; } __skb_queue_head_init(&frags_q);