public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* Potential NULL pointer dereference in intel_crt_get_edid
@ 2019-03-18 23:01 Shaobo He
  2019-03-18 23:26 ` Rodrigo Vivi
  0 siblings, 1 reply; 8+ messages in thread
From: Shaobo He @ 2019-03-18 23:01 UTC (permalink / raw)
  To: jani.nikula, joonas.lahtinen, rodrigo.vivi, intel-gfx

Hello everyone,

My name is Shaobo He and I am a graduate student at University of Utah. I am 
using a static analysis tool to search for null pointer dereferences and came 
across a potentially invalid memory access in the file 
drivers/gpu/drm/i915/intel_crt.c: in function `intel_crt_detect_ddc`, function 
`intel_gmbus_get_adapter` can return a NULL pointer which is dereferenced by the 
call to `drm_get_edid` or `intel_gmbus_is_forced_bit`. It seems that the return 
value of `intel_gmbus_get_adapter` is never NULL-checked. If so, it would be 
better to replace the branch to return a NULL pointer with something like `BUG_ON`.

Please let me know if it makes sense. I am looking forward to your reply.

Best,
Shaobo
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

end of thread, other threads:[~2019-03-19 17:12 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-18 23:01 Potential NULL pointer dereference in intel_crt_get_edid Shaobo He
2019-03-18 23:26 ` Rodrigo Vivi
2019-03-18 23:39   ` Shaobo He
2019-03-18 23:53     ` Rodrigo Vivi
2019-03-19  0:24       ` Shaobo He
2019-03-19  8:32         ` Jani Nikula
2019-03-19 16:53           ` Shaobo He
2019-03-19 17:12             ` Rodrigo Vivi

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