android_kernel_xiaomi_sm7250/fs
Jeff Layton c47e255260 ceph: return -ERANGE if virtual xattr value didn't fit in buffer
[ Upstream commit 3b421018f48c482bdc9650f894aa1747cf90e51d ]

The getxattr manpage states that we should return ERANGE if the
destination buffer size is too small to hold the value.
ceph_vxattrcb_layout does this internally, but we should be doing
this for all vxattrs.

Fix the only caller of getxattr_cb to check the returned size
against the buffer length and return -ERANGE if it doesn't fit.
Drop the same check in ceph_vxattrcb_layout and just rely on the
caller to handle it.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: "Yan, Zheng" <zyan@redhat.com>
Acked-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-08-06 19:06:50 +02:00
..
9p 9p: pass the correct prototype to read_cache_page 2019-07-31 07:27:08 +02:00
adfs fs/adfs: super: fix use-after-free bug 2019-08-06 19:06:49 +02:00
affs
afs afs: Fix uninitialised spinlock afs_volume::cb_break_lock 2019-07-21 09:03:06 +02:00
autofs
befs
bfs
btrfs btrfs: qgroup: Don't hold qgroup_ioctl_lock in btrfs_qgroup_inherit() 2019-08-06 19:06:49 +02:00
cachefiles
ceph ceph: return -ERANGE if virtual xattr value didn't fit in buffer 2019-08-06 19:06:50 +02:00
cifs cifs: Fix a race condition with cifs_echo_request 2019-08-06 19:06:50 +02:00
coda coda: pass the host file in vma->vm_file on mmap 2019-07-26 09:14:28 +02:00
configfs configfs: Fix use-after-free when accessing sd->s_dentry 2019-06-22 08:15:17 +02:00
cramfs
crypto fscrypt: clean up some BUG_ON()s in block encryption/decryption 2019-07-26 09:14:02 +02:00
debugfs debugfs: fix use-after-free on symlink traversal 2019-05-08 07:21:48 +02:00
devpts
dlm dlm: check if workqueues are NULL before flushing/destroying 2019-07-31 07:27:07 +02:00
ecryptfs eCryptfs: fix a couple type promotion bugs 2019-07-26 09:14:29 +02:00
efivarfs
efs
exofs
exportfs
ext2
ext4 ext4: allow directory holes 2019-07-28 08:29:30 +02:00
f2fs f2fs: avoid out-of-range memory access 2019-07-31 07:27:07 +02:00
fat fs/fat/file.c: issue flush after the writeback of FAT 2019-06-15 11:53:59 +02:00
freevxfs
fscache
fuse fuse: retrieve: cap requested size to negotiated max_write 2019-06-15 11:54:07 +02:00
gfs2 gfs2: Fix occasional glock use-after-free 2019-05-31 06:46:07 -07:00
hfs
hfsplus
hostfs
hpfs
hugetlbfs hugetlb: use same fault hash key for shared and private mappings 2019-05-22 07:37:40 +02:00
isofs
jbd2 jbd2: introduce jbd2_inode dirty range scoping 2019-07-28 08:29:29 +02:00
jffs2 jffs2: fix use-after-free on symlink traversal 2019-05-08 07:21:48 +02:00
jfs
kernfs kernfs: fix barrier usage in __kernfs_new_node() 2019-05-16 19:41:18 +02:00
lockd Revert "lockd: Show pid of lockd for remote locks" 2019-06-09 09:17:22 +02:00
minix
nfs NFS: Cleanup if nfs_match_client is interrupted 2019-08-04 09:30:54 +02:00
nfs_common
nfsd nfsd: Fix overflow causing non-working mounts on 1 TB machines 2019-07-10 09:53:47 +02:00
nilfs2
nls
notify memcg, fsnotify: no oom-kill for remote memcg charging 2019-07-31 07:27:08 +02:00
ntfs
ocfs2 ocfs2: fix error path kobject memory leak 2019-06-22 08:15:21 +02:00
omfs
openpromfs
orangefs
overlayfs ovl: fix bogus -Wmaybe-unitialized warning 2019-06-25 11:35:52 +08:00
proc /proc/<pid>/cmdline: add back the setproctitle() special case 2019-08-04 09:30:56 +02:00
pstore pstore/ram: Run without kernel crash dump region 2019-06-11 12:20:52 +02:00
qnx4
qnx6
quota quota: fix a problem about transfer quota 2019-07-14 08:11:15 +02:00
ramfs
reiserfs
romfs
squashfs
sysfs
sysv
tracefs
ubifs
udf udf: Fix incorrect final NOT_ALLOCATED (hole) extent length 2019-07-14 08:11:16 +02:00
ufs ufs: fix braino in ufs_get_inode_gid() for solaris UFS flavour 2019-05-25 18:23:46 +02:00
xfs xfs: abort unaligned nowait directio early 2019-07-26 09:14:29 +02:00
aio.c Fix aio_poll() races 2019-05-02 09:58:59 +02:00
anon_inodes.c
attr.c
bad_inode.c
binfmt_aout.c
binfmt_elf_fdpic.c
binfmt_elf.c
binfmt_em86.c
binfmt_flat.c fs/binfmt_flat.c: make load_flat_shared_library() work 2019-07-03 13:14:44 +02:00
binfmt_misc.c
binfmt_script.c
block_dev.c
buffer.c
char_dev.c chardev: add additional check for minor range overlap 2019-05-31 06:46:27 -07:00
compat_binfmt_elf.c
compat_ioctl.c
compat.c
coredump.c
d_path.c
dax.c mm: page_mkclean vs MADV_DONTNEED race 2019-06-15 11:54:01 +02:00
dcache.c dcache: sort the freeing-without-RCU-delay mess for good. 2019-05-25 18:23:26 +02:00
dcookies.c
direct-io.c
drop_caches.c
eventfd.c
eventpoll.c
exec.c sched/fair: Don't free p->numa_faults with concurrent readers 2019-08-04 09:30:56 +02:00
fcntl.c
fhandle.c
file_table.c
file.c
filesystems.c
fs_pin.c
fs_struct.c
fs-writeback.c blkcg, writeback: dead memcgs shouldn't contribute to writeback ownership arbitration 2019-07-26 09:14:08 +02:00
inode.c Abort file_remove_privs() for non-reg. files 2019-06-22 08:15:21 +02:00
internal.h acct_on(): don't mess with freeze protection 2019-05-31 06:46:05 -07:00
ioctl.c
iomap.c
Kconfig
Kconfig.binfmt
libfs.c
locks.c
Makefile
mbcache.c
mount.h
mpage.c
namei.c
namespace.c
no-block.c
nsfs.c dcache: sort the freeing-without-RCU-delay mess for good. 2019-05-25 18:23:26 +02:00
open.c access: avoid the RCU grace period for the temporary subjective credentials 2019-07-31 07:27:11 +02:00
pipe.c fs: prevent page refcount overflow in pipe_buf_get 2019-05-04 09:20:11 +02:00
pnode.c
pnode.h
posix_acl.c
proc_namespace.c
read_write.c fs: stream_open - opener for stream-like files so that read and write can run simultaneously without deadlock 2019-05-08 07:21:51 +02:00
readdir.c
select.c
seq_file.c
signalfd.c
splice.c fs: prevent page refcount overflow in pipe_buf_get 2019-05-04 09:20:11 +02:00
stack.c
stat.c
statfs.c
super.c
sync.c
timerfd.c
userfaultfd.c fs/userfaultfd.c: disable irqs for fault_pending and event locks 2019-07-10 09:53:42 +02:00
utimes.c
xattr.c