Re: [PATCH] HID: u2fzero: fix general protection fault in u2fzero_recv

From: Li Zao

Date: Thu May 21 2026 - 22:02:09 EST


> Couple of things:
> - sorry, but a couple of days later someone else send a patch to tackle
> the same problem at a better level IMO:
> https://lore.kernel.org/linux-input/20260424-u2fzero-probe-urb-unwind-v1-1-mhun512@xxxxxxxxx/
> So I'm going to take this one instead of yours. I would appreciate if
> you can confirm this fixes your current reproducer.
>
> - Your commit description is not great. Please have a look at
> Documentation/process/submitting-patches.rst The thing that made me
> notice this is the non imperative form (quoting
> submitting-patches.rst):
> """
> Describe your changes in imperative mood,
> e.g. "make xyzzy do frotz" instead of "[This patch] makes xyzzy do
> frotz" or "[I] changed xyzzy to do frotz", as if you are giving orders
> to the codebase to change its behaviour.
> """
> The paragraph above is also hard to follow but valuable for
> understanding why it needs to be fixed.
>
> Again, in the end the problem is that is dev->urb is NULL, there are
> little chances the system is healthy and the device will work correctly,
> so it's best to bail out early in probe like the other patch I
> mentioned.
>
> Cheers,
> Benjamin



Hi Benjamin,

I have verified the patch against our reproducer and can confirm that
it indeed fixes the issue. And thanks for the guidance on the commit
description. That's quite useful.

BTW, would it be possible to add a "Reported-by" tag to the patch? I'm
not sure about the exact convention for this situation, since the bug
was found by our private fuzzing tool and no public report is available
on the web.

Thanks again for your time and guidance!

Best regards,
Haocheng