diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2006-11-03 07:07:28 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-11-03 21:27:59 +0100 |
commit | 8ce08464d2c749610a52c4d6c7c11080a7eaaef1 (patch) | |
tree | 43e49b80ee51a2ca0c95ade6df2831e95c7073c6 /fs/xattr.c | |
parent | [PATCH] IDE: Add the support of nvidia PATA controllers of MCP67 to amd74xx.c (diff) | |
download | linux-8ce08464d2c749610a52c4d6c7c11080a7eaaef1.tar.xz linux-8ce08464d2c749610a52c4d6c7c11080a7eaaef1.zip |
[PATCH] Fix sys_move_pages when a NULL node list is passed
sys_move_pages() uses vmalloc() to allocate an array of structures that is
fills with information passed from user mode and then passes to
do_stat_pages() (in the case the node list is NULL). do_stat_pages()
depends on a marker in the node field of the structure to decide how large
the array is and this marker is correctly inserted into the last element of
the array. However, vmalloc() doesn't zero the memory it allocates and if
the user passes NULL for the node list, then the node fields are not filled
in (except for the end marker). If the memory the vmalloc() returned
happend to have a word with the marker value in it in just the right place,
do_pages_stat will fail to fill the status field of part of the array and
we will return (random) kernel data to user mode.
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Christoph Lameter <clameter@engr.sgi.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/xattr.c')
0 files changed, 0 insertions, 0 deletions