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: <20250515091635.gevpm33zszsbfpxu@skbuf>
Date: Thu, 15 May 2025 12:16:35 +0300
From: Vladimir Oltean <vladimir.oltean@....com>
To: Gerhard Engleder <gerhard@...leder-embedded.com>
Cc: netdev@...r.kernel.org, davem@...emloft.net, kuba@...nel.org,
	edumazet@...gle.com, pabeni@...hat.com, andrew+netdev@...n.ch
Subject: Re: [PATCH net v2] tsnep: fix timestamping with a stacked DSA driver

On Wed, May 14, 2025 at 09:56:57PM +0200, Gerhard Engleder wrote:
> This driver is susceptible to a form of the bug explained in commit
> c26a2c2ddc01 ("gianfar: Fix TX timestamping with a stacked DSA driver")
> and in Documentation/networking/timestamping.rst section "Other caveats
> for MAC drivers", specifically it timestamps any skb which has
> SKBTX_HW_TSTAMP, and does not consider if timestamping has been enabled
> in adapter->hwtstamp_config.tx_type.
> 
> Evaluate the proper TX timestamping condition only once on the TX
> path (in tsnep_xmit_frame_ring()) and store the result in an additional
> TX entry flag. Evaluate the new TX entry flag in the TX confirmation path
> (in tsnep_tx_poll()).
> 
> This way SKBTX_IN_PROGRESS is set by the driver as required, but never
> evaluated. SKBTX_IN_PROGRESS shall not be evaluated as it can be set
> by a stacked DSA driver and evaluating it would lead to unwanted
> timestamps.
> 
> Fixes: 403f69bbdbad ("tsnep: Add TSN endpoint Ethernet MAC driver")
> Suggested-by: Vladimir Oltean <vladimir.oltean@....com>
> Signed-off-by: Gerhard Engleder <gerhard@...leder-embedded.com>
> ---
> v2:
> - took over patch from Vladimir Oltean (thank you for your work, I hope
>   the Suggested-by is ok for you, I was not sure about Co-developed-by)
> - do TX timestamp check only in tsnep_xmit_frame_ring() and store result
>   in TX entry flag
> ---

Reviewed-by: Vladimir Oltean <vladimir.oltean@....com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ