[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20100924162620.497230599@clark.site>
Date: Fri, 24 Sep 2010 09:24:52 -0700
From: Greg KH <gregkh@...e.de>
To: linux-kernel@...r.kernel.org, stable@...nel.org
Cc: stable-review@...nel.org, torvalds@...ux-foundation.org,
akpm@...ux-foundation.org, alan@...rguk.ukuu.org.uk,
Dan Rosenberg <dan.j.rosenberg@...il.com>,
Alex Elder <aelder@....com>, dann frazier <dannf@...ian.org>
Subject: [64/80] xfs: prevent reading uninitialized stack memory
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Dan Rosenberg <dan.j.rosenberg@...il.com>
commit a122eb2fdfd78b58c6dd992d6f4b1aaef667eef9 upstream.
The XFS_IOC_FSGETXATTR ioctl allows unprivileged users to read 12
bytes of uninitialized stack memory, because the fsxattr struct
declared on the stack in xfs_ioc_fsgetxattr() does not alter (or zero)
the 12-byte fsx_pad member before copying it back to the user. This
patch takes care of it.
Signed-off-by: Dan Rosenberg <dan.j.rosenberg@...il.com>
Reviewed-by: Eric Sandeen <sandeen@...hat.com>
Signed-off-by: Alex Elder <aelder@....com>
Cc: dann frazier <dannf@...ian.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@...e.de>
---
fs/xfs/linux-2.6/xfs_ioctl.c | 2 ++
1 file changed, 2 insertions(+)
--- a/fs/xfs/linux-2.6/xfs_ioctl.c
+++ b/fs/xfs/linux-2.6/xfs_ioctl.c
@@ -794,6 +794,8 @@ xfs_ioc_fsgetxattr(
{
struct fsxattr fa;
+ memset(&fa, 0, sizeof(struct fsxattr));
+
xfs_ilock(ip, XFS_ILOCK_SHARED);
fa.fsx_xflags = xfs_ip2xflags(ip);
fa.fsx_extsize = ip->i_d.di_extsize << ip->i_mount->m_sb.sb_blocklog;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists