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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251006102659.595825fe@kernel.org>
Date: Mon, 6 Oct 2025 10:26:59 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: "Tantilov, Emil S" <emil.s.tantilov@...el.com>
Cc: Jacob Keller <jacob.e.keller@...el.com>, Przemek Kitszel
 <przemyslaw.kitszel@...el.com>, Andrew Lunn <andrew+netdev@...n.ch>, "David
 S. Miller" <davem@...emloft.net>, "Eric Dumazet" <edumazet@...gle.com>,
 Paolo Abeni <pabeni@...hat.com>, "Pavan Kumar Linga"
 <pavan.kumar.linga@...el.com>, Alexander Lobakin
 <aleksander.lobakin@...el.com>, Willem de Bruijn <willemb@...gle.com>,
 Sridhar Samudrala <sridhar.samudrala@...el.com>, Phani Burra
 <phani.r.burra@...el.com>, Piotr Kwapulinski <piotr.kwapulinski@...el.com>,
 Simon Horman <horms@...nel.org>, Radoslaw Tyl <radoslawx.tyl@...el.com>,
 Jedrzej Jagielski <jedrzej.jagielski@...el.com>, Mateusz Polchlopek
 <mateusz.polchlopek@...el.com>, Anton Nadezhdin
 <anton.nadezhdin@...el.com>, Konstantin Ilichev
 <konstantin.ilichev@...el.com>, Milena Olech <milena.olech@...el.com>,
 <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>, Joshua Hay
 <joshua.a.hay@...el.com>, Aleksandr Loktionov
 <aleksandr.loktionov@...el.com>, Chittim Madhu <madhu.chittim@...el.com>,
 Samuel Salin <Samuel.salin@...el.com>
Subject: Re: [PATCH net 3/8] idpf: fix possible race in idpf_vport_stop()

On Mon, 6 Oct 2025 07:49:32 -0700 Tantilov, Emil S wrote:
> > Argh, please stop using the flag based state machines. They CANNOT
> > replace locking. If there was proper locking in place it wouldn't
> > have mattered when we clear the flag.  
> 
> This patch is resolving a bug in the current logic of how the flag is 
> used (not being atomic and not being cleared properly). I don't think
> there is an existing lock in place to address this issue, though we are
> looking to refactor the code over time to remove and/or limit how these
> flags are used.

Can you share more details about the race? If there is no lock in place
there's always the risk that:

  CPU 0                         CPU 1
 idpf_vport_stop()             whatever()
                                 if (test_bit(UP))
                                  # sees true
                                # !< long IRQ arrives
 test_and_clear(UP)
   ...
   all the rest
   ...
                                # > long IRQ ends
                                proceed but UP isn't really set any more

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ