Re: [PATCH v2] media: rc: fix use-after-free of rc_map.name on register error path
From: Sean Young
Date: Fri Oct 30 2026 - 06:07:22 EST
On Fri, Oct 30, 2026 at 02:00:57PM +0800, YuanZhe Liu wrote:
> Hi Mauro,
>
> I am copying this address for visibility.
>
> [PATCH v2] media: rc: fix use-after-free of rc_map.name on register
> error path
This looks good on first pass, I need to review it.
> The remaining issue is a uevent racing with keymap cleanup while
> registered is still true. The proposed approach is to clear registered
> before freeing the keymap.
The problem with the current approach is that the remove uevent is
suppressed if it depends on registered. We need the uevent to always
be delivered, yet the uevent contains driver strings.
> The follow-up linked below describes the remaining issue and the changes
> needed for the current tree. I'd appreciate your feedback on the
> proposed approach.
>
> Discussion:
> https://lore.kernel.org/r/20261027021718.14264-1-25031212351@xxxxxxxxxxxxxxxxx
>
> Original submission:
> https://lore.kernel.org/r/20261027014144.9144-1-25031212351@xxxxxxxxxxxxxxxxx
>
> Thanks,
> YuanZhe
Thanks,
Sean