From: Sven Eckelmann <sven@narfation.org>
To: Marek Lindner <mareklindner@neomailbox.ch>,
Simon Wunderlich <sw@simonwunderlich.de>,
Antonio Quartulli <a@unstable.cc>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Cc: netdev@vger.kernel.org,
Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Subject: Re: [PATCH v2] batman-adv: initialize "struct batadv_tvlv_tt_vlan_data"->reserved field
Date: Mon, 05 Apr 2021 13:09:36 +0200 [thread overview]
Message-ID: <5561744.yYbohhxq0P@sven-l14> (raw)
In-Reply-To: <20210405101650.6779-1-penguin-kernel@I-love.SAKURA.ne.jp>
[-- Attachment #1: Type: text/plain, Size: 1801 bytes --]
On Monday, 5 April 2021 12:16:50 CEST Tetsuo Handa wrote:
> 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 <syzbot+50ee810676e6a089487b@syzkaller.appspotmail.com>
> Tested-by: syzbot <syzbot+50ee810676e6a089487b@syzkaller.appspotmail.com>
> Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
> Fixes: ced72933a5e8ab52 ("batman-adv: use CRC32C instead of CRC16 in TT code")
> Fixes: 7ea7b4a142758dea ("batman-adv: make the TT CRC logic VLAN specific")
> ---
> net/batman-adv/translation-table.c | 2 ++
> 1 file changed, 2 insertions(+)
Thanks,
Acked-by: Sven Eckelmann <sven@narfation.org>
> diff --git a/net/batman-adv/translation-table.c b/net/batman-adv/translation-table.c
> index f8761281aab0..434b4f042909 100644
> --- a/net/batman-adv/translation-table.c
> +++ b/net/batman-adv/translation-table.c
> @@ -890,6 +890,7 @@ batadv_tt_prepare_tvlv_global_data(struct batadv_orig_node *orig_node,
> 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 batadv_priv *bat_priv,
>
> tt_vlan->vid = htons(vlan->vid);
> tt_vlan->crc = htonl(vlan->tt.crc);
> + tt_vlan->reserved = 0;
>
> tt_vlan++;
> }
>
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2021-04-05 11:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-05 5:33 [PATCH] batman-adv: initialize "struct batadv_tvlv_tt_vlan_data"->reserved field Tetsuo Handa
2021-04-05 7:39 ` Sven Eckelmann
2021-04-05 10:02 ` Tetsuo Handa
2021-04-05 10:06 ` Sven Eckelmann
2021-04-05 10:16 ` [PATCH v2] " Tetsuo Handa
2021-04-05 11:09 ` Sven Eckelmann [this message]
2021-04-05 22:20 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5561744.yYbohhxq0P@sven-l14 \
--to=sven@narfation.org \
--cc=a@unstable.cc \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=mareklindner@neomailbox.ch \
--cc=netdev@vger.kernel.org \
--cc=penguin-kernel@i-love.sakura.ne.jp \
--cc=sw@simonwunderlich.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox