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>] [day] [month] [year] [list]
Date:   Thu, 13 Oct 2022 08:27:17 -0700
From:   coverity-bot <keescook@...omium.org>
To:     Ronnie Sahlberg <lsahlber@...hat.com>
Cc:     Steve French <stfrench@...rosoft.com>,
        "Gustavo A. R. Silva" <gustavo@...eddedor.com>,
        linux-next@...r.kernel.org, linux-hardening@...r.kernel.org
Subject: Coverity: invalidate_all_cached_dirs(): Concurrent data access
 violations

Hello!

This is an experimental semi-automated report about issues detected by
Coverity from a scan of next-20221013 as part of the linux-next scan project:
https://scan.coverity.com/projects/linux-next-weekly-scan

You're getting this email because you were associated with the identified
lines of code (noted below) that were touched by commits:

  Wed Oct 12 16:54:23 2022 -0500
    a350d6e73f5e ("cifs: enable caching of directories for which a lease is held")

Coverity reported the following:

*** CID 1525256:  Concurrent data access violations  (MISSING_LOCK)
/fs/cifs/cached_dir.c: 396 in invalidate_all_cached_dirs()
390     		/* To prevent race with smb2_cached_lease_break() */
391     		kref_get(&cfid->refcount);
392     	}
393     	spin_unlock(&cfids->cfid_list_lock);
394
395     	list_for_each_entry_safe(cfid, q, &entry, entry) {
vvv     CID 1525256:  Concurrent data access violations  (MISSING_LOCK)
vvv     Accessing "cfid->on_list" without holding lock "cached_fids.cfid_list_lock". Elsewhere, "cached_fid.on_list" is accessed with "cached_fids.cfid_list_lock" held 5 out of 6 times.
396     		cfid->on_list = false;
397     		list_del(&cfid->entry);
398     		cancel_work_sync(&cfid->lease_break);
399     		if (cfid->has_lease) {
400     			/*
401     			 * We lease was never cancelled from the server so we

If this is a false positive, please let us know so we can mark it as
such, or teach the Coverity rules to be smarter. If not, please make
sure fixes get into linux-next. :) For patches fixing this, please
include these lines (but double-check the "Fixes" first):

Reported-by: coverity-bot <keescook+coverity-bot@...omium.org>
Addresses-Coverity-ID: 1525256 ("Concurrent data access violations")
Fixes: a350d6e73f5e ("cifs: enable caching of directories for which a lease is held")

Thanks for your attention!

-- 
Coverity-bot

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ