[LU-10454] mdd: NULL pointer dereference in mdd_changelog_data_store_by_fid() Created: 04/Jan/18  Updated: 05/Aug/20  Resolved: 20/Jan/18

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

Type: Bug Priority: Major
Reporter: CEA Assignee: Quentin Bouget
Resolution: Fixed Votes: 0
Labels: patch

Issue Links:
Duplicate
is duplicated by LU-10450 NULL pointer deref in mdd_changelog_d... Resolved
Related
is related to LU-5938 sanity-hsm test_52 MDS OOPS: mdd_chan... Resolved
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

mdd_changelog_data_store_by_fid() uses lu_ucred() but only part of the function is aware that the return value may be NULL.This issue is more or less a duplicate of LU-5938 (at least the fix is similar).

Here is a failed test run that ran into the issue (and more precisely, here is thelog file that highlights the issue).



 Comments   
Comment by Gerrit Updater [ 04/Jan/18 ]

Quentin Bouget (quentin.bouget@cea.fr) uploaded a new patch: https://review.whamcloud.com/30707
Subject: LU-10454 mdd: check return value of lu_ucred()
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: befe4f4ed9bdc94a76d4bb564a3c11e5f6b8088d

Comment by Bruno Faccini (Inactive) [ 04/Jan/18 ]

Hello Quentin, this problem had just been reported by Oleg in LU-10450 !!
BTW, your fix proposal looks ok to address the Oops but as per Oleg's comments there, code from suspected LU-9727 patch at https://review.whamcloud.com/28114 may also need more adjustments.

Comment by Quentin Bouget [ 04/Jan/18 ]

My bad (that's twice now =/).

Comment by Andreas Dilger [ 04/Jan/18 ]

This is one reason why I've been asking for the llog_reader functionality in https://review.whamcloud.com/30315 to be included into each of the patches adding functionality, and then testing that functionality in the patch that adds it...

Comment by Gerrit Updater [ 20/Jan/18 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/30707/
Subject: LU-10454 mdd: check return value of lu_ucred()
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 45b3c7a05aac591b6b339bece4ff48306b29f00f

Comment by Peter Jones [ 20/Jan/18 ]

Landed for 2.11. Is this needed on b2_10?

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