lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240905204704.5PYieqpC@linutronix.de>
Date: Thu, 5 Sep 2024 22:47:04 +0200
From: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
To: Eric Dumazet <edumazet@...gle.com>, Lukasz Majewski <lukma@...x.de>
Cc: "David S . Miller" <davem@...emloft.net>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	netdev@...r.kernel.org, eric.dumazet@...il.com,
	syzbot <syzkaller@...glegroups.com>
Subject: Re: [PATCH net] net: hsr: remove seqnr_lock

On 2024-09-05 15:26:27 [+0200], Eric Dumazet wrote:
> 
> This has nothing to do with GRO.
> 
> Look at this alternative patch, perhaps you will see the problem ?
> 
> diff --git a/net/hsr/hsr_slave.c b/net/hsr/hsr_slave.c
> index af6cf64a00e081c777db5f7786e8a27ea6f62e14..3971dbc0644ab8d32c04c262dbba7b1c950ebea9
> 100644
> --- a/net/hsr/hsr_slave.c
> +++ b/net/hsr/hsr_slave.c
> @@ -67,7 +67,9 @@ static rx_handler_result_t hsr_handle_frame(struct
> sk_buff **pskb)
>                 skb_set_network_header(skb, ETH_HLEN + HSR_HLEN);
>         skb_reset_mac_len(skb);
> 
> +       spin_lock_bh(&hsr->seqnr_lock);
>         hsr_forward_skb(skb, port);
> +       spin_unlock_bh(&hsr->seqnr_lock);
> 
>  finish_consume:
>         return RX_HANDLER_CONSUMED;
> 

This does not trigger any warning while testing (warning as in recursion
or so). The other invocations have the lock so it should work.

This did not trigger earlier because hsr_handle_frame() is invoked from
the Slave-Interfaces which don't assign a seq-nr.
syzkaller might have managed to receive the packet from the
master interface. Or it is the interlink which is new and was added in
commit 5055cccfc2d1c ("net: hsr: Provide RedBox support (HSR-SAN)").

Did the bot leave a reproducer? I'm wondering if the packet is dropped
later in process. I can't test interlink right now, my `ip' seems not
recent enough.

Assuming it is a interlink packet, I would suggest to acquire that lock
as you suggested. I can send a patch if you wish. Added Lukasz Majewski
on Cc who added interlink support, maybe he can say if this is a legal
path.

Sebastian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ