Received: by 2002:a25:d783:0:0:0:0:0 with SMTP id o125csp646043ybg; Thu, 19 Mar 2020 06:20:56 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsEb2xXXmFBMFVzmajszCB3PBzOHcXF/LlrveKyYqgNOCcgQ/mCOKjvIyopemSOiK+Z34et X-Received: by 2002:a54:468a:: with SMTP id k10mr2328919oic.3.1584624055868; Thu, 19 Mar 2020 06:20:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584624055; cv=none; d=google.com; s=arc-20160816; b=pY+uW5H5gan+p5QPscQzcQfKqm5CoKSXo+tiaCigGlaqqkTe1Bm2V3CevrlPXZo+Av u81ABSw3sfV4eu6+YmDyS+lbHQ3dIe8DXP9kZq8SostBOKAqhZ41DuEczE8LET92AGRy Zb4Ci6Ja/Y62HVeJuzER+afKVwIMilI/6GSVoNz/hj09X/26jnXFnRGq9KhpsJbDv10+ u26OQ5R/I8lZbBjAxB7Z/KEIB7gRpXasuSF3sPrPlGgBkoFQ1x70tOg0pHobiyxmTz4n z+x85GUuxabB5yQhZpbx1KTQE20up0tdEGS5Ucq2+US47a+DE6vPHkhL8O+WeiZXgIz3 26gw== 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=Qn11RiHs2pBZTAn2S1dTKc7v+xbv0fyW0ixUGmJjpTk=; b=ecJk/+CSUKUpLI0fOVfA/KKblvQvrj3l84k799t/z/sPBiwVjIQU+jS3Y9WG6kcdSS jkJ9nrHah4lUxlcuL2DvIK3PI1k6ebQUOwIc8YSjNsvGojwYYX0lo+bJMRQtN6GZPkEn 6ruYZZVk7rTzFdGQ3JAF3awCIzQXDa0oXMRlmaUWgZyE9ShZTUhfqVPxYEvmByo0Wgp1 wnVov/Bp7NnmmleMh2Yt54+omMlhryNNl7v3cVroyoe3GlxiJOhSaKD6Lbvke5Aw4vQb q/szkmDItpln45E5WZfHHn0l7f5tg9RtLMup8khdaemXwgPfvM1tF+YWHo/4eeq+si2r 04sg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="Q3f642/Q"; 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 z11si1053747oix.138.2020.03.19.06.20.43; Thu, 19 Mar 2020 06:20:55 -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="Q3f642/Q"; 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 S1728942AbgCSNTI (ORCPT + 99 others); Thu, 19 Mar 2020 09:19:08 -0400 Received: from mail.kernel.org ([198.145.29.99]:41914 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728095AbgCSNTA (ORCPT ); Thu, 19 Mar 2020 09:19:00 -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 98E73206D7; Thu, 19 Mar 2020 13:18:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1584623940; bh=lRTZN2oE+b/mRMO0TruZEH4BhQHL7dCEFWIEA4m/xVI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Q3f642/QMPsVyoheIFjc2fuf/CCe9KfjaqvGqACeasF+OKK4dZb9AAe1xHdRm5m38 bjVisJO4X3pU1+h22vHofbeW9eWta5t3C8VkFkaCZ+Gye/gcTQiKi0ZpreXLDhfV5J Om5IAtm0T6OHjRfpId8dNR7MpKhpR7etDAmXzpf8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Greg Kroah-Hartman , Sven Eckelmann , Simon Wunderlich Subject: [PATCH 4.14 68/99] batman-adv: Always initialize fragment header priority Date: Thu, 19 Mar 2020 14:03:46 +0100 Message-Id: <20200319124001.868359273@linuxfoundation.org> X-Mailer: git-send-email 2.25.2 In-Reply-To: <20200319123941.630731708@linuxfoundation.org> References: <20200319123941.630731708@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: Sven Eckelmann commit fe77d8257c4d838c5976557ddb87bd789f312412 upstream. The batman-adv unuicast fragment header contains 3 bits for the priority of the packet. These bits will be initialized when the skb->priority contains a value between 256 and 263. But otherwise, the uninitialized bits from the stack will be used. Fixes: c0f25c802b33 ("batman-adv: Include frame priority in fragment header") Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich Signed-off-by: Greg Kroah-Hartman --- net/batman-adv/fragmentation.c | 2 ++ 1 file changed, 2 insertions(+) --- a/net/batman-adv/fragmentation.c +++ b/net/batman-adv/fragmentation.c @@ -500,6 +500,8 @@ int batadv_frag_send_packet(struct sk_bu */ if (skb->priority >= 256 && skb->priority <= 263) frag_header.priority = skb->priority - 256; + else + frag_header.priority = 0; ether_addr_copy(frag_header.orig, primary_if->net_dev->dev_addr); ether_addr_copy(frag_header.dest, orig_node->orig);