Re: [PATCH] tty: vt: fix memory leak in vc_allocate()

From: Greg KH

Date: Thu Jul 30 2026 - 12:57:36 EST


On Thu, Jul 23, 2026 at 06:45:23PM +0800, Mingyu Wang wrote:
>
> > How was this tested? And how can this ever fail given this happens at
> > early boot time, right?
> >
>
> Hi Greg,
>
> Thank you for the review.
>
> Regarding how it can fail:
> While vc_allocate() is indeed heavily used during early boot, it is also
> reachable at runtime when dynamically allocating new virtual consoles (e.g.,
> via the VT_ACTIVATE ioctl). The failure we observed happened at runtime
> because our fuzzing environment enables kernel fault injection (failslab).
> The fuzzer intentionally forced the kzalloc() for the screen buffer to fail,
> which exposed this specific error-handling path.
>
> Regarding testing:
> This issue was discovered using DevGen (our automated virtual device
> modeling fuzzer on QEMU). While we do not have a standalone C reproducer to
> run a dynamic runtime test, the fix was derived directly from dynamic
> execution evidence: we cross-analyzed the precise kmemleak backtraces and
> the fuzzer's execution logs.

You need to document the tools you use as per our documentation. Please
do so when you resend this.

thanks,

gre gk-h