On Sun, Oct 14, 2018 at 06:18:29PM +0800, Macpaul Lin wrote:
> This patch is trying to fix KASAN issue reported by Syzkaller scan.

Which exact bug is that?  Always try to include the proper reference so
that the tool can mark the issue resolved.


> 
> Backtrace:
>       die+0x15c/0x6a0
>       bug_handler.part.2+0x68/0xf8
>       bug_handler+0x48/0x68
>       brk_handler+0x1e4/0x3a8
>       do_debug_exception+0xc0/0x250
>       el1_dbg+0x18/0xbc
>       __asan_report_load1_noabort+0x18/0x20
>       param_set_kgdboc_var+0x194/0x198
>       param_attr_store+0x14c/0x270
>       module_attr_store+0x60/0x90
>       sysfs_kf_write+0x100/0x158
>       kernfs_fop_write+0x27c/0x3a8
>       do_loop_readv_writev+0x114/0x1b0
>       do_readv_writev+0x4f8/0x5e0
>       vfs_writev+0x7c/0xb8
>       Sys_writev+0xcc/0x208
>       el0_svc_naked+0x24/0x28
>       0xfffffffffffffff
> 
> Signed-off-by: Macpaul Lin <macp...@gmail.com>
> ---
>  drivers/tty/serial/kgdboc.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/tty/serial/kgdboc.c b/drivers/tty/serial/kgdboc.c
> index b4ba2b1..c89eb9d 100644
> --- a/drivers/tty/serial/kgdboc.c
> +++ b/drivers/tty/serial/kgdboc.c
> @@ -245,13 +245,16 @@ static void kgdboc_put_char(u8 chr)
>  static int param_set_kgdboc_var(const char *kmessage,
>                               const struct kernel_param *kp)
>  {
> -     int len = strlen(kmessage);
> +     size_t len = strlen(kmessage);
>  
>       if (len >= MAX_CONFIG_LEN) {
>               printk(KERN_ERR "kgdboc: config string too long\n");
>               return -ENOSPC;
>       }
>  
> +     if (len == 0)
> +             return -EINVAL;

Are you sure this isn't already resolved?  I thought I took a patch for
this last week or so.

thanks,

greg k-h


_______________________________________________
Kgdb-bugreport mailing list
Kgdb-bugreport@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kgdb-bugreport

Reply via email to