From: David Howells <dhowells@redhat.com>
To: Matt Jan <zoo868e@gmail.com>
Cc: dhowells@redhat.com,
syzbot+14c04e62ca58315571d1@syzkaller.appspotmail.com,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
linux-afs@lists.infradead.org, linux-kernel@vger.kernel.org,
marc.dionne@auristor.com, netdev@vger.kernel.org,
pabeni@redhat.com, syzkaller-bugs@googlegroups.com,
skhan@linuxfoundation.org
Subject: Re: [PATCH] rxrpc: Initialize sockaddr_rxrpc directly
Date: Mon, 18 Nov 2024 15:00:12 +0000 [thread overview]
Message-ID: <883286.1731942012@warthog.procyon.org.uk> (raw)
In-Reply-To: <20241105191959.2871-1-zoo868e@gmail.com>
Matt Jan <zoo868e@gmail.com> wrote:
> In rxrpc_lookup_peer_local_rcu(), removed the redundant memset call
> that zeros out the sockaddr_rxrpc structure before setting its fields.
> Instead, initialize the sockaddr_rxrpc structure directly in
> rxrpc_input_error().
>
> This change simplifies the code and ensures that the sockaddr_rxrpc
> structure is properly zero-initialized.
How does that actually fix the issue?
All the patch does is move the initialisation of srx from
rxrpc_lookup_peer_local_rcu() into its only caller - and nothing samples the
contents of srx between.
Looking at the bug report, the history of the uninitialised location goes back
further, to a network address generated/assembled in the ipv6 stack or from
the transmission side of the rxrpc stack, possibly call->peer->srx.transport.
David
prev parent reply other threads:[~2024-11-18 15:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-24 22:43 [syzbot] [afs?] [net?] KMSAN: uninit-value in rxrpc_lookup_peer_rcu syzbot
2024-11-05 19:19 ` [PATCH] rxrpc: Initialize sockaddr_rxrpc directly Matt Jan
2024-11-18 15:00 ` David Howells [this message]
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=883286.1731942012@warthog.procyon.org.uk \
--to=dhowells@redhat.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-afs@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marc.dionne@auristor.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=skhan@linuxfoundation.org \
--cc=syzbot+14c04e62ca58315571d1@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
--cc=zoo868e@gmail.com \
/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;
as well as URLs for NNTP newsgroup(s).