All of lore.kernel.org
 help / color / mirror / Atom feed
* [BUG] scsi: pcmcia: nsp_cs: possible null-pointer dereference in nsp_cs_config()
@ 2021-07-31  4:07 Li Tuo
  0 siblings, 0 replies; only message in thread
From: Li Tuo @ 2021-07-31  4:07 UTC (permalink / raw)
  To: yokota, jejb, martin.petersen; +Cc: linux-scsi, linux-kernel, baijiaju1990

Hello,

Our static analysis tool finds a possible null-pointer dereference in 
the pcmcia driver in Linux 5.14.0-rc3:

The variable link->resource[0] is checked in:
1599:    if (link->resource[0])

This indicates that link->resource[0] can be NULL.
But it is dereferenced in:
1610:    data->BaseAddress = link->resource[0]->start;

I am not quite sure whether this possible null-pointer dereference is 
real and how to fix it if it is real.
Any feedback would be appreciated, thanks!

Reported-by: TOTE Robot <oslab@tsinghua.edu.cn>

Best wishes,
Tuo Li

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-07-31  4:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-31  4:07 [BUG] scsi: pcmcia: nsp_cs: possible null-pointer dereference in nsp_cs_config() Li Tuo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.