lkml.org 
[lkml]   [2020]   [May]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectPossible null pointer dereference in smp_init_package_map()
Hi,

I am a security researcher, my name is Dongyang Zhan. I found a potential bug.

I hope you can help me to confirm it.

Thank you.

In Linux 4.10.17, smp_init_package_map() in /arch/x86/kernel/smpboot.c
does not handle the failure of memory allocation, which may cause a
null pointer dereference bug.

Source code link:
https://elixir.bootlin.com/linux/v4.10.17/source/arch/x86/kernel/smpboot.c#L326

Source code and comments:
physical_to_logical_pkg = kmalloc(size, GFP_KERNEL);
memset(physical_to_logical_pkg, 0xff, size); // does not check if kmalloc fails

\
 
 \ /
  Last update: 2020-05-03 09:34    [W:0.462 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site