lkml.org 
[lkml]   [2021]   [Oct]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject回复: drivers/cxl: suspected null pointer der eference in core/bus.c
Date
Got it.
Thanks for your reply.

Best regards,
Chengfeng

-----邮件原件-----
发件人: Ben Widawsky <ben.widawsky@intel.com>
发送时间: 2021年10月27日 23:04
收件人: YE Chengfeng <cyeaa@connect.ust.hk>
抄送: alison.schofield@intel.com; vishal.l.verma@intel.com; ira.weiny@intel.com; dan.j.williams@intel.com; Jonathan.Cameron@huawei.com; linux-kernel@vger.kernel.org; linux-cxl@vger.kernel.org
主题: Re: drivers/cxl: suspected null pointer dereference in core/bus.c

On 21-10-27 11:35:25, YE Chengfeng wrote:
> Hi,
>
> https://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgith
> ub.com%2Ftorvalds%2Flinux%2Fblob%2Fmaster%2Fdrivers%2Fcxl%2Fcore%2Fbus
> .c%23L98&amp;data=04%7C01%7Ccyeaa%40connect.ust.hk%7C778468ba05844313f
> f7108d9995b19ad%7C6c1d415239d044ca88d9b8d6ddca0708%7C1%7C0%7C637709438
> 820451633%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIi
> LCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=Tz4HyXAH6ov5wZ7ijhLBva
> IyEC9JojDZMWMSUY7pHLg%3D&amp;reserved=0
>
> We notice that in multiple call sites, the return pointer of to_cxl_decoder is not null-checked, could it be a potential null-pointer-dereference problem?
>
> This is detected by our experimental static analysis tool, it could be false positive, we manually check and report those we think may be true issues. Would you like to have a look at them?
>
> Thanks so much,
> Chengfeng

add linux-cxl...

If NULL is returned, it's a driver bug. The WARN_ON and subsequent NULL deref oops is desirable.
\
 
 \ /
  Last update: 2021-10-28 04:21    [W:0.083 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site