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]
Date:   Fri, 11 Sep 2020 12:16:33 +0100
From:   Colin Ian King <colin.king@...onical.com>
To:     "Darrick J. Wong" <darrick.wong@...cle.com>,
        linux-xfs@...r.kernel.org, Brian Foster <bfoster@...hat.com>
Cc:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: re: xfs: support inode btree blockcounts in online repair

Hi,

Static analysis with Coverity has detected an issue with the following
commit:

commit 30deae31eab501f568aadea45cfb3258b9e522f5
Author: Darrick J. Wong <darrick.wong@...cle.com>
Date:   Wed Aug 26 10:48:50 2020 -0700

    xfs: support inode btree blockcounts in online repair

the analysis is as follows:

830                cur = xfs_inobt_init_cursor(mp, sc->tp, agi_bp,
sc->sa.agno,
831                                XFS_BTNUM_FINO);

const: At condition error, the value of error must be equal to 0.
dead_error_condition: The condition error cannot be true.

 832                if (error)

CID: Logically dead code (DEADCODE)dead_error_line: Execution cannot
reach this statement: goto err;.

 833                        goto err;

While it is tempting to change the if (error) check to if (cur), the
exit error path uses the errnoeous cur as follows:

 842 err:
 843       xfs_btree_del_cursor(cur, error);
 844       return error;

so the error exit path needs some sorting out too.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ