linux-yocto/fs/9p
Eric Van Hensbergen 3a741b80b3 fs/9p: fix uninitialized values during inode evict
[ Upstream commit 6630036b7c ]

If an iget fails due to not being able to retrieve information
from the server then the inode structure is only partially
initialized.  When the inode gets evicted, references to
uninitialized structures (like fscache cookies) were being
made.

This patch checks for a bad_inode before doing anything other
than clearing the inode from the cache.  Since the inode is
bad, it shouldn't have any state associated with it that needs
to be written back (and there really isn't a way to complete
those anyways).

Reported-by: syzbot+eb83fe1cce5833cd66a0@syzkaller.appspotmail.com
Signed-off-by: Eric Van Hensbergen <ericvh@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
[Xiangyu: CVE-2024-36923 Minor conflict resolution ]
Signed-off-by: Xiangyu Chen <xiangyu.chen@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-22 15:38:37 +01:00
..
acl.c
acl.h
cache.c
cache.h
fid.c 9p: v9fs_fid_find: also lookup by inode if not found dentry 2024-11-17 15:08:55 +01:00
fid.h fs/9p: fix the cache always being enabled on files with qid flags 2024-05-17 12:02:18 +02:00
Kconfig
Makefile
v9fs_vfs.h 9p: Fix initialisation of netfs_inode for 9p 2024-02-05 20:14:32 +00:00
v9fs.c
v9fs.h
vfs_addr.c
vfs_dentry.c 9p: add missing locking around taking dentry fid list 2024-06-16 13:47:37 +02:00
vfs_dir.c
vfs_file.c 9p: explicitly deny setlease attempts 2024-05-17 12:02:18 +02:00
vfs_inode_dotl.c 9p: Fix initialisation of netfs_inode for 9p 2024-02-05 20:14:32 +00:00
vfs_inode.c fs/9p: fix uninitialized values during inode evict 2024-11-22 15:38:37 +01:00
vfs_super.c fs/9p: drop inodes immediately on non-.L too 2024-05-17 12:02:19 +02:00
xattr.c 9p: v9fs_listxattr: fix %s null argument warning 2023-11-28 17:19:46 +00:00
xattr.h