From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.6 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 40F39C43387 for ; Mon, 7 Jan 2019 13:16:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 074DA2089F for ; Mon, 7 Jan 2019 13:16:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1546867007; bh=nMuzbzMe/17TEeFCXRc/9oNbvVHa7eDdHRIB9ar5BYE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=0XCiD7K/Wyq98251d+j29AC5lpOId4vdScpMQ5GBTybf94jjF3T2kLr8CJmQixU7L UC3qvVrWtiqb15ccWBenx1NHJaKAnxmZLdgY575g9+wE2CdNOGOz6Uu2ddYo7CxEO3 QjPEady1fA8en4Mxs7GcxbtBw1ym6ZmmRR8B9p/Y= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730192AbfAGNAg (ORCPT ); Mon, 7 Jan 2019 08:00:36 -0500 Received: from mail.kernel.org ([198.145.29.99]:48070 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729992AbfAGNAe (ORCPT ); Mon, 7 Jan 2019 08:00:34 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.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 55CE62089F; Mon, 7 Jan 2019 13:00:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1546866033; bh=nMuzbzMe/17TEeFCXRc/9oNbvVHa7eDdHRIB9ar5BYE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=B1Wgp2wEx/m6Cr94YZz2fE2MPyIMy+1YRrqHXXd9gglye2fzQ/ZpE/fYMfuzin1r3 0wN8JMK5HiUPsoGEZAVUCLzqBttubf2X15UWKRHldczqYWfwkIQuuHTbonRnTQtA3M qpEZgIBPpmvPqy1+0PJfOENTYW86BDeMj7taAsFs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ying Xue , Jon Maloy , Cong Wang , "David S. Miller" , syzbot+eae585ba2cc2752d3704@syzkaller.appspotmail.com Subject: [PATCH 4.14 023/101] tipc: fix a double kfree_skb() Date: Mon, 7 Jan 2019 13:32:11 +0100 Message-Id: <20190107105334.213273968@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190107105330.372621917@linuxfoundation.org> References: <20190107105330.372621917@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Cong Wang [ Upstream commit acb4a33e9856d5fa3384b87d3d8369229be06d31 ] tipc_udp_xmit() drops the packet on error, there is no need to drop it again. Fixes: ef20cd4dd163 ("tipc: introduce UDP replicast") Reported-and-tested-by: syzbot+eae585ba2cc2752d3704@syzkaller.appspotmail.com Cc: Ying Xue Cc: Jon Maloy Signed-off-by: Cong Wang Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- net/tipc/udp_media.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) --- a/net/tipc/udp_media.c +++ b/net/tipc/udp_media.c @@ -243,10 +243,8 @@ static int tipc_udp_send_msg(struct net } err = tipc_udp_xmit(net, _skb, ub, src, &rcast->addr); - if (err) { - kfree_skb(_skb); + if (err) goto out; - } } err = 0; out: