[LU-9863] Potential one off bug in lmv_fid2path Created: 11/Aug/17  Updated: 28/Aug/17  Resolved: 28/Aug/17

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Upstream, Lustre 2.11.0
Fix Version/s: Lustre 2.11.0

Type: Bug Priority: Major
Reporter: James A Simmons Assignee: James A Simmons
Resolution: Fixed Votes: 0
Labels: patch

Issue Links:
Related
is related to LU-9679 Prepare lustre for adoption into the ... Resolved
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

Potential off by two in lmv_fid2path()

We want to concatonate join string one, a '/' character, string two and
then a NUL terminator. The destination buffer holds ori_gf->gf_pathlen
characters. The strlen() function returns the number of characters not
counting the NUL terminator. So we should be adding two extra spaces,
one for the foward slash and one for the NULL..



 Comments   
Comment by Gerrit Updater [ 11/Aug/17 ]

James Simmons (uja.ornl@yahoo.com) uploaded a new patch: https://review.whamcloud.com/28477
Subject: LU-9863 lmv: Off by two in lmv_fid2path()
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 6d81128c753d610fd01412e153b7e9af667b3583

Comment by James A Simmons [ 11/Aug/17 ]

So someone has actually been impacted by this bug.

Comment by Gerrit Updater [ 28/Aug/17 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/28477/
Subject: LU-9863 lmv: Off by two in lmv_fid2path()
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 3f86915bdfe506ac9070f091b5a1c52ed134f5d2

Comment by Peter Jones [ 28/Aug/17 ]

Landed for 2.11

Comment by Peter Jones [ 28/Aug/17 ]

Does this affect 2.10.x?

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