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  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Sat, 07 Dec 2019 11:10:58 +0300
From:   Alexander Lobakin <>
To:     David Miller <>
Subject: Re: [PATCH net] net: dsa: fix flow dissection on Tx path

David Miller wrote 07.12.2019 07:19:
> From: Alexander Lobakin <>
> Date: Thu,  5 Dec 2019 13:02:35 +0300
>> Commit 43e665287f93 ("net-next: dsa: fix flow dissection") added an
>> ability to override protocol and network offset during flow dissection
>> for DSA-enabled devices (i.e. controllers shipped as switch CPU ports)
>> in order to fix skb hashing for RPS on Rx path.
>> However, skb_hash() and added part of code can be invoked not only on
>> Rx, but also on Tx path if we have a multi-queued device and:
>>  - kernel is running on UP system or
>>  - XPS is not configured.
>> The call stack in this two cases will be like: dev_queue_xmit() ->
>> __dev_queue_xmit() -> netdev_core_pick_tx() -> netdev_pick_tx() ->
>> skb_tx_hash() -> skb_get_hash().
>> The problem is that skbs queued for Tx have both network offset and
>> correct protocol already set up even after inserting a CPU tag by DSA
>> tagger, so calling tag_ops->flow_dissect() on this path actually only
>> breaks flow dissection and hashing.
>> This can be observed by adding debug prints just before and right 
>> after
>> tag_ops->flow_dissect() call to the related block of code:
>   ...
>> In order to fix that we can add the check 'proto == htons(ETH_P_XDSA)'
>> to prevent code from calling tag_ops->flow_dissect() on Tx.
>> I also decided to initialize 'offset' variable so tagger callbacks can
>> now safely leave it untouched without provoking a chaos.
>> Fixes: 43e665287f93 ("net-next: dsa: fix flow dissection")
>> Signed-off-by: Alexander Lobakin <>
> Applied and queued up for -stable.

David, Andrew, Florian, Rainer,
Thank you!

ᚷ ᛖ ᚢ ᚦ ᚠ ᚱ

Powered by blists - more mailing lists