[LU-7948] Array Index Out of Bounds in osd_start() Created: 29/Mar/16  Updated: 29/Jan/22  Resolved: 29/Jan/22

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.9.0
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Dmitry Eremin (Inactive) Assignee: WC Triage
Resolution: Duplicate Votes: 0
Labels: kw

Issue Links:
Duplicate
duplicates LU-10264 New static analysis issues in v2_10_5... Resolved
Related
is related to LU-10264 New static analysis issues in v2_10_5... Resolved
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   
char flagstr[16];
[...]
sprintf(flagstr, "%lu:%lu", mflags, (unsigned long) lmd->lmd_flags);

TRACEBACK

  • An event which alters the program's state, leading to the defect
    obd_mount_server.c:1683: Array 'flagstr' size is 16.
    • An event which alters the program's state, leading to the defect
      obd_mount_server.c:1694: 'flagstr' is passed as an argument to function 'sprintf'.
      • An event which alters the program's state, leading to the defect
        obd_mount_server.c:1694: Length of format string "%lu:%lu" is 21.
      • An event which alters the program's state, leading to the defect
        obd_mount_server.c:1694: Length of non-format characters is 1.
      • An event which alters the program's state, leading to the defect
        obd_mount_server.c:1694: Length of conversion specification '%u' for argument 'mflags' is 10.
      • An event which alters the program's state, leading to the defect
        obd_mount_server.c:1694: Length of conversion specification '%u' for argument 'lmd->lmd_flags' is 10.

Generated at Sat Feb 10 02:13:18 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.