* Coverity: drm_dp_get_adjust_request_post_cursor(): Memory - corruptions
@ 2019-10-28 23:05 coverity-bot
0 siblings, 0 replies; only message in thread
From: coverity-bot @ 2019-10-28 23:05 UTC (permalink / raw)
To: Thierry Reding; +Cc: Lyude Paul, Philipp Zabel, Gustavo A. R. Silva, linux-next
Hello!
This is an experimental automated report about issues detected by Coverity
from a scan of next-20191025 as part of the linux-next weekly scan project:
https://scan.coverity.com/projects/linux-next-weekly-scan
You're getting this email because you were associated with the identified
lines of code (noted below) that were touched by recent commits:
79465e0ffeb9 ("drm/dp: Add helper to get post-cursor adjustments")
Coverity reported the following:
*** CID 1487366: Memory - corruptions (OVERRUN)
/drivers/gpu/drm/drm_dp_helper.c: 127 in drm_dp_get_adjust_request_post_cursor()
121 EXPORT_SYMBOL(drm_dp_get_adjust_request_pre_emphasis);
122
123 u8 drm_dp_get_adjust_request_post_cursor(const u8 link_status[DP_LINK_STATUS_SIZE],
124 unsigned int lane)
125 {
126 unsigned int offset = DP_ADJUST_REQUEST_POST_CURSOR2;
vvv CID 1487366: Memory - corruptions (OVERRUN)
vvv Overrunning buffer pointed to by "link_status" of 6 bytes by passing it to a function which accesses it at byte offset 10 using argument "offset" (which evaluates to 524).
127 u8 value = dp_link_status(link_status, offset);
128
129 return (value >> (lane << 1)) & 0x3;
130 }
131 EXPORT_SYMBOL(drm_dp_get_adjust_request_post_cursor);
132
If this is a false positive, please let us know so we can mark it as
such, or teach the Coverity rules to be smarter. If not, please make
sure fixes get into linux-next. :) For patches fixing this, please
include:
Reported-by: coverity-bot <keescook+coverity-bot@chromium.org>
Addresses-Coverity-ID: 1487366 ("Memory - corruptions")
Fixes: 79465e0ffeb9 ("drm/dp: Add helper to get post-cursor adjustments")
Thanks for your attention!
--
Coverity-bot
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-10-28 23:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-28 23:05 Coverity: drm_dp_get_adjust_request_post_cursor(): Memory - corruptions coverity-bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).