Re: data-race in do_compute_shiftstate / vt_get_shift_state

From: Greg KH
Date: Fri Aug 19 2022 - 03:06:13 EST


On Thu, Aug 18, 2022 at 08:25:00PM -0400, Abhishek Shah wrote:
> Hi all,
>
> We found a data race involving the *shift_state * variable. Although we see
> that the race involves a function which has a comment about being racy
> <https://elixir.bootlin.com/linux/v5.18-rc5/source/drivers/tty/vt/vt.c#L3174>,
> we are unsure of its security implications as the remaining switch cases
> have a console_lock() call but this one
> <https://elixir.bootlin.com/linux/v5.18-rc5/source/drivers/tty/vt/vt.c#L3224>
> does not. Please let us know what you think.

Can you propose a patch that solves the problem for you in your testing
that we can review?

thanks,

greg k-h