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-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <615EEA1E-99FC-49BD-A6CD-FD58D4713B2E@dilger.ca>
Date:   Wed, 4 Jan 2017 15:00:18 -0700
From:   Andreas Dilger <adilger@...ger.ca>
To:     "Darrick J. Wong" <darrick.wong@...cle.com>
Cc:     "zhangyi (F)" <yi.zhang@...wei.com>, Valdis.Kletnieks@...edu,
        linux-ext4@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-fsdevel@...r.kernel.org, tytso@....edu,
        adilger.kernel@...ger.ca
Subject: Re: [RFC PATCH] ext4: increase the protection of drop nlink and ext4 inode destroy

On Jan 4, 2017, at 2:54 PM, Darrick J. Wong <darrick.wong@...cle.com> wrote:
> 
> On Wed, Jan 04, 2017 at 04:29:33PM +0800, zhangyi (F) wrote:
>> On 2017/1/1 6:59, Valdis.Kletnieks@...edu said:
>>> On Mon, 26 Dec 2016 20:34:17 +0800, yi zhang said:
>>>> Because of the disk and hardware issue, the ext4 filesystem have
>>>> many errors, the inode->i_nlink of ext4 becomes zero abnormally
>>>> but the dentry is still positive, it will cause memory corruption
>>>> after the following process:
>>>> 
>>>> 1) Due to the inode->i_nlink is 0, this inode will be added into
>>>> the orhpan list,
>>> 
>>>> +	if (WARN(inode->i_nlink == 0, "inode %lu nlink"
>>>> +		" is already 0", inode->i_ino))
>>> 
>>> Can we get the filesystem? Or at least the device major/minor? If a system
>>> has multiple large ext4 filesystems, it would be helpful to know which
>>> one is having the problem.
>>> 
>> 
>>        if (WARN(inode->i_nlink == 0,
>> -               "inode %lu nlink is already 0", inode->i_ino))
>> +               "inode %lu nlink is already 0, dev=%u:%u",
>> +               inode->i_ino, MAJOR(inode->i_sb->s_dev), MINOR(inode->i_sb->s_dev)))
>>                return;
>> 
>> We can modify as above, it's enough to know which filesystem is having the
>> problem, what do you think?
> 
> Why not:
> 
> if (inode->i_nlink == 0) {
> 	ext4_warning_inode(inode, "nlink is already 0");
> 	return;
> }

I like this better as well.

Cheers, Andreas






Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ