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]
Date: Tue, 5 Sep 2023 11:55:12 +0200
From: Lukasz Majewski <lukma@...x.de>
To: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Cc: Tristram.Ha@...rochip.com, Eric Dumazet <edumazet@...gle.com>,
 davem@...emloft.net, Andrew Lunn <andrew@...n.ch>, Florian Fainelli
 <f.fainelli@...il.com>, Jakub Kicinski <kuba@...nel.org>, Paolo Abeni
 <pabeni@...hat.com>, Kristian Overskeid <koverskeid@...il.com>, Matthieu
 Baerts <matthieu.baerts@...sares.net>, netdev@...r.kernel.org,
 linux-kernel@...r.kernel.org, Andreas Oetken <ennoerlangen@...il.com>
Subject: Re: [PATCH] net: hsr : Provide fix for HSRv1 supervisor frames
 decoding

Hi Sebastian,

> On 2023-08-25 17:31:11 [+0200], Lukasz Majewski wrote:
> > Provide fix to decode correctly supervisory frames when HSRv1
> > version of the HSR protocol is used.
> > 
> > Without this patch console is polluted with:
> > ksz-switch spi1.0 lan1: hsr_addr_subst_dest: Unknown node
> > 
> > as a result of destination node's A MAC address equals to:
> > 00:00:00:00:00:00.
> > 
> > cat /sys/kernel/debug/hsr/hsr0/node_table
> > Node Table entries for (HSR) device
> > MAC-Address-A,    MAC-Address-B,    time_in[A], time_in[B],
> > Address-B 00:00:00:00:00:00 00:10:a1:94:77:30      400bf,
> > 399c,	        0
> > 
> > It was caused by wrong frames decoding in the
> > hsr_handle_sup_frame().
> > 
> > As the supervisor frame is encapsulated in HSRv1 frame:
> > 
> > SKB_I100000000: 01 15 4e 00 01 2d 00 10 a1 94 77 30 89 2f 00 34
> > SKB_I100000010: 02 59 88 fb 00 01 84 15 17 06 00 10 a1 94 77 30
> > SKB_I100000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> > SKB_I100000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> > SKB_I100000040: 00 00
> > 
> > The code had to be adjusted accordingly and the MAC-Address-A now
> > has the proper address (the MAC-Address-B now has all 0's).  
> 
> Was this broken by commit
> 	eafaa88b3eb7f ("net: hsr: Add support for redbox supervision
> frames")
> 

Yes, it seems so.

> ? Is this frame somehow special? I don't remember this…
> 

Please refer to the whole thread - I've described this issue thoroughly
(including hex dump of frames):
https://lore.kernel.org/lkml/20230904175419.7bed196b@wsk/T/#m35cbfa4f1b8901d341fbc39659ace6a041f84c98

In short - the HSRv1 is not recognized correctly anymore:

HSR v0:
    [Protocols in frame: eth:ethertype:hsr_prp_supervision]
                                                                        
HSR v1:
    [Protocols in frame: eth:ethertype:hsr:hsr_prp_supervision]


> > Signed-off-by: Lukasz Majewski <lukma@...x.de>  
> 
> Sebastian


Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@...x.de

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ