In the Linux kernel, the following vulnerability has been resolved:
clk: Fix clkcoreget NULL dereference
It is possible for clkcoreget to dereference a NULL in the following sequence:
clkcoreget() ofclkgethwfromclkspec() _ofclkgethwfromprovider() _clkgethw()
_clkgethw() can return NULL which is dereferenced by clkcore_get() at hw->core.
Prior to commit dde4eff47c82 ("clk: Look for parents with clkdev based clklookups") the check ISERRORNULL() was performed which would have caught the NULL.
Reading the description of this function it talks about returning NULL but that cannot be so at the moment.
Update the function to check for hw before dereferencing it and return NULL if hw is NULL.