[LU-5384] Static analysis issues in lfsck Created: 21/Jul/14  Updated: 30/Aug/23  Resolved: 05/Sep/14

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.6.0, Lustre 2.7.0
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Dmitry Eremin (Inactive) Assignee: Dmitry Eremin (Inactive)
Resolution: Not a Bug Votes: 0
Labels: None

Issue Links:
Related
is related to LU-4629 Issues found by static analysis tools Resolved
Severity: 3
Rank (Obsolete): 14994

 Description   
  1. Array 'name' of size 8 may use index value(s) 8..11
    • lustre/lfsck/lfsck_lib.c:700: Array 'name' size is 8.
    • lustre/lfsck/lfsck_lib.c:707: Length of format string "MDT%04x" is 11.


 Comments   
Comment by Dmitry Eremin (Inactive) [ 21/Jul/14 ]

Patch is http://review.whamcloud.com/11163

Comment by Andreas Dilger [ 21/Jul/14 ]

This is a false positive, since the MDT index should never be over 65535 in hex.

Comment by nasf (Inactive) [ 28/Jul/14 ]

According to our DNE policy, we cannot support more large MDT which index exceeds "0xffff", so the valid name will be always "MDTxxxx", so "name[8]" is enough and there will be no buffer overflow.

Generated at Sat Feb 10 01:51:01 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.