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-next>] [day] [month] [year] [list]
Message-ID: <c569b04c-2959-c8eb-0d38-628e8c5ff7ac@canonical.com>
Date:   Fri, 30 Aug 2019 19:38:00 +0100
From:   Colin Ian King <colin.king@...onical.com>
To:     Valdis Kletnieks <valdis.kletnieks@...edu>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        "devel@...verdev.osuosl.org" <devel@...verdev.osuosl.org>
Cc:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: staging: exfat: issue with FFS_MEDIAERR error return assignment

Hi,

Static analysis on exfat with Coverity has picked up an assignment of
FFS_MEDIAERR that gets over-written:


1750        if (is_dir) {
1751                if ((fid->dir.dir == p_fs->root_dir) &&
1752                    (fid->entry == -1)) {
1753                        if (p_fs->dev_ejected)

    CID 85797 (#1 of 1): Unused value (UNUSED_VALUE)
Assigning value 1 to ret here, but that stored value is overwritten
before it can be used.

1754                                ret = FFS_MEDIAERR;

    value_overwrite: Overwriting previous write to ret with value 0.

1755                        ret = FFS_SUCCESS;
1756                        goto out;
1757                }
1758        }

I doubt that's intentional, should it be instead the following?

				if (p_fs->dev_ejected)
					ret = FFS_MEDIAERR;
				else
					ret = FFS_SUCCESS;
				goto out;

Colin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ