https://github.com/torvalds/linux
Revision 2b462638e41ea62230297c21c4da9955937b7a3c authored by Ben Hutchings on 29 August 2014, 22:18:58 UTC, committed by Linus Torvalds on 29 August 2014, 23:28:16 UTC
If we failed to copy from the structure, writing back the flags leaks 31
bits of kernel memory (the rest of the ir_flags field).

In any case, if we cannot copy from/to the structure, why should we
expect putting just the flags to work?

Also make sure ocfs2_info_handle_freeinode() returns the right error
code if the copy_to_user() fails.

Fixes: ddee5cdb70e6 ('Ocfs2: Add new OCFS2_IOC_INFO ioctl for ocfs2 v8.')
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Cc: Joel Becker <jlbec@evilplan.org>
Acked-by: Mark Fasheh <mfasheh@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 4df4185
History
Tip revision: 2b462638e41ea62230297c21c4da9955937b7a3c authored by Ben Hutchings on 29 August 2014, 22:18:58 UTC
ocfs2: do not write error flag to user structure we cannot copy from/to
Tip revision: 2b46263
File Mode Size
Documentation
arch
block
crypto
drivers
firmware
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
usr
virt
.gitignore -rw-r--r-- 1.1 KB
.mailmap -rw-r--r-- 4.7 KB
COPYING -rw-r--r-- 18.3 KB
CREDITS -rw-r--r-- 93.8 KB
Kbuild -rw-r--r-- 2.5 KB
Kconfig -rw-r--r-- 252 bytes
MAINTAINERS -rw-r--r-- 279.0 KB
Makefile -rw-r--r-- 52.8 KB
README -rw-r--r-- 18.3 KB
REPORTING-BUGS -rw-r--r-- 7.3 KB

README

back to top