Re: [PATCH v3] configfs: fix slab-UAF Write in config_item_put
From: DRIF ABDELMALEK MOHAMED SAID
Date: Fri Nov 06 2026 - 12:31:23 EST
Hello Breno,
> refcount_t: addition on 0; use-after-free.
>WARNING: lib/refcount.c:34 at refcount_warn_saturate+0x76/0xd0, CPU#1: ln/172
So i think this is caused because i removed the null assignment on
parent_item, so it catches
what parent_item pointed to when refcount was 0 but before the free,
and this is actually my mistake, i sent a syztest with the old
parent_item = NULL after the put,
and that is actually important here, because it protects uaf in
out_put and out_put_target,
so we either move the if (IS_DEADDIR(dir)) check after
configfs_get_config_item and omit
parent_item = NULL on the 1st lock, or we keep it as is.
Should i send v4 or you can apply this directly (if good enough)
Cordially,