[LU-13157] migrate symlink with target name length > 59 cause crash Created: 20/Jan/20  Updated: 12/Oct/21  Resolved: 31/Mar/20

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.12.0
Fix Version/s: Lustre 2.14.0, Lustre 2.12.5

Type: Bug Priority: Critical
Reporter: Lai Siyao Assignee: Lai Siyao
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Related
is related to LU-11578 ldiskfs_map_blocks: comm mdt00_100: l... Resolved
is related to LU-14988 crash in ll_migrate in racer Open
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

mdd_migrate() allocate 'la_size + 1' for symlink target name, the extra '+1' is a mistake, which will cause read beyond range fault: if target name is 59 bytes long, then it will try to read target name from external block other than inline i_block[15], that's why when target name is shorter than 59 it won't cause any problem.



 Comments   
Comment by Gerrit Updater [ 20/Jan/20 ]

Lai Siyao (lai.siyao@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/37285
Subject: LU-13157 mdd: extra byte read in symlink migrate
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 7e2a5c31f9e231b740a7daf27bf1bd6476bd9b93

Comment by Gerrit Updater [ 31/Mar/20 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/37285/
Subject: LU-13157 mdd: migrate readlink from wrong place
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: a3b30423c6067b3e8644ecfb3269f8837af7e4cd

Comment by Peter Jones [ 31/Mar/20 ]

Landed for 2.14

Comment by Gerrit Updater [ 01/Apr/20 ]

Minh Diep (mdiep@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/38112
Subject: LU-13157 mdd: migrate readlink from wrong place
Project: fs/lustre-release
Branch: b2_12
Current Patch Set: 1
Commit: b51d487d16c5a001800afbb3143fb7f724b37439

Comment by Gerrit Updater [ 14/Apr/20 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/38112/
Subject: LU-13157 mdd: migrate readlink from wrong place
Project: fs/lustre-release
Branch: b2_12
Current Patch Set:
Commit: 6b105dcf5bd3b06881c54a1c5e877cebefc9b67c

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