linux-kernel-test/fs/ext4
Darrick J. Wong cf8039036a ext4: prevent stack overrun in ext4_file_open
In ext4_file_open, the filesystem records the mountpoint of the first
file that is opened after mounting the filesystem.  It does this by
allocating a 64-byte stack buffer, calling d_path() to grab the mount
point through which this file was accessed, and then memcpy()ing 64
bytes into the superblock's s_last_mounted field, starting from the
return value of d_path(), which is stored as "cp".  However, if cp >
buf (which it frequently is since path components are prepended
starting at the end of buf) then we can end up copying stack data into
the superblock.

Writing stack variables into the superblock doesn't sound like a great
idea, so use strlcpy instead.  Andi Kleen suggested using strlcpy
instead of strncpy.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-10-25 09:18:41 -04:00
..
acl.c switch posix_acl_equiv_mode() to umode_t * 2011-08-01 02:10:06 -04:00
acl.h fs: take the ACL checks to common code 2011-07-25 14:30:23 -04:00
balloc.c ext4: rename ext4_has_free_blocks() to ext4_has_free_clusters() 2011-09-09 19:16:51 -04:00
bitmap.c
block_validity.c ext4: move ext4_ind_* functions from inode.c to indirect.c 2011-06-27 19:40:50 -04:00
dir.c ext4: Use ext4_error_file() to print the pathname to the corrupted inode 2011-01-10 12:10:55 -05:00
ext4_extents.h ext4: Fix bigalloc quota accounting and i_blocks value 2011-09-09 19:04:51 -04:00
ext4_jbd2.c jbd2: add debugging information to jbd2_journal_dirty_metadata() 2011-09-04 10:18:14 -04:00
ext4_jbd2.h ext4: Fix ext4_should_writeback_data() for no-journal mode 2011-08-13 11:25:18 -04:00
ext4.h ext4: update EOFBLOCKS flag on fallocate properly 2011-10-25 08:15:12 -04:00
extents.c ext4: update EOFBLOCKS flag on fallocate properly 2011-10-25 08:15:12 -04:00
file.c ext4: prevent stack overrun in ext4_file_open 2011-10-25 09:18:41 -04:00
fsync.c ext4: functions should not be declared extern 2011-10-18 10:57:51 -04:00
hash.c
ialloc.c ext4: functions should not be declared extern 2011-10-18 10:57:51 -04:00
indirect.c ext4: enforce bigalloc restrictions (e.g., no online resizing, etc.) 2011-09-09 18:36:51 -04:00
inode.c ext4: update EOFBLOCKS flag on fallocate properly 2011-10-25 08:15:12 -04:00
ioctl.c ext4: add __user decoration to calls of copy_{from,to}_user() 2011-10-18 10:59:51 -04:00
Kconfig ext4: Don't ask about supporting ext2/3 in ext4 if ext4 is not configured 2009-12-21 10:54:09 -05:00
Makefile ext4: move ext4_ind_* functions from inode.c to indirect.c 2011-06-27 19:40:50 -04:00
mballoc.c ext4: Allow quota file use root reservation 2011-10-20 20:07:23 -04:00
mballoc.h ext4: teach ext4_free_blocks() about bigalloc and clusters 2011-09-09 18:50:51 -04:00
migrate.c ext4: add some tracepoints in ext4/extents.c 2011-09-09 19:18:51 -04:00
mmp.c ext4: Fix comparison endianness problem in MMP initialization 2011-10-18 10:53:51 -04:00
move_extent.c ext4: add some tracepoints in ext4/extents.c 2011-09-09 19:18:51 -04:00
namei.c ext4: call ext4_handle_dirty_metadata with correct inode in ext4_dx_add_entry 2011-08-31 12:02:51 -04:00
page-io.c ext4: remove i_mutex lock in ext4_evict_inode to fix lockdep complaining 2011-08-31 11:50:51 -04:00
resize.c ext4: Rename ext4_free_blks_{count,set}() to refer to clusters 2011-09-09 19:08:51 -04:00
super.c ext4: fix ext4 so it works without CONFIG_PROC_FS 2011-10-08 16:26:03 -04:00
symlink.c ext4: symlink must be handled via filesystem specific operation 2010-05-16 02:00:00 -04:00
truncate.h ext4: move common truncate functions to header file 2011-06-27 19:16:04 -04:00
xattr_security.c fs/vfs/security: pass last path component to LSM on inode creation 2011-02-01 11:12:29 -05:00
xattr_trusted.c ext4: constify xattr_handler 2010-05-21 18:31:19 -04:00
xattr_user.c ext4: constify xattr_handler 2010-05-21 18:31:19 -04:00
xattr.c ext4: add flag to ext4_has_free_blocks 2011-05-25 07:41:26 -04:00
xattr.h fs/vfs/security: pass last path component to LSM on inode creation 2011-02-01 11:12:29 -05:00