[<prev] [next>] [day] [month] [year] [list]
Message-ID: <672a6e03.050a0220.2a847.154d.GAE@google.com>
Date: Tue, 05 Nov 2024 11:12:03 -0800
From: syzbot <syzbot+14c04e62ca58315571d1@...kaller.appspotmail.com>
To: zoo868e@...il.com
Cc: zoo868e@...il.com, linux-kernel@...r.kernel.org,
syzkaller-bugs@...glegroups.com
Subject: Re: [PATCH] rxrpc: Initialize sockaddr_rxrpc directly
> 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.
>
> #syz test
This crash does not have a reproducer. I cannot test it.
>
> Signed-off-by: Matt Jan <zoo868e@...il.com>
> ---
> net/rxrpc/peer_event.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/net/rxrpc/peer_event.c b/net/rxrpc/peer_event.c
> index 552ba84a255c..c86b432201fd 100644
> --- a/net/rxrpc/peer_event.c
> +++ b/net/rxrpc/peer_event.c
> @@ -33,7 +33,6 @@ static struct rxrpc_peer *rxrpc_lookup_peer_local_rcu(struct rxrpc_local *local,
>
> _enter("");
>
> - memset(srx, 0, sizeof(*srx));
> srx->transport_type = local->srx.transport_type;
> srx->transport_len = local->srx.transport_len;
> srx->transport.family = local->srx.transport.family;
> @@ -134,7 +133,7 @@ static void rxrpc_adjust_mtu(struct rxrpc_peer *peer, unsigned int mtu)
> void rxrpc_input_error(struct rxrpc_local *local, struct sk_buff *skb)
> {
> struct sock_exterr_skb *serr = SKB_EXT_ERR(skb);
> - struct sockaddr_rxrpc srx;
> + struct sockaddr_rxrpc srx = {};
> struct rxrpc_peer *peer = NULL;
>
> _enter("L=%x", local->debug_id);
> --
> 2.25.1
>
Powered by blists - more mailing lists