<div dir="ltr"><div>Applied to Focal:linux-bluefield</div><div><br></div><div>Thanks! <br></div><div><br></div><div>- Luke<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jan 27, 2022 at 8:17 AM Jitendra Lanka <<a href="mailto:jlanka@nvidia.com">jlanka@nvidia.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">BugLink: <a href="https://bugs.launchpad.net/bugs/1959119" rel="noreferrer" target="_blank">https://bugs.launchpad.net/bugs/1959119</a><br>
<br>
SRU Justification:<br>
<br>
[Impact]<br>
Fix references to sprintf that have a possibility for buffer overflow<br>
<br>
[Fix]<br>
Replace sprintf with snprintf containing a defined boundary of PAGE_SIZE for sysfs store/show functions and max array size defined otherwise.<br>
<br>
[Test Case]<br>
Existing testcases should work as is as no functional change has been introduced by this patch.<br>
<br>
[Regression Potential]<br>
Regression potential can be considered minimal since the patch does not change any function of the driver other than limiting the upper bound of sprintf where the usual lengths parsed are < PAGE_SIZE and requests > PAGE_SIZE are limited.<br>
<br>
<br>
Jitendra Lanka (1):<br>
  Fix references to sprintf that may cause buffer overflow<br>
<br>
 drivers/platform/mellanox/mlxbf-pmc.c | 17 ++++++++++-------<br>
 1 file changed, 10 insertions(+), 7 deletions(-)<br>
<br>
-- <br>
2.30.1<br>
<br>
<br>
-- <br>
kernel-team mailing list<br>
<a href="mailto:kernel-team@lists.ubuntu.com" target="_blank">kernel-team@lists.ubuntu.com</a><br>
<a href="https://lists.ubuntu.com/mailman/listinfo/kernel-team" rel="noreferrer" target="_blank">https://lists.ubuntu.com/mailman/listinfo/kernel-team</a><br>
</blockquote></div></div>