[PATCH RFC] ubifs: Fix use-after-free in ubifs_tnc_end_commit
Waqar Hameed
waqar.hameed at axis.com
Thu Nov 7 14:11:09 PST 2024
On Thu, Nov 07, 2024 at 15:14 +0800 Zhihao Cheng <chengzhihao1 at huawei.com> wrote:
> 在 2024/11/7 0:36, Waqar Hameed 写道:
[...]
>> Did you manage to reproduce the issue with this?
>
> I tried, but I still cannot reproduce it on my local machine.
That's a bummer! Sometimes it really could take a while. For example, my
last attempt needed 248 iterations (almost 4 hours)...
[...]
> @@ -662,6 +662,10 @@ static int get_znodes_to_commit(struct ubifs_info *c)
> }
> znode->cparent = znode->parent;
> znode->ciip = znode->iip;
> + if (znode->cparent) {
> + ubifs_assert(c, ubifs_zn_dirty(znode->cparent));
> + }
> + ubifs_assert(c, znode->ciip < c->fantout);
> znode->cnext = cnext;
> znode = cnext;
> cnt += 1;
None of the asserts got hit during my last run, but KASAN still
complained.
More information about the linux-mtd
mailing list