lkml.org 
[lkml]   [2020]   [Mar]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: UBSAN: Undefined behaviour in drivers/tty/vt/keyboard.c
On Sun, Mar 22, 2020 at 11:34:01PM -0400, Kyungtae Kim wrote:
> We report a bug (in linux-5.5.11) found by FuzzUSB (modified version
> of syzkaller)
>
> Seems the variable "npadch" has a very large value (i.e., 333333333)
> as a result of multiple executions of the function "k_ascii" (keyboard.c:888)
> while the variable "base" has 10.
> So their multiplication at line 888 in "k_ascii" will become
> larger than the max of type int, causing such an integer overflow.
>
> I believe this can be solved by checking for overflow ahead of operations
> e.g., using check_mul_overflow().
>
> kernel config: https://kt0755.github.io/etc/config_v5.5.11

Great, can you send a patch for this?

thanks,

greg k-h

\
 
 \ /
  Last update: 2020-03-23 07:48    [from the cache]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog