Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752365AbdGSA67 (ORCPT ); Tue, 18 Jul 2017 20:58:59 -0400 Received: from mail-qt0-f182.google.com ([209.85.216.182]:35742 "EHLO mail-qt0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751560AbdGSA66 (ORCPT ); Tue, 18 Jul 2017 20:58:58 -0400 MIME-Version: 1.0 In-Reply-To: References: <20170718145557.89616-1-glider@google.com> From: Xin Long Date: Wed, 19 Jul 2017 12:58:56 +1200 Message-ID: Subject: Re: [PATCH] sctp: fully initialize the IPv6 address in sctp_v6_to_addr() To: Alexander Potapenko Cc: Dmitriy Vyukov , Kostya Serebryany , Eric Dumazet , David Miller , Vladislav Yasevich , LKML , linux-sctp@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 804 Lines: 17 On Wed, Jul 19, 2017 at 3:02 AM, Alexander Potapenko wrote: > On Tue, Jul 18, 2017 at 4:55 PM, Alexander Potapenko wrote: >> KMSAN reported use of uninitialized sctp_addr->v4.sin_addr.s_addr and >> sctp_addr->v6.sin6_scope_id in sctp_v6_cmp_addr() (see below). >> Make sure all fields of an IPv6 address are initialized, which >> guarantees that the IPv4 fields are also initialized. > I'm assuming here that the IPv4 address is known to overlap with the > IPv6 one and doesn't need separate initialization. > Ok, addr->v6.sin6_scope_id = 0 will fix the call trace you posted here. addr->v6.sin6_flowinfo = 0 is to fix uninitialized sctp_addr->v4.sin_addr.s_addr, I couldn't see how this happens, can you also post the call trace for v4.sin_addr.s_addr ? Thanks