Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2117082pxb; Mon, 12 Apr 2021 15:03:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxNT23VkTRdGW/4jttGif887W6uUKjJUsFXoKhA8s7dUNvWBZwnPeCrcdV7csWB6li0XRAL X-Received: by 2002:a17:902:b595:b029:e9:8c2:1d13 with SMTP id a21-20020a170902b595b02900e908c21d13mr28346063pls.81.1618265034954; Mon, 12 Apr 2021 15:03:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618265034; cv=none; d=google.com; s=arc-20160816; b=K7Ml6e+Sen9+vONoFhNdcUChYqcTfy5jQ889qxgx+f8MTJAYkXGOWolG+BTr/AzZTz eatgB4mq7ai+1HvhFCNABaOvgdInoAxokGIq/wNFmCNDudLeXtun5H/Jp6NQ6EhHUoVq mRKnO2Fma86qT9njpYntccfKzzJUlz0nSvUV8rZ8Cxyr+9QPqkCMi/EHyTryuwSX8/h6 oYVoa5GJ5NymhcDpPutY8d3DMr3jA7ecmZ6gFTPv4ZP1t75BcfQ8ycuAqZdUhUGfCAnX vk69MXe+C+GI36H/FF27nQkHfV+QbdfhCfSRVzVidfXGXRWeoMeu/MNup58jBAA8H5OH LaMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=lo2jfOooG5X8roOxpuwLYU9AqrKqw21++Se5x/ATuEk=; b=03l/rhPnqBnL3aAQakBQ+IcMPRlKZNgMqCt1TlCY0XVE3qek7eNwcDDkVJFqDrznzf u5IJ3q5GtvHGm9KRDZFThmBIEutKGXCAOFAjsOChGyhOzR/6MSIMaMVrPxomFOTdT7ok +wZ59s2HuW39YYin9Wt21qfbt5AE85mhckbtUFxNqAVLM6WjuJgeCIYwXuRzfIUPTDn6 h9CTAgPM2gf4QWaWMKswXMN1A9/AudIzuSeHjRjTQfQAxZUAdx5vAtphAjP9MT7DeUnE mbSQciYVCdpuyQy7szMXe5t2iS0tpQmlBNcelftlAa2B+oX+ZnmwXiPsv3ume3FA4qtg mRZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=2d6XuBDu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b22si12640106pls.311.2021.04.12.15.03.41; Mon, 12 Apr 2021 15:03:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=2d6XuBDu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240561AbhDLJYQ (ORCPT + 99 others); Mon, 12 Apr 2021 05:24:16 -0400 Received: from mail.kernel.org ([198.145.29.99]:54804 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239935AbhDLJBh (ORCPT ); Mon, 12 Apr 2021 05:01:37 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 366896137E; Mon, 12 Apr 2021 09:00:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1618218014; bh=AxxdtXcQRUXP50O51SwsTK8pIMX515haWbhWzuI/2rs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2d6XuBDuXt7HUDZuD0qZvYWFFQ06t6EfH/SlYt0ty3kHzBmssgwRtkLKxY48ydNLe BC/+BRc+rC6l60DVvUUHdlkGtrNL4ao0nBzdIVnZsitiQTRIuQ9u2axUV9qarRjkop G0H6Dwp1lWxMptR4Kc+BUTkJm4GpHJYs2C5hlVIw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, syzbot , Tetsuo Handa , Sven Eckelmann , "David S. Miller" Subject: [PATCH 5.11 039/210] batman-adv: initialize "struct batadv_tvlv_tt_vlan_data"->reserved field Date: Mon, 12 Apr 2021 10:39:04 +0200 Message-Id: <20210412084017.309967576@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210412084016.009884719@linuxfoundation.org> References: <20210412084016.009884719@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Tetsuo Handa commit 08c27f3322fec11950b8f1384aa0f3b11d028528 upstream. KMSAN found uninitialized value at batadv_tt_prepare_tvlv_local_data() [1], for commit ced72933a5e8ab52 ("batman-adv: use CRC32C instead of CRC16 in TT code") inserted 'reserved' field into "struct batadv_tvlv_tt_data" and commit 7ea7b4a142758dea ("batman-adv: make the TT CRC logic VLAN specific") moved that field to "struct batadv_tvlv_tt_vlan_data" but left that field uninitialized. [1] https://syzkaller.appspot.com/bug?id=07f3e6dba96f0eb3cabab986adcd8a58b9bdbe9d Reported-by: syzbot Tested-by: syzbot Signed-off-by: Tetsuo Handa Fixes: ced72933a5e8ab52 ("batman-adv: use CRC32C instead of CRC16 in TT code") Fixes: 7ea7b4a142758dea ("batman-adv: make the TT CRC logic VLAN specific") Acked-by: Sven Eckelmann Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- net/batman-adv/translation-table.c | 2 ++ 1 file changed, 2 insertions(+) --- a/net/batman-adv/translation-table.c +++ b/net/batman-adv/translation-table.c @@ -890,6 +890,7 @@ batadv_tt_prepare_tvlv_global_data(struc hlist_for_each_entry(vlan, &orig_node->vlan_list, list) { tt_vlan->vid = htons(vlan->vid); tt_vlan->crc = htonl(vlan->tt.crc); + tt_vlan->reserved = 0; tt_vlan++; } @@ -973,6 +974,7 @@ batadv_tt_prepare_tvlv_local_data(struct tt_vlan->vid = htons(vlan->vid); tt_vlan->crc = htonl(vlan->tt.crc); + tt_vlan->reserved = 0; tt_vlan++; }