diff options
| author | Ernesto A. Fernández <[email protected]> | 2018-08-23 17:00:25 -0700 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2018-08-23 18:48:42 -0700 |
| commit | a7ec7a4193a2eb3b5341243fc0b621c1ac9e4ec4 (patch) | |
| tree | 191476f760fc603cca157aa80f51198d62916cd0 /include/linux/fpga/fpga-mgr.h | |
| parent | 815f0ddb346c196018d4d8f8f55c12b83da1de3f (diff) | |
hfsplus: fix NULL dereference in hfsplus_lookup()
An HFS+ filesystem can be mounted read-only without having a metadata
directory, which is needed to support hardlinks. But if the catalog
data is corrupted, a directory lookup may still find dentries claiming
to be hardlinks.
hfsplus_lookup() does check that ->hidden_dir is not NULL in such a
situation, but mistakenly does so after dereferencing it for the first
time. Reorder this check to prevent a crash.
This happens when looking up corrupted catalog data (dentry) on a
filesystem with no metadata directory (this could only ever happen on a
read-only mount). Wen Xu sent the replication steps in detail to the
fsdevel list: https://bugzilla.kernel.org/show_bug.cgi?id=200297
Link: http://lkml.kernel.org/r/20180712215344.q44dyrhymm4ajkao@eaf
Signed-off-by: Ernesto A. Fernández <[email protected]>
Reported-by: Wen Xu <[email protected]>
Cc: Viacheslav Dubeyko <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'include/linux/fpga/fpga-mgr.h')
0 files changed, 0 insertions, 0 deletions