public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* hwmon: (sis5595) potential null pointer dereference in probe
@ 2020-08-04 11:50 Evgeny Novikov
  2020-08-04 14:33 ` Guenter Roeck
  0 siblings, 1 reply; 3+ messages in thread
From: Evgeny Novikov @ 2020-08-04 11:50 UTC (permalink / raw)
  To: Jean Delvare; +Cc: Guenter Roeck, linux-hwmon, linux-kernel

sis5595_pci_probe() registers platform driver callbacks and just then
initializes global pointer variable s_bridge. sis5595_probe() may
dereference it before this happens that can result in null pointer
dereference.

We can not swap registration of platform driver callbacks with
initialization of s_bridge since sm_sis5595_exit() assumes the
current order. Perhaps it has sense to implement a pci_driver.remove
callback that will take care about deregistration of platform driver
callbacks.

Found by Linux Driver Verification project (linuxtesting.org).


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-08-04 14:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-04 11:50 hwmon: (sis5595) potential null pointer dereference in probe Evgeny Novikov
2020-08-04 14:33 ` Guenter Roeck
2020-08-04 14:48   ` Evgeny Novikov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox