Re: [PATCH v2 0/2] kho: drop the incoming sub-blob debugfs view
From: longwei (I)
Date: Thu Nov 19 2026 - 04:13:26 EST
Hi Mike,
Thanks for the detailed explanation! I now understand why c609c144b0e8
is not the right Fixes target — the pages weren't freed back then, so
there was no UAF. The kho_restore_free() path in d376e4b55c9a0 is what
actually made it reachable.
I will send v3 with the following changes:
- Fold patch 2 (documentation removal) into patch 1, so stable
backports pick up both code and docs together
- Update Fixes tag to d376e4b55c9a0 ("liveupdate: centralize state
management into struct luo_ser")
Best,
Long Wei
在 2026/11/19 16:26, Mike Rapoport 写道:
> Hi,
>
> Please don't send vN+1 as a reply to vN.
>
>> kho/in/sub_fdts exposes the raw contents of the sub-blobs described by
>> the incoming KHO FDT. KHO does not own those pages: they belong to the
>> producers' consumers and have independent lifetimes. LUO, for example,
>> restores and frees its state in early_initcall, before kho_init()
>> (fs_initcall) creates the debugfs view, so the blobs point at pages that
>> are already back in the buddy allocator. Reading them triggers a KASAN
>> use-after-free in _copy_to_user().
>>
>> The same information is already available to user space from in/fdt,
>> which KHO does own and which stays reserved. Drop the directory rather
>> than adding another interface to describe it, keeping the -rc fix small.
>>
>> Patch 1 removes the interface, patch 2 drops its documentation.
>
> Patch 2 is only four lines of documentation for the interface patch 1
> removes. It could be folded into patch 1 so that a stable backport
> removes the documentation together with the code.
>