kernel-hacking-2024-linux-s.../fs/jfs
Jie Liu 0439e091e3 jfs: fix xattr value size overflow in __jfs_setxattr
There is a potential overflow if the specified EA value size is
greater than USHRT_MAX because the size of value is limited by
the on-disk format (i.e, __le16), this issue could be reflected
via the tests below:
 # touch /jfs/testfile
 # setfattr -n user.comment -v `perl -e 'print "A"x65536'` /jfs/testfile
   setfattr: /jfs/testfile: Invalid argument

Syslog:
 ... jfs_xsetattr: xattr_size = 21, new_size = 65557

This patch add pre-checkups of EA value size against USHRT_MAX to
avoid this problem, and return -E2BIG which is consistent with the
VFS setxattr interface.  Moreover, fix the debug code to print the
correct function name.

With this fix:
 setfattr: /jfs/testfile: Argument list too long

Signed-off-by: Jie Liu <jeff.liu@oracle.com>
Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
2014-01-02 11:36:56 -06:00
..
acl.c
endian24.h
file.c
inode.c truncate: drop 'oldsize' truncate_pagecache() parameter 2013-09-12 15:38:02 -07:00
ioctl.c
jfs_acl.h
jfs_btree.h
jfs_debug.c
jfs_debug.h
jfs_dinode.h
jfs_discard.c
jfs_discard.h
jfs_dmap.c jfs: Update jfs_error 2013-06-05 14:47:19 -05:00
jfs_dmap.h
jfs_dtree.c jfs: fix readdir cookie incompatibility with NFSv4 2013-08-15 17:22:29 -05:00
jfs_dtree.h [readdir] convert jfs 2013-06-29 12:56:42 +04:00
jfs_extent.c jfs: Update jfs_error 2013-06-05 14:47:19 -05:00
jfs_extent.h
jfs_filsys.h
jfs_imap.c jfs: Update jfs_error 2013-06-05 14:47:19 -05:00
jfs_imap.h
jfs_incore.h
jfs_inode.c jfs: fix error path in ialloc 2013-09-17 10:05:19 -05:00
jfs_inode.h
jfs_lock.h
jfs_logmgr.c fs/jfs: Add check if journaling to disk has been disabled in lbmRead() 2013-05-24 16:03:47 -05:00
jfs_logmgr.h
jfs_metapage.c A couple cleanups to JFS for 3.11 2013-07-11 10:19:34 -07:00
jfs_metapage.h
jfs_mount.c
jfs_superblock.h jfs: Update jfs_error 2013-06-05 14:47:19 -05:00
jfs_txnmgr.c jfs: Update jfs_error 2013-06-05 14:47:19 -05:00
jfs_txnmgr.h
jfs_types.h
jfs_umount.c
jfs_unicode.c
jfs_unicode.h
jfs_uniupr.c
jfs_xattr.h
jfs_xtree.c jfs: Update jfs_error 2013-06-05 14:47:19 -05:00
jfs_xtree.h
Kconfig
Makefile
namei.c A couple cleanups to JFS for 3.11 2013-07-11 10:19:34 -07:00
resize.c jfs: Update jfs_error 2013-06-05 14:47:19 -05:00
super.c jfs: Update jfs_error 2013-06-05 14:47:19 -05:00
symlink.c
xattr.c jfs: fix xattr value size overflow in __jfs_setxattr 2014-01-02 11:36:56 -06:00