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] [day] [month] [year] [list]
Message-ID: <bb852092-5eab-9a9f-9c0e-4ae1d1b1f892@huawei.com>
Date:   Thu, 22 Sep 2022 20:58:50 +0800
From:   Zhihao Cheng <chengzhihao1@...wei.com>
To:     Jan Kara <jack@...e.cz>
CC:     <jack@...e.com>, <tytso@....edu>, <brauner@...nel.org>,
        <linux-fsdevel@...r.kernel.org>, <linux-ext4@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>, <yukuai3@...wei.com>
Subject: Re: [PATCH 1/3] quota: Check next/prev free block number after
 reading from quota file

在 2022/9/22 19:39, Jan Kara 写道:
> On Thu 22-09-22 16:13:59, Zhihao Cheng wrote:
[...]
>>>
>>> The free block should actually be > QT_TREEOFF so I'd add the check to
>>> do_check_range().
>>
>> 'dh->dqdh_next_free' may be updated when quota entry removed,
>> 'dh->dqdh_next_free' can be used for next new quota entris.
>> Before sending v2, I found 'dh->dqdh_next_free' and 'dh->dqdh_prev_free' can
>> easily be zero in newly allocated blocks when continually creating files
>> onwed by different users:
>> find_free_dqentry
>>    get_free_dqblk
>>      write_blk(info, info->dqi_blocks, buf)  // zero'd qt_disk_dqdbheader
>>      blk = info->dqi_blocks++   // allocate new one block
>>    info->dqi_free_entry = blk   // will be used for new quota entries
>>
>> find_free_dqentry
>>    if (info->dqi_free_entry)
>>      blk = info->dqi_free_entry
>>      read_blk(info, blk, buf)   // dh->dqdh_next_free = dh->dqdh_prev_free =
>> 0
>>
>> I think it's normal when 'dh->dqdh_next_free' or 'dh->dqdh_prev_free' equals
>> to 0.
> 
> Good point! 0 means "not present". So any block number (either in free list
> or pointed from the quota tree) should be either 0 or > QT_TREEOFF.
> 
> 								Honza
> 

In case my emails being filtered agagin, this is notification of v2:
https://lore.kernel.org/linux-ext4/20220922130401.1792256-1-chengzhihao1@huawei.com/T/#m9676d64e8f7cdd7b7decdd0d6b725ec658110b3e

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ