alistair23-linux/fs/jfs
Kees Cook 961b33c244 jfs: Fix usercopy whitelist for inline inode data
Bart Massey reported what turned out to be a usercopy whitelist false
positive in JFS when symlink contents exceeded 128 bytes. The inline
inode data (i_inline) is actually designed to overflow into the "extended
area" following it (i_inline_ea) when needed. So the whitelist needed to
be expanded to include both i_inline and i_inline_ea (the whole size
of which is calculated internally using IDATASIZE, 256, instead of
sizeof(i_inline), 128).

$ cd /mnt/jfs
$ touch $(perl -e 'print "B" x 250')
$ ln -s B* b
$ ls -l >/dev/null

[  249.436410] Bad or missing usercopy whitelist? Kernel memory exposure attempt detected from SLUB object 'jfs_ip' (offset 616, size 250)!

Reported-by: Bart Massey <bart.massey@gmail.com>
Fixes: 8d2704d382 ("jfs: Define usercopy region in jfs_ip slab cache")
Cc: Dave Kleikamp <shaggy@kernel.org>
Cc: jfs-discussion@lists.sourceforge.net
Cc: stable@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org>
2018-08-04 07:53:46 -07:00
..
acl.c
file.c
inode.c
ioctl.c
jfs_acl.h
jfs_btree.h
jfs_debug.c jfs: simplify procfs code 2018-05-16 07:24:30 +02:00
jfs_debug.h jfs: simplify procfs code 2018-05-16 07:24:30 +02:00
jfs_dinode.h jfs: Fix usercopy whitelist for inline inode data 2018-08-04 07:53:46 -07:00
jfs_discard.c
jfs_discard.h
jfs_dmap.c treewide: kmalloc() -> kmalloc_array() 2018-06-12 16:19:22 -07:00
jfs_dmap.h
jfs_dtree.c treewide: kmalloc() -> kmalloc_array() 2018-06-12 16:19:22 -07:00
jfs_dtree.h
jfs_extent.c
jfs_extent.h
jfs_filsys.h
jfs_imap.c
jfs_imap.h
jfs_incore.h jfs: Fix usercopy whitelist for inline inode data 2018-08-04 07:53:46 -07:00
jfs_inode.c
jfs_inode.h
jfs_lock.h
jfs_logmgr.c jfs: simplify procfs code 2018-05-16 07:24:30 +02:00
jfs_logmgr.h
jfs_metapage.c jfs: simplify procfs code 2018-05-16 07:24:30 +02:00
jfs_metapage.h
jfs_mount.c
jfs_superblock.h
jfs_txnmgr.c jfs: simplify procfs code 2018-05-16 07:24:30 +02:00
jfs_txnmgr.h
jfs_types.h
jfs_umount.c
jfs_unicode.c treewide: kmalloc() -> kmalloc_array() 2018-06-12 16:19:22 -07:00
jfs_unicode.h
jfs_uniupr.c
jfs_xattr.h
jfs_xtree.c jfs: simplify procfs code 2018-05-16 07:24:30 +02:00
jfs_xtree.h
Kconfig fs/*/Kconfig: drop links to 404-compliant http://acl.bestbits.at 2018-01-01 12:45:37 -07:00
Makefile
namei.c do d_instantiate/unlock_new_inode combinations safely 2018-05-11 15:36:37 -04:00
resize.c
super.c jfs: Fix usercopy whitelist for inline inode data 2018-08-04 07:53:46 -07:00
symlink.c
xattr.c jfs: Fix inconsistency between memory allocation and ea_buf->max_size 2018-06-05 10:36:46 -05:00