Re: [PATCH] USB: serial: opticon: fix UAF in write callback during port removal

From: Johan Hovold

Date: Wed Mar 11 2026 - 11:42:17 EST


On Wed, Mar 11, 2026 at 10:26:33PM +0800, Fan Wu wrote:
> > On Mar 11, 2026, at 20:14, Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> wrote:
> > On Tue, Mar 10, 2026 at 05:04:24PM +0000, Fan Wu wrote:
> >> On Tue, Mar 10, 2026 at 09:56:48 +0100, Johan Hovold wrote:

> >>> How was this potential issue found? Are you using some kind of LLM or
> >>> other tool?

> >> I'm currently researching static analysis techniques (CodeQL combined with LLM
> >> assistance) for detecting UAF bugs, particularly around cross-entry lifetimes.
> >> In this case, the analysis missed the subsystem-level guarantee that close runs
> >> before remove.
> >
> > As is required, you always have to document this type of thing in the
> > changelog text.

> Thanks for the reminder. Understood — I'll make sure to explicitly document the
> search method and tool assistance in the changelog for any future patches.

Here's a link to the guidelines if you haven't found them already (under
Documentation/ in the kernel tree):

https://docs.kernel.org/process/researcher-guidelines.html

Johan