Re: [PATCH] btrfs: qgroup: fix slab-out-of-bounds in btrfs_qgroup_inherit

From: Jeongjun Park
Date: Thu Jun 27 2024 - 21:22:09 EST



> 2024. 6. 24. 오후 3:41, Qu Wenruo <quwenruo.btrfs@xxxxxxx> 작성:
> 
>
>> 在 2024/6/24 15:59, Jeongjun Park 写道:
>> While debugging, I also found that a problem
>> occurred in btrfs_qgroup_check_inherit().
>> While debugging, I also found that a problem
>> occurred in btrfs_qgroup_check_inherit().
>>
>> I think out-of-bounds can be prevented
>> more effectively if the inspection logic
>> containing btrfs_qgroup_enabled() is
>> moved a little lower.
>>
>> If possible, we will send you the v2 patch.
>> I think out-of-bounds can be prevented
>> more effectively if the inspection logic
>> containing btrfs_qgroup_enabled() is
>> moved a little lower.
>>
>> I will send you the v2 patch later after work.
>
> Mind to check my v2 patch?
>
> https://lore.kernel.org/linux-btrfs/47d3dd33f637b70f230fa31f98dbf9ff066b58bb.1719207446.git.wqu@xxxxxxxx/T/#u
>
> I believe this would be enough to prevent the bug from happening, with
> all the existing checks in-place.
>
> Thanks,
> Qu

Perfact Thanks.

Jeongjun Park