From: coverity-bot <keescook@chromium.org>
To: Thierry Reding <treding@nvidia.com>
Cc: Lyude Paul <lyude@redhat.com>,
Philipp Zabel <p.zabel@pengutronix.de>,
"Gustavo A. R. Silva" <gustavo@embeddedor.com>,
linux-next@vger.kernel.org
Subject: Coverity: drm_dp_get_adjust_request_post_cursor(): Memory - corruptions
Date: Mon, 28 Oct 2019 16:05:14 -0700 [thread overview]
Message-ID: <201910281605.3B5CC6A661@keescook> (raw)
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
reply other threads:[~2019-10-28 23:05 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201910281605.3B5CC6A661@keescook \
--to=keescook@chromium.org \
--cc=gustavo@embeddedor.com \
--cc=linux-next@vger.kernel.org \
--cc=lyude@redhat.com \
--cc=p.zabel@pengutronix.de \
--cc=treding@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox