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: <a519d1f2-81db-26c2-30ba-9ce2bacfecbe@canonical.com>
Date:   Fri, 31 Aug 2018 14:39:11 +0100
From:   Colin Ian King <colin.king@...onical.com>
To:     linux-fsdevel@...r.kernel.org, David Howells <dhowells@...hat.com>,
        Al Viro <viro@...iv.linux.org.uk>
Cc:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: fs: hfs: Possible issue with increment of extent

Hi,

Static analysis has picked up a potential issue with an out of bounds
read in fs/hfs/extent.c; the following for-loop in  hfs_free_fork()
increments i and also extent while also reading extent[i].count.  This
looks incorrect to me, I think the increment of extent is not needed:

        for (i = 0; i < 3; extent++, i++)
                blocks += be16_to_cpu(extent[i].count);

        res = hfs_free_extents(sb, extent, blocks, blocks);

I'm not familiar enough with the code to conclude that removing the
increment of extent is necessary a correct fix just in case I'm missing
something subtle here.

This issue was picked up by static analysis with CoverityScan:

CID 711541 (#1 of 1): Out-of-bounds read:
Overrunning array of 3 4-byte elements at element index 4 (byte offset
16) by dereferencing pointer extent + i.

Colin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ