mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
ovl: fix NULL pointer defer when encoding non-decodable lower fid
A wrong return value from ovl_check_encode_origin() would cause
ovl_dentry_to_fid() to try to encode fid from NULL upper dentry.
Reported-by: syzbot+2208f82282740c1c8915@syzkaller.appspotmail.com
Fixes: 16aac5ad1f
("ovl: support encoding non-decodable file handles")
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
This commit is contained in:
parent
a535116d80
commit
c7242a45cb
1 changed files with 1 additions and 1 deletions
|
@ -188,7 +188,7 @@ static int ovl_check_encode_origin(struct dentry *dentry)
|
|||
|
||||
/* Lower file handle for non-upper non-decodable */
|
||||
if (!ovl_dentry_upper(dentry) && !decodable)
|
||||
return 0;
|
||||
return 1;
|
||||
|
||||
/* Upper file handle for pure upper */
|
||||
if (!ovl_dentry_lower(dentry))
|
||||
|
|
Loading…
Add table
Reference in a new issue