mbox series

[SRU,F:linux-bluefield,v1,0/1] UBUNTU: SAUCE: Fix references to sprintf that may cause buffer overflow

Message ID cover.1643217384.git.jlanka@nvidia.com
Headers show
Series UBUNTU: SAUCE: Fix references to sprintf that may cause buffer overflow | expand

Message

Jitendra Lanka Jan. 26, 2022, 5:34 p.m. UTC
BugLink: https://bugs.launchpad.net/bugs/1959119

SRU Justification:

[Impact]
Fix references to sprintf that have a possibility for buffer overflow

[Fix]
Replace sprintf with snprintf containing a defined boundary of PAGE_SIZE for sysfs store/show functions and max array size defined otherwise.

[Test Case]
Existing testcases should work as is as no functional change has been introduced by this patch.

[Regression Potential]
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.

Jitendra Lanka (1):
  Fix references to sprintf that may cause buffer overflow

 drivers/platform/mellanox/mlxbf-pmc.c | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

Comments

Jitendra Lanka Jan. 26, 2022, 5:43 p.m. UTC | #1
Adding verification team.

-----Original Message-----
From: Jitendra Lanka <jlanka@nvidia.com> 
Sent: Wednesday, January 26, 2022 11:35 AM
To: kernel-team@lists.ubuntu.com
Cc: Jitendra Lanka <jlanka@nvidia.com>
Subject: [SRU][F:linux-bluefield][PATCH v1 0/1] UBUNTU: SAUCE: Fix references to sprintf that may cause buffer overflow

BugLink: https://bugs.launchpad.net/bugs/1959119

SRU Justification:

[Impact]
Fix references to sprintf that have a possibility for buffer overflow

[Fix]
Replace sprintf with snprintf containing a defined boundary of PAGE_SIZE for sysfs store/show functions and max array size defined otherwise.

[Test Case]
Existing testcases should work as is as no functional change has been introduced by this patch.

[Regression Potential]
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.

Jitendra Lanka (1):
  Fix references to sprintf that may cause buffer overflow

 drivers/platform/mellanox/mlxbf-pmc.c | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)