From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mout01.posteo.de (mout01.posteo.de [185.67.36.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B53EA36C0B9 for ; Tue, 17 Feb 2026 14:07:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.67.36.65 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771337281; cv=none; b=hH2U4f5AQWEOkureA2VxJ7UAvzjRnSnhzWSg0HgOHmzoHvtXUkdbv9njXZkPB3LV1eEvKrD9WGhUNrpnFyHTE/hf+u/30EThweZfd/a1XgmRHK/YTW1woEBtGE1U2DV7LrZFPK1U5r7oX5ae6bSO6Ivi25KjJYSdHVDAbi9p4eg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771337281; c=relaxed/simple; bh=0NyJYsksmxUgMNXz4K6ZP9ZbJ6FoZ+im2I1GHNA4b5A=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=tG4r9ih/PFG3TcPhrOd2yJAbFrdpEkFZ0mhyiu59BH/MivxAXoRVesX38zXbPQtw8T01YCiuShatCB/0RduGjGgpfadH7kRhDuxHLu0WSls5yB5hGJae3Uhs0gxOzGG+nsfs/x6l/fruNpz2WPIcj6kxHMcrP68aNetezzC0qxM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=posteo.net; spf=pass smtp.mailfrom=posteo.net; dkim=pass (2048-bit key) header.d=posteo.net header.i=@posteo.net header.b=SLG9dpM7; arc=none smtp.client-ip=185.67.36.65 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=posteo.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=posteo.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=posteo.net header.i=@posteo.net header.b="SLG9dpM7" Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id C63F9240027 for ; Tue, 17 Feb 2026 15:07:56 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=posteo.net; s=2017; t=1771337276; bh=sKkWkOyFI8xNo6uOC2GXNy2uDG/uIzVcULqnGEdSUrc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=SLG9dpM7R/EukPvsptQCgwA5Q7435NpmHzSTb5H+8qodPUOhuN42f9P5OmR6wSgY7 kaM1clwhP121Hr8i3T9s7IzWRcdPTR+oQA0NHQKA0garTDE4sxCcigDW8byTsnSIDc 7kkO4P0NW6lblKNVs/hT3hA5RFXr4Y+Eq8uwFHotFVv8FA2uRLHsnmXhMI+ZZDHzL7 rh4wtIRR9Fwpe1wsm2EP8AkPSS4wQuDDv668fMrW3JH2k2WbajvXssN1NVnZHvrOKe aqeqOWlkjMTu3lbyvG5eRPblIItOCkfYS73wCpn3WgHSDkni6RDft0XMJsOlMzEm0w rWTF9H+61fMbg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4fFhLL594fz6v15; Tue, 17 Feb 2026 15:07:54 +0100 (CET) From: Charalampos Mitrodimas To: Tabrez Ahmed Cc: allison.henderson@oracle.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, horms@kernel.org, gerd.rausch@oracle.com, linux-rdma@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, syzbot+aae646f09192f72a68dc@syzkaller.appspotmail.com Subject: Re: [PATCH net v2] rds: tcp: fix uninit-value in __inet_bind In-Reply-To: <20260217135350.33641-1-tabreztalks@gmail.com> References: <20260217135350.33641-1-tabreztalks@gmail.com> Date: Tue, 17 Feb 2026 14:07:56 +0000 Message-ID: <87y0krea4m.fsf@posteo.net> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain Tabrez Ahmed writes: > KMSAN reported an uninit-value access in __inet_bind() when binding > an RDS TCP socket. > > The uninitialized memory originates from rds_tcp_conn_alloc(), > which uses kmem_cache_alloc() to allocate the rds_tcp_connection structure. > > Specifically, the field 't_client_port_group' is incremented in > rds_tcp_conn_path_connect() without being initialized first: > > if (++tc->t_client_port_group >= port_groups) > > Since kmem_cache_alloc() does not zero the memory, this field contains > garbage, leading to the KMSAN report. > > Fix this by using kmem_cache_zalloc() to ensure the structure is > zero-initialized upon allocation. > > Reported-by: syzbot+aae646f09192f72a68dc@syzkaller.appspotmail.com > Closes: https://syzkaller.appspot.com/bug?extid=aae646f09192f72a68dc > Tested-by: syzbot+aae646f09192f72a68dc@syzkaller.appspotmail.com > Fixes: a20a6992558f ("net/rds: Encode cp_index in TCP source port") > > Signed-off-by: Tabrez Ahmed > --- Reviewed-by: Charalampos Mitrodimas -- C. Mitrodimas