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: <188149.1713361310@warthog.procyon.org.uk>
Date: Wed, 17 Apr 2024 14:41:50 +0100
From: David Howells <dhowells@...hat.com>
To: Paulo Alcantara <pc@...guebit.com>
Cc: dhowells@...hat.com, Steve French <sfrench@...ba.org>,
    Shyam Prasad N <sprasad@...rosoft.com>, linux-cifs@...r.kernel.org,
    linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] cifs: Fix reacquisition of volume cookie on still-live connection

Paulo Alcantara <pc@...guebit.com> wrote:

> > [!] Note: Looking at cifs_mount_get_tcon(), a more general solution may
> > actually be required.  Reacquiring the volume cookie isn't the only thing
> > that function does: it also partially reinitialises the tcon record without
> > any locking - which may cause live filesystem ops already using the tcon
> > through a previous mount to malfunction.
> 
> Agreed.

Looking over the code again, I'm not sure whether is actually necessary - or
whether it is necessary and will be a bit nasty to implement as it will
require read locking also.

Firstly, reset_cifs_unix_caps() seems to re-set tcon->fsUnixInfo.Capability
and tcon->unix_ext, which it would presumably set to the same things - which
is probably fine.

However, cifs_qfs_tcon() makes RPC operations that reloads tcon->fsDevInfo and
tcon->fsAttrInfo - both of which may be being accessed without locks.

smb2_qfs_tcon() and smb3_qfs_tcon() alters everything cifs_qfs_tcon() does,
plus a bunch of extra tcon members.  Can this locally cached information
change over time on the server whilst we have a connection to it?

David


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ